drm/i915: Refactor shmem pread setup
authorBrad Volkin <bradley.d.volkin@intel.com>
Tue, 18 Feb 2014 18:15:45 +0000 (10:15 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 7 Mar 2014 21:36:59 +0000 (22:36 +0100)
commit4c914c0c7c787b8f730128a8cdcca9c50b0784ab
treef510536f90a2f9f0d2d945e4971154a0da9ccb8d
parent922044c9dfec40d5adc5d4a757f802e55e3d0a85
drm/i915: Refactor shmem pread setup

The command parser is going to need the same synchronization and
setup logic, so factor it out for reuse.

v2: Add a check that the object is backed by shmem

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c