Skip to content

Commit 0aeec60

Browse files
nvishwa1Andi Shyti
authored andcommitted
drm/i915: Do not set cache_dirty for DGFX
Currently on DG1, which does not have LLC, we hit the below warning while rebinding an userptr invalidated object. WARNING: CPU: 4 PID: 13008 at drivers/gpu/drm/i915/gem/i915_gem_pages.c:34 __i915_gem_object_set_pages+0x296/0x2d0 [i915] ... RIP: 0010:__i915_gem_object_set_pages+0x296/0x2d0 [i915] ... Call Trace: <TASK> i915_gem_userptr_get_pages+0x175/0x1a0 [i915] ____i915_gem_object_get_pages+0x32/0xb0 [i915] i915_gem_object_userptr_submit_init+0x286/0x470 [i915] eb_lookup_vmas+0x2ff/0xcf0 [i915] ? __intel_wakeref_get_first+0x55/0xb0 [i915] i915_gem_do_execbuffer+0x785/0x21d0 [i915] i915_gem_execbuffer2_ioctl+0xe7/0x3d0 [i915] We shouldn't be setting the obj->cache_dirty for DGFX, fix it. Fixes: d70af57 ("drm/i915/shmem: ensure flush during swap-in on non-LLC") Suggested-by: Matthew Auld <[email protected]> Reported-by: Niranjana Vishwanathapura <[email protected]> Signed-off-by: Niranjana Vishwanathapura <[email protected]> Acked-by: Nirmoy Das <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1086af6 commit 0aeec60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/gem/i915_gem_shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,14 @@ __i915_gem_object_release_shmem(struct drm_i915_gem_object *obj,
369369

370370
__start_cpu_write(obj);
371371
/*
372-
* On non-LLC platforms, force the flush-on-acquire if this is ever
372+
* On non-LLC igfx platforms, force the flush-on-acquire if this is ever
373373
* swapped-in. Our async flush path is not trust worthy enough yet(and
374374
* happens in the wrong order), and with some tricks it's conceivable
375375
* for userspace to change the cache-level to I915_CACHE_NONE after the
376376
* pages are swapped-in, and since execbuf binds the object before doing
377377
* the async flush, we have a race window.
378378
*/
379-
if (!HAS_LLC(i915))
379+
if (!HAS_LLC(i915) && !IS_DGFX(i915))
380380
obj->cache_dirty = true;
381381
}
382382

0 commit comments

Comments
 (0)