drm/i915: Make i915_gem_object_phys_attach() use obj->mm.lock more appropriately
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 26 Jul 2017 16:00:37 +0000 (17:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 27 Jul 2017 07:56:10 +0000 (09:56 +0200)
commit6ea1d55d31c46e2158a49e8e41cb0be4a8cd8677
tree367b21a7ce44869b828a9fb719ada7ee8b383957
parentfd70075f82b7f471ff923a56dea00fb44463296c
drm/i915: Make i915_gem_object_phys_attach() use obj->mm.lock more appropriately

Actually transferring from shmemfs to the physically contiguous set of
pages should be wholly guarded by its obj->mm.lock!

v2: Remember to free the old pages.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170726160038.29487-2-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c