]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: Check for get_pages instead of shmem (filp)
authorBen Widawsky <benjamin.widawsky@intel.com>
Tue, 9 Feb 2016 19:44:12 +0000 (11:44 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 15 Feb 2016 17:26:52 +0000 (18:26 +0100)
commit1db6e2e7dc2739181bd55c3c41263634803b3cc9
tree6b9bb684fc37d028e1d29bda1e6c3f8c1f87b16e
parentb31e51360e88f8f9831a153cf72d1aced952dffb
drm/i915: Check for get_pages instead of shmem (filp)

This behavior of checking for a shmem backed GEM object was introduced here:
commit 4c914c0c7c787b8f730128a8cdcca9c50b0784ab
Author: Brad Volkin <bradley.d.volkin@intel.com>
Date:   Tue Feb 18 10:15:45 2014 -0800

    drm/i915: Refactor shmem pread setup

It is possible for an object to not be a shmem backed GEM object (for example
userptr objects). An example of how we hit this failure can be found through
copy_batch() in the command parser because we allocate a userptr object for the
batch which contains privileged instructions. Userptr calls
drm_gem_private_object_init() which explicitly sets the filp to none.

NOTE: I manually retyped this from a test machine. So I haven't even compiled
this exact patch.

v2: Use same logic as from a2a4f916c2f (Kristian, Dave Gordon)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Dave Gordon <david.s.gordon@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1455047053-2644-1-git-send-email-benjamin.widawsky@intel.com
drivers/gpu/drm/i915/i915_gem.c