OSDN Git Service

drm/i915: pwrite/pread do not require obj->base.filp, just pages
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jun 2016 14:05:52 +0000 (15:05 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jun 2016 14:58:08 +0000 (15:58 +0100)
commit6eae0059f9a4513c8dd3e3e08c1f65727d22fff7
treef2c7dff95649b0eb56fe4bb749aea7e48566ce6e
parentb9bcd14a2b91be73d694b3e809d54a287232839e
drm/i915: pwrite/pread do not require obj->base.filp, just pages

The idea behind relaxing the restriction for pread/pwrite was to handle
!obj->base.flip, i.e. non-shmemfs backed objects, which only requires
that the object provide struct pages.

v2: Remove excess (). Note enough editing after copy'n'paste.
v3: Use new i915_gem_object_has_struct_page()

Testcase: igt/prime_vgem/read
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466431552-17860-2-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c