diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-03-17 16:04:10 +0300 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-03-18 12:50:37 +0300 |
commit | 39dabecd991b0a914f044af5824774825fb0923e (patch) | |
tree | f2347132c2470201eddb48773a1de84079f0dbaf /drivers/gpu/drm/i915/i915_gem.c | |
parent | a112dbad44c4584ca565333d58d1bbb38799c12d (diff) | |
download | linux-39dabecd991b0a914f044af5824774825fb0923e.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 85963b0407b2..f45856d7084c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2550,7 +2550,7 @@ void __i915_add_request(struct drm_i915_gem_request *request, return; engine = request->engine; - dev_priv = engine->dev->dev_private; + dev_priv = request->i915; ringbuf = request->ringbuf; /* |