]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Remove insert-page shortcut from execbuf relocate_iomap()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 28 Oct 2016 14:27:56 +0000 (15:27 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 28 Oct 2016 19:53:31 +0000 (20:53 +0100)
commit47900a703db5d7db0ce7f6d7f3a714bfa9b79493
tree36f042367d87b258fa2059297a2f483519b7ed93
parenta48bb4d7b17b9553de7c54d930e010cf1c144427
drm/i915: Remove insert-page shortcut from execbuf relocate_iomap()

We are not allowed to touch the GTT entries underneath an atomic section,
as they take a rpm wakelock (which is illegal from atomic context) and
in the near future acquiring the DMA address for a page within an object
may sleep for an allocation. This makes the current shortcircuit in
relocation_iomap() for performing a second relocation on an adjacent page
illegal, and we need to release the atomic iomapping, lookup the DMA,
insert it into the GTT before reentering the atomic iomap section.

As it happens, this is precisely what we do on if we are using an
iomapping over the full object and not just a single page and by
removing the shortcut, we do the right thing.

Fixes: ce0f7b2ad858 ("drm/i915: Use RPM as the barrier for controlling...")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161028142756.3850-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_execbuffer.c