31 Commits

Author SHA1 Message Date
Daniel Vetter
7754c4dd76 lib/intel_batchbuffer: api documentation for render copy/media fill
Also fix a fumble in the documentation for intel_blt_copy. One thing
we might want to do is unify the parameter ordering here a bit ...

Again gtkdoc fails to pick up the documentation for struct igt_buf :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:36:50 +01:00
Daniel Vetter
43b7aa44fd lib/intel_batchbuffer: drop cpu_mapping from igt_buf
It's unused. There's still num_tiles getting in the way of things,
but that is used by gem_stress a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 18:04:52 +01:00
Daniel Vetter
53a4d9e982 lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
Now everything is prepared to pour some neat api docs over this all.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:49:02 +01:00
Daniel Vetter
83a4c7d3eb lib/intel_batchbuffer: igt_ namespace for the buffer structure
Step one to properly namespace the rendercpy/mediafill functions. Als
give the buf_height/width helpers a proper igt_ prefix.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:44:48 +01:00
Daniel Vetter
82c6dffe9f lib/intel_batchbuffer: un-inline buf_height/width
gtkdoc won't pick them up otherwise.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:41:42 +01:00
Daniel Vetter
aaebbc513a lib: make media_fill.h an internal header
Same deal as with rendercopy.h.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:39:29 +01:00
Daniel Vetter
7dc0001f3d lib: make rendercopy.h an internal header
And move the public interfaces into intel_batchbuffer.[hc].

A bit messy since we are fairly inconsistent with our header #include
handling.

Also exclude rendercopy.h from the documentation.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:31:15 +01:00
Daniel Vetter
eaccd444f7 lib: switch intel_copy_bo to directly take a size
Instead of a width/height combination. Since I've been lazy with the
math this now only accepts page-aligned copy operations, but that's
all we need really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:22 +01:00
Daniel Vetter
ec5f9e8788 lib: api docs for intel_batchbuffer
- I didn't bother to document the BLIT batch header macros - I'm not
  too happy with them and they're fairly obscure.
- intel_copy_bo could use some interface love, added a FIXME comment
  for now.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:22 +01:00
Daniel Vetter
49e3877ae7 lib/intel_batchbuffer: Remove BATCH_LOCALS
Totally unused, we have frisky implicit assumptions that the
batch is called batch instead.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:21 +01:00
Daniel Vetter
675c91974e lib: remove hw context #defines
The libdrm we require nowadays has them already.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:21 +01:00
Ben Widawsky
672911d714 gem_pipe_control_store_loop: BDW update
I've opted to not use the PIPE_CONTROL w/a for now. I am unclear if it
is actually required (the test does pass).

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05 14:30:14 -08:00
Daniel Vetter
df5e880bea tests: More bdw fallout 2013-11-14 23:31:43 +01:00
Oscar Mateo
5032e7bbdd build: Fix assorted compilation warnings
As these files are compiled for every test, the warnings cluttered
the Android build completely.

v2: As suggested by Daniel Vetter, drop some of the fixes and fix
the compilation flags instead.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:05:55 +01:00
Ben Widawsky
f4dfa37e85 bdw: Update obvious missing blit support
This provides a macro that allows us to update all the arbitrary blit
commands we have stuck throughout the code. It assumes we don't actually
use 64b relocs (which is currently true). This also allows us to easily find
all the areas we need to update later when we really use the upper dword.

This block was done mostly with a sed job, and represents the easier
in test blit implementations.

v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06 09:34:35 -08:00
Imre Deak
c1ee0bb532 intel_batchbuffer: add support for non-32bit blt copies
Needed by an upcoming patch fixing kms_render's blits for fbs that have
other than 32bpp formats.

Based on the corresponding SNA function.

v2:
- fix random ordering of src, dst parameters (Chris)
- pass pitch in bytes rather than pixels (Chris)

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-07-29 18:40:00 +03:00
Damien Lespiau
cf4efd1597 lib: Remove old dead code intel_batchbuffer_emit_mi_flush()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:48:55 +01:00
Chris Wilson
1945e2a7f1 Implement a working gen7 rendercopy
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 19:52:10 +00:00
Ben Widawsky
a635a5ac3b context: libdrm wrappers
This wraps libdrm functionality to exec with contexts. This patch
shouldn't be applied until libdrm for contexts is updated.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-29 11:24:52 -07:00
Ben Widawsky
5a28ef8580 context: update for new execbuf2 element
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-14 10:15:42 -07:00
Daniel Vetter
bfbe813f8f lib: fix gen5 workaround emission
Using BEGIN_BATCH can lead to a nice inf recursion through require_space
-> flush_batch -> BEGIN_BATCH.

Also fix things up to always require BATCH_RESERVED. We need 2 dwords
for the gen5 workaround and 2 dwords for MI_BB_END.
2012-05-29 22:14:06 +02:00
Ben Widawsky
802bd74c5f i-g-t: silence -Winline
In this case, the code already has a comment about the problem. We don't
need to flood the build with this less than useful message.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:01:55 -08:00
Daniel Vetter
d42b7f9189 lib/batch: hackish interface to run batches on specific rings
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 17:24:16 +02:00
Chris Wilson
719ffef7c3 gem_stress: Add render copyfunc for SandyBridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-24 22:08:48 +01:00
Daniel Vetter
8ab88c9af0 lib: execbuffer2 support
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-29 22:49:09 +02:00
Chris Wilson
371f87f2d8 Exercise the whole aperture with tiled blits
After full-gtt, gem_tiled_blits doesn't allocate enough to force
eviction. So query the total aperture and accommodate.

Also introduce a similar test that utilizes fences rather than
use the BLT to perform the tiling and detiling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-01 10:56:46 +00:00
Chris Wilson
d4d769a432 Prepare for split BLT ring on Sandybridge.
Depends on libdrm 057fab3382c02af54126ce395c43d4e6dce9439a

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31123
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-26 11:46:52 +01:00
Chris Wilson
95374225e8 Enable compilation on non-Intel, non-DRM systems.
A few of the tools can be performed post-mortem from a different system,
so it is useful to be able to compile those tools on those foreign
systems. Obviously, any program to interact with the PCI device or talk
to GEM will fail on a non-Intel system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-08 12:17:31 +01:00
Eric Anholt
b51588b9bd Fix warning about assert in intel_batchbuffer.h 2009-04-07 19:07:18 -07:00
Eric Anholt
ce4782dc9d Move i810_reg.h to lib/intel_reg.h and get it disted. 2009-03-27 16:11:50 -07:00
Eric Anholt
8c64183a46 Initial import of intel-graphics-tools with some microbenchmarks. 2009-03-26 17:15:11 -07:00