Lines Matching refs:i915
171 static void i915_to_amd(int i915, int amd, amdgpu_device_handle device) in i915_to_amd() argument
182 for_each_physical_engine(i915, engine) in i915_to_amd()
187 obj[1].handle = gem_create(i915, 4096); in i915_to_amd()
188 gem_write(i915, obj[1].handle, 0, &bbe, sizeof(bbe)); in i915_to_amd()
194 plug(i915, &c); in i915_to_amd()
199 execbuf.rsvd1 = gem_context_create(i915); in i915_to_amd()
203 gem_execbuf(i915, &execbuf); in i915_to_amd()
206 gem_context_destroy(i915, execbuf.rsvd1); in i915_to_amd()
209 if (!gem_uses_full_ppgtt(i915)) in i915_to_amd()
233 dmabuf = prime_handle_to_fd(i915, obj[1].handle); in i915_to_amd()
285 gem_sync(i915, obj[1].handle); in i915_to_amd()
286 gem_close(i915, obj[1].handle); in i915_to_amd()
289 static void amd_to_i915(int i915, int amd, amdgpu_device_handle device) in amd_to_i915() argument
310 obj[1].handle = gem_create(i915, 4096); in amd_to_i915()
311 gem_write(i915, obj[1].handle, 0, &bbe, sizeof(bbe)); in amd_to_i915()
373 obj[0].handle = prime_fd_to_handle(i915, dmabuf); in amd_to_i915()
377 gem_execbuf(i915, &execbuf); in amd_to_i915()
378 igt_assert(gem_bo_busy(i915, obj[1].handle)); in amd_to_i915()
382 gem_sync(i915, obj[1].handle); in amd_to_i915()
383 gem_close(i915, obj[1].handle); in amd_to_i915()
396 static void shrink(int i915, int amd, amdgpu_device_handle device) in shrink() argument
413 handle = prime_fd_to_handle(i915, dmabuf); in shrink()
417 gem_set_domain(i915, handle, I915_GEM_DOMAIN_GTT, 0); in shrink()
420 igt_drop_caches_set(i915, DROP_SHRINK_ALL); in shrink()
422 gem_close(i915, handle); in shrink()
428 int i915 = -1, amd = -1; variable
436 i915 = drm_open_driver(DRIVER_INTEL);
437 igt_require_gem(i915);
438 igt_require(gem_has_exec_fence(i915));
446 gem_require_contexts(i915);
447 i915_to_amd(i915, amd, device);
451 amd_to_i915(i915, amd, device);
454 shrink(i915, amd, device);
459 close(i915);