linux/drivers/gpu/drm/i915/gem
Chris Wilson cb6d7c7dc7 drm/i915/userptr: Acquire the page lock around set_page_dirty()
set_page_dirty says:

	For pages with a mapping this should be done under the page lock
	for the benefit of asynchronous memory errors who prefer a
	consistent dirty state. This rule can be broken in some special
	cases, but should be better not to.

Under those rules, it is only safe for us to use the plain set_page_dirty
calls for shmemfs/anonymous memory. Userptr may be used with real
mappings and so needs to use the locked version (set_page_dirty_lock).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
Fixes: 5cc9ed4b9a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
References: 6dcc693bc5 ("ext4: warn when page is dirtied without buffers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
2019-07-09 08:16:25 +01:00
..
selftests drm/i915/selftests: Be engine agnostic 2019-07-04 22:55:00 +01:00
i915_gem_busy.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_clflush.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_clflush.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_client_blt.c drm/i915/gem: Clear read/write domains for GPU clear 2019-06-24 18:20:20 +01:00
i915_gem_client_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_context_types.h drm/i915: Rename i915_timeline to intel_timeline and move under gt 2019-06-21 13:48:53 +01:00
i915_gem_context.c drm/i915/gt: Pull engine w/a initialisation into common 2019-07-04 19:22:11 +01:00
i915_gem_context.h drm/i915: Keep contexts pinned until after the next kernel context switch 2019-06-14 19:03:32 +01:00
i915_gem_dmabuf.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_domain.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_gem_execbuffer.c drm/i915/gt: Pass intel_gt to pm routines 2019-06-25 20:17:22 +01:00
i915_gem_fence.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_internal.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_gem_ioctls.h
i915_gem_mman.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_gem_object_blt.c drm/i915: Pull kref into i915_address_space 2019-06-11 11:44:24 +01:00
i915_gem_object_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_object_types.h drm/i915: Throw away the active object retirement complexity 2019-06-21 19:47:51 +01:00
i915_gem_object.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_object.h drm/i915: Throw away the active object retirement complexity 2019-06-21 19:47:51 +01:00
i915_gem_pages.c drm/i915: Combine unbound/bound list tracking for objects 2019-06-12 13:36:43 +01:00
i915_gem_phys.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_pm.c drm/i915: Lift intel_engines_resume() to callers 2019-06-26 18:01:01 +01:00
i915_gem_pm.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_shmem.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_shrinker.c drm/i915/gem: Free pages before rcu-freeing the object 2019-07-03 11:46:47 +01:00
i915_gem_stolen.c drm/i915/gem: Defer obj->base.resv fini until RCU callback 2019-07-04 15:34:35 +01:00
i915_gem_throttle.c drm/i915: Move GEM client throttling to its own file 2019-05-28 12:45:29 +01:00
i915_gem_tiling.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_userptr.c drm/i915/userptr: Acquire the page lock around set_page_dirty() 2019-07-09 08:16:25 +01:00
i915_gem_wait.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gemfs.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gemfs.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
Makefile drm/i915: add header search path to subdir Makefiles 2019-06-27 10:25:48 +03:00
Makefile.header-test