diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-07 21:57:06 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-07 23:18:26 +0000 |
commit | babef7436c5f8adfa3c13d3d032493d4924f8d7a (patch) | |
tree | 4edcf769f997793cee71ddd1d7892552f9d71bd7 /tests/i915/gem_ctx_engines.c | |
parent | a43a757fa998c21def5959568380fa4d34fef59f (diff) |
i915/gem_ctx_engines: Use an offset hint to avoid overlap
As Braswell is using aliasing-ppgtt, softpinning is trick as we have to
avoid overlapping with HW objects in the GGTT (like context images).
Typically allocations are from either end, so if we provide a hint to
use the middle, we should be safe from overlap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_ctx_engines.c')
-rw-r--r-- | tests/i915/gem_ctx_engines.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c index 1e82e51e..55794a43 100644 --- a/tests/i915/gem_ctx_engines.c +++ b/tests/i915/gem_ctx_engines.c @@ -425,7 +425,10 @@ static void independent(int i915) .value = to_user_pointer(&engines), .size = sizeof(engines), }; - struct drm_i915_gem_exec_object2 results = { .handle = gem_create(i915, 4096) }; + struct drm_i915_gem_exec_object2 results = { + .handle = gem_create(i915, 4096), + .offset = gem_aperture_size(i915) / 2, + }; const uint32_t bbe = MI_BATCH_BUFFER_END; int timeline = sw_sync_timeline_create(); uint32_t last, *map; |