Commit 5028851c authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Mark contents as dirty on a write fault

Since dropping the set-to-gtt-domain in commit a679f58d ("drm/i915:
Flush pages on acquisition"), we no longer mark the contents as dirty on
a write fault. This has the issue of us then not marking the pages as
dirty on releasing the buffer, which means the contents are not written
out to the swap device (should we ever pick that buffer as a victim).
Notably, this is visible in the dumb buffer interface used for cursors.
Having updated the cursor contents via mmap, and swapped away, if the
shrinker should evict the old cursor, upon next reuse, the cursor would
be invisible.

E.g. echo 80 > /proc/sys/kernel/sysrq ; echo f > /proc/sysrq-trigger

Fixes: a679f58d

 ("drm/i915: Flush pages on acquisition")
Signed-off-by: default avatarChris Wilson <>
Cc: Matthew Auld <>
Cc: Ville Syrjälä <>
Cc: <> # v5.2+
Reviewed-by: default avatarMatthew Auld <>
parent e2144503
......@@ -319,7 +319,11 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
if (write) {
obj->mm.dirty = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment