drm/i915: Deny wrapping an userptr into a framebuffer
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 13 Oct 2015 13:22:26 +0000 (14:22 +0100)
committerJani Nikula <jani.nikula@intel.com>
Tue, 13 Oct 2015 14:05:56 +0000 (17:05 +0300)
commitcc917ab43541db3ff66d0136042686d40a1b4c9a
tree5059823944212a86fd7ec9ef377eb8d7ff833d6a
parentc2b63374461c0986147902f719c26412d1f26fbc
drm/i915: Deny wrapping an userptr into a framebuffer

Pinning a userptr onto the hardware raises interesting questions about
the lifetime of such a surface as the framebuffer extends that life
beyond the client's address space. That is the hardware will need to
keep scanning out from the backing storage even after the client wants
to remap its address space. As the hardware pins the backing storage,
the userptr becomes invalid and this raises a WARN when the clients
tries to unmap its address space. The situation can be even more
complicated when the buffer is passed between processes, between a
client and display server, where the lifetime and hardware access is
even more confusing. Deny it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem_userptr.c
drivers/gpu/drm/i915/intel_display.c