summaryrefslogtreecommitdiff
path: root/tests/i915/gem_render_copy.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15tests/i915: Treat gen as unsigned for forward compatibilityChris Wilson1-2/+2
We want to recognise future devices (gen = -1u) and treat them as an extension of the latest known device, which is typically true. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2020-10-01lib/intel_batchbuffer: Prepare batch to use in allocator infrastructureZbigniew Kempczyński1-7/+7
With upcoming of allocator code we need to ensure batch will execute with appropriate context. If mismatch between allocator data and batch could lead to strange or wrong results. All functions which could change context in execbuf called from intel_bb were removed. As an allocator requires size (which was not previously required in intel_bb) adding object to intel_bb is now mandatory. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-09-16tests/gem_render_copy: remove libdrm dependencyZbigniew Kempczyński1-190/+123
Use intel_bb / intel_buf to remove libdrm dependency. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson1-2/+3
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-01-17i915/gem_render_copy.c: Simplify code by switch to rendercopy bufmgrZbigniew Kempczyński1-306/+116
Switch to rendercopy bufmgr to simplify working with tiled surfaces. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com>
2019-12-31lib/igt_buf: Extend igt_buf to include two color surfacesImre Deak1-16/+19
UV FBs have two color surfaces so extend the igt_buf struct accordingly to support blitting such FBs. The patch is produced with the coccinelle patch below. No functional changes. @@ @@ struct igt_buf { ... - uint32_t stride; ... - uint32_t size; + struct { + uint32_t stride; + uint32_t size; + } surface[2]; ... }; @@ struct igt_buf b; @@ <... ( - b.stride + b.surface[0].stride | - b.size + b.surface[0].size ) ...> @@ struct igt_buf *b; @@ <... ( - b->size + b->surface[0].size | - b->stride + b->surface[0].stride ) ...> @@ identifier I; expression E1; expression E2; @@ ( struct igt_buf I = { - .size = E1, - .stride = E2, + .surface[0] = { + .size = E1, + .stride = E2, + }, }; | struct igt_buf I = { - .size = E1, + .surface[0] = { + .size = E1, + }, }; | struct igt_buf I = { - .stride = E1, + .surface[0] = { + .stride = E1, + }, }; ) v2: - Rebase on latest upstream. (Mika) Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-12-31lib/igt_buf: Extend igt_buf to include two CCS surfacesImre Deak1-5/+5
YUV FBs have two CCS surfaces so extend the igt_buf struct accordingly to support blitting such FBs. The patch is produced with the coccinelle patch below, along with some w/s fixup. No functional change. @@ @@ struct igt_buf { ... struct { uint32_t offset; uint32_t stride; - } aux; + } ccs[2]; ... }; @@ struct igt_buf *b; @@ ( - b->aux.offset + b->ccs[0].offset | - b->aux.stride + b->ccs[0].stride ) @@ struct igt_buf b; @@ ( - b.aux.offset + b.ccs[0].offset | - b.aux.stride + b.ccs[0].stride ) Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-12-09tests/gem_render_copy: Add media compression subtestsImre Deak1-3/+124
Add subtests using the vebox copy function to test the blit functionality involving media compressed source and destination buffers. These cover all the source and destination tiling formats supported by the vebox engine and validate the buffer sharing between the render and vebox engine (a render compressed buffer used by the vebox engine and a media compressed buffer used by the render engine). v2: - Rebase on latest igt. Simplify the condition for enabling media compression in the surface state. Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-12-09lib: Add vebox copy supportImre Deak1-0/+1
To produce surfaces that are compressed using the media compression format we need to use one of the media engines. The simplest way for this is to use the vebox engine's tiling convert command, so add support for this. v2: - Rebase on latest igt. (Mika) Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-12-09tests/gem_render_copy: Separate out mixed tiled ccs subtestsImre Deak1-41/+126
Add separate subtests for the subtests copying from multiple source buffers with different tiling formats into the destination buffer. The vebox engine has restrictions on specifying arbitrary regions in the source and destination surfaces, so we can't run these tests using that engine (at least in their current form). Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-12-09tests/gem_render_copy: Make subtest parameters more explicitImre Deak1-41/+88
A follow-up patch will add more subtests with varying source and destination memory compression format and a way to force using the vebox engine instead of the render engine for blitting. Prepare for that by describing the compression types explicitly. Also add a flag for subtests that do a blit from multiple source buffers with different tilings into the destination buffer. This is not supported by the vebox copy function (added later) due to the restrictions on defining arbitrary source,destination surface regions for vebox blits. Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-11-14tests/gem_render_copy: Add compressed src to compressed dst subtestsImre Deak1-47/+118
Add new subtests that blit from a compressed source to a compressed destination buffer. While at it also add descriptions for the subtests. v2: - Use the correct buffer when dumping the png for the compressed buf. v3: - Add subtest descriptions. v4: - Add Bugzilla link. (Brian) - Add back linear subtest removed by mistake. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111771 Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com>
2019-11-14tests/gem_render_copy: Adjust the tgl+ compressed buf alignmentsImre Deak1-11/+40
GEN12+ the render and media compressed surface have different alignment requiremens than ICL, so adjust that. v2: - Clarify a bit the comments about AUX CCS units vs. main surface tiles. (Ville) Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com>
2019-09-23i915/gem_render_copy: Add hang detectorChris Wilson1-0/+3
Die early if the GPU hangs during our basic render copy testing, and clean up rather than waiting for multiple different failing batches before detecting our failure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-05-27i915/gem_render_copy: Nuke custom main functionPetri Latvala1-11/+14
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-04-18tests/i915/gem_render_copy: Don't leak bos between subtestsVille Syrjälä1-0/+12
Unref the bos after one subtest is done. The next subtest will allocate its own bos. v2: Add scratch_buf_fini() and reverse the onion (Chris) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-11tests/gem_render_copy: Test Yf tilingVille Syrjälä1-55/+223
Let's test Yf tiling now that rendercopy can handle it. v2: From DK Set bpp for Yf buffer and rebase. v3: From DK More documentation, fewer unexplained constants (Kasia) v4: From DK Rewrite Yf tiling algorithm to be more descriptive Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-11-20lib/batchbuffer: Set bpp in igt_buf.Maarten Lankhorst1-0/+2
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-10-23tests: Introduce i915 directoryArkadiusz Hiler1-0/+566
We can already move all the tests with distinct prefixes: gem_, gen3_ and i915_. pm_ and drv_ tests will follow in batches, so we can do the adjustments in the reporting/filtering layer of the CI system. v2: Fix test-list.txt generation with meson v3: Fix docs build (Petri) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>