]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Mark contents as dirty on a write fault
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Sep 2019 12:18:21 +0000 (13:18 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 7 Oct 2019 17:44:52 +0000 (10:44 -0700)
commit0ec28adbaf19d766c8da00a8cb0f1f6638506b24
treecd0500722f5ee26de24e2cf6c367ce54430f0a57
parent3f23e8cf64c63dffe9705170042a9be500ecd4f0
drm/i915: Mark contents as dirty on a write fault

Since dropping the set-to-gtt-domain in commit ab1030e9a338 ("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

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111541
Fixes: ab1030e9a338 ("drm/i915: Flush pages on acquisition")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.2+
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190920121821.7223-1-chris@chris-wilson.co.uk
(cherry picked from commit 5028851cdfdf78dc22eacbc44a0ab0b3f599ee4a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_mman.c