drm/i915: Use shorter route to dev_private where possible
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 17 Mar 2016 13:04:10 +0000 (13:04 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 18 Mar 2016 09:50:37 +0000 (09:50 +0000)
commit39dabecd991b0a914f044af5824774825fb0923e
treef2347132c2470201eddb48773a1de84079f0dbaf
parenta112dbad44c4584ca565333d58d1bbb38799c12d
drm/i915: Use shorter route to dev_private where possible

Where we have a request we can use req->i915 directly instead
of going through the engine and device. Coccinelle script:

@@
function f;
identifier r;
@@
f(..., struct drm_i915_gem_request *r, ...)
{
...
- engine->dev->dev_private
+ r->i915
...
}
@@
struct drm_i915_gem_request *req;
@@
(
  req->
- engine->dev->dev_private
+ i915
)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1458219850-21007-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c