summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.h
AgeCommit message (Collapse)Author
2019-02-05tests/gem_media_vme: Simple test to exercise the VME blockTony Ye
Simple test which exercises the VME fixed function block. v2: (Tvrtko Ursulin) * Small cleanups like copyright date, tabs, remove unused bits. v3: (Tony Ye) * Added curbe data entry for dst surface. * Read the dst surface after the VME kernel being executed. v4: (Tony Ye) * Added the media_vme.gxa kernel source code and compile instructions. v5: (Tvrtko Ursulin) * Added hang detector. v6: (Tvrtko Ursulin) * Replace gem_read with gem_sync. (Chris Wilson) Signed-off-by: Tony Ye <tony.ye@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tony Ye <tony.ye@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-11-20lib/batchbuffer: Set bpp in igt_buf.Maarten Lankhorst
We want to allow bpp = 8 or 16, so make sure we set the bpp in igt_buf. This way we can extend rendercopy to support other values for bpp. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Fix double ;; (Ville] Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-07-06lib: Add aux surface state to igt_bufVille Syrjälä
Store a bit of aux surface state in igt_buf. This will be needed for rendercopy AUX_CCS_E color compression. We also have to sprinkle memset()s and whatnot all over to make sure the current igt_buf users don't leave the aux stuff full of stack garbage. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-07-05lib: Constify igt_bufVille Syrjälä
No one generally needs to modify the igt_bufs we pass around, so make them const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-24lib/intel_batchbuffer: Move batch functions from media/render/gpgpu libsKalamarz, Lukasz
Batch functions were copy/pasted across several libs. With moving it into intel_batchbuffer lib test can now be easly maintained without worrying that we forgot to modify older version of lib. v2: Added documentation into lib and rebased patch v3: Fixed typos and rebased patch v4: Fixed documentation issues v5: Rename, clean up of leftovers from previous version and documentation polishing v6: Fixing assert Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-04-24lib/intel_batchbuffer: Removal of state variable from a intel_batchbuffer ↵Kalamarz, Lukasz
structure With a removal of all references to state variable there is no longer any need to keep it in structure. v5: Rebase Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-02-01lib/intel_batchbuffer: Add src/dst delta arguments to igt_blitter_fast_copy tooMaarten Lankhorst
Nothing uses this currently, but other copy functions have the same delta now. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-02-01lib/intel_batchbuffer: Add delta argument to igt_blitter_fast_copy__raw, v2.Maarten Lankhorst
Adding a delta offset will allow us to copy planar framebuffers with this function. Changes since v1: - Set src and destination addresses to the delta, in case BO is mapped at offset 0. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> #v1
2017-12-11igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBsImre Deak
When drawing with cairo to Y/Yf tiled FBs we use a temporary linear buffer which is mapped to the CPU, but the fast blit needed for this only expects 32 bpp FBs. Add support for other bpps too. This is needed for upcoming patches testing non-32bit bpp formats with Y/Yf tiling. Thanks to Ville for explaining why we need the temporary buffer. (Looks like for Y tiling we could do without, but that's a separate topic.) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-05-05lib/batchbuffer: Fix COLOR_BLIT_COPY_BATCH_STARTDaniel Vetter
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-25lib: Add media spinJeff McGee
The media spin utility is derived from media fill. The purpose is to create a simple means to keep the render engine (media pipeline) busy for a controlled amount of time. It does so by emitting a batch with a single execution thread that spins in a tight loop the requested number of times. Each spin increments a counter whose final 32-bit value is written to the destination buffer on completion for checking. The implementation supports Gen8, Gen8lp, and Gen9. v2: Apply the recommendations of igt.cocci. Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Tested-by: Lei Liu <lei.a.liu@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12lib: Provide a raw version of the gen9 fast copy blitsDamien Lespiau
So we can use it with bare kernel types, without going through libdrm bos. v2: Don't forget the object handle. (Tvrtko) Correct surface pitch calculation. (Tvrtko) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12lib/skl: Add gen9 specific igt_blitter_fast_copy()Damien Lespiau
v2: Adjust for BB handling changes. (Tvrtko Ursulin) Correct XY_FAST_COPY_DST_TILING_Yf. (Tvrtko Ursulin) v3: New tiling modes are not defined in the kernel any more. (Tvrtko Ursulin) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2014-12-04lib: Add GPGPU fillZhenyu Wang
This is to add fill operation using GPGPU pipeline which is similar to current media fill. This can be used to simply verify GPGPU pipeline and help to enable it on newer HW, currently it works on Gen7 only and will add support on later platform. Now this sets very simply thread group dispatch for one thread per thread group on SIMD16 dispatch. So the fill shader just uses thread group ID for buffer offset. v2: No new fill func typedef but adapt to igt_fillfunc_t. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-12-04lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_tZhenyu Wang
This makes fill function more general to prepare for other fill method using GPGPU pipeline. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-09-09igt/gem_ppgtt: Create secondary contexts and mmChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-30batch: Fix typo in BLIT_BATCH_BEGINChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-30batch: Specify number of relocations to accommodateChris Wilson
Since relocations are variable size, depending upon generation, it is easier to handle the resizing of the batch request inside the BEGIN_BATCH macro. This still leaves us with having to resize commands in a few places - which still need adaption for gen8+. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29Prepare for 64bit relocation addressesChris Wilson
This reveal that quite a few locations were writing relocation offsets but only allowing for 32 bit addresses. To reveal such places in active tests, we also now double check that we do not use more batch space than declared. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29lib/batchbuffer: Store the gen in a local variableChris Wilson
Reduce lookups and improve code clarity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-12lib: various documentation fixesThomas Wood
Fix some documentation comments and mark some struct members private. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-03-26lib/intel_batchbuffer fix OUT_RELOC doc tagMika Kuoppala
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-22lib: more unecessary header removalDaniel Vetter
This time big with media_fill.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: remove uncessary #includes from headersDaniel Vetter
Only include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow. One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22tests|lib: remove assert.h includesDaniel Vetter
Only the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead. Fix things up where assert instead of igt_assert was used. One tiny step towards header sanity. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: api documentation for render copy/media fillDaniel Vetter
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-22lib/intel_batchbuffer: drop cpu_mapping from igt_bufDaniel Vetter
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-22lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcsDaniel Vetter
Now everything is prepared to pour some neat api docs over this all. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: igt_ namespace for the buffer structureDaniel Vetter
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-22lib/intel_batchbuffer: un-inline buf_height/widthDaniel Vetter
gtkdoc won't pick them up otherwise. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: make media_fill.h an internal headerDaniel Vetter
Same deal as with rendercopy.h. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: make rendercopy.h an internal headerDaniel Vetter
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-13lib: switch intel_copy_bo to directly take a sizeDaniel Vetter
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-13lib: api docs for intel_batchbufferDaniel Vetter
- 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-13lib/intel_batchbuffer: Remove BATCH_LOCALSDaniel Vetter
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-13lib: remove hw context #definesDaniel Vetter
The libdrm we require nowadays has them already. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-05gem_pipe_control_store_loop: BDW updateBen Widawsky
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-11-14tests: More bdw falloutDaniel Vetter
2013-11-12build: Fix assorted compilation warningsOscar Mateo
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-06bdw: Update obvious missing blit supportBen Widawsky
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-07-29intel_batchbuffer: add support for non-32bit blt copiesImre Deak
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-18lib: Remove old dead code intel_batchbuffer_emit_mi_flush()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2012-12-06Implement a working gen7 rendercopyChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-29context: libdrm wrappersBen Widawsky
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-14context: update for new execbuf2 elementBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-05-29lib: fix gen5 workaround emissionDaniel Vetter
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-01-25i-g-t: silence -WinlineBen Widawsky
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>
2011-09-09lib/batch: hackish interface to run batches on specific ringsDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-05-24gem_stress: Add render copyfunc for SandyBridgeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>