OSDN Git Service

drm/i915: Move pinning of dev_priv->kernel_context into its creator
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 May 2016 13:53:38 +0000 (14:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 May 2016 14:28:55 +0000 (15:28 +0100)
commitc6aab9161a0343e63f44043cf22b6d67a3250143
tree18fc3c484d5dabcc5d55170b4619f64c87ede92e
parent9021ad03d05710192f6d50f6732b9d2354113cd0
drm/i915: Move pinning of dev_priv->kernel_context into its creator

Rather than have every context ask "am I owned by the kernel? pin!",
move that logic into the creator of the kernel context, in order to
improve code comprehension.

v2: Throw away the user_handle on failure to allocate the ppgtt.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464098023-3294-5-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c