diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2020-07-06 15:08:42 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-07-06 18:35:17 +0100 |
commit | 41e2dcb9bfd83f9a04dfb78073d25bc0d868a896 (patch) | |
tree | efad9d19ae0ad43a6cec3af3766405f40a5b774f /tests/i915/gem_gpgpu_fill.c | |
parent | a4d83701bd493a43747780321d404dc2163378df (diff) |
lib/bufops: add surface array to cover ccs pgtable
Rendercopy for gen12+ requires additional aux pgtable. Alter bufops
and tests to use surface[] and ccs[] instead aux. This step is
required to properly rewrite handling aux pgtable to use with
intel_bb.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@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>
Diffstat (limited to 'tests/i915/gem_gpgpu_fill.c')
-rw-r--r-- | tests/i915/gem_gpgpu_fill.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c index e1d3a288..c605629f 100644 --- a/tests/i915/gem_gpgpu_fill.c +++ b/tests/i915/gem_gpgpu_fill.c @@ -78,13 +78,13 @@ create_buf(data_t *data, int width, int height, uint8_t color) intel_buf_init(data->bops, buf, width/4, height, 32, 0, I915_TILING_NONE, 0); - ptr = gem_mmap__cpu_coherent(data->drm_fd, - buf->handle, 0, buf->size, PROT_WRITE); + ptr = gem_mmap__cpu_coherent(data->drm_fd, buf->handle, 0, + buf->surface[0].size, PROT_WRITE); - for (i = 0; i < buf->size; i++) + for (i = 0; i < buf->surface[0].size; i++) ptr[i] = color; - munmap(ptr, buf->size); + munmap(ptr, buf->surface[0].size); return buf; } @@ -106,8 +106,8 @@ static void gpgpu_fill(data_t *data, igt_fillfunc_t fill) int i, j; buf = create_buf(data, WIDTH, HEIGHT, COLOR_C4); - ptr = gem_mmap__device_coherent(data->drm_fd, buf->handle, - 0, buf->size, PROT_READ); + ptr = gem_mmap__device_coherent(data->drm_fd, buf->handle, 0, + buf->surface[0].size, PROT_READ); for (i = 0; i < WIDTH; i++) for (j = 0; j < HEIGHT; j++) buf_check(ptr, i, j, COLOR_C4); @@ -121,7 +121,7 @@ static void gpgpu_fill(data_t *data, igt_fillfunc_t fill) else buf_check(ptr, i, j, COLOR_C4); - munmap(ptr, buf->size); + munmap(ptr, buf->surface[0].size); } igt_simple_main |