aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-12-02 04:13:46 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-04 10:13:50 -0500
commitb6aa0873614dff74b01e18095fd335fbb1fb777c (patch)
treeeaa0f7f3c11ad7daed3f14e6b025331c8126a3dc
parentd8578836ad2ebaaf0a899c72d12201009e0ad1e5 (diff)
drm/i915: Fix RPS pointer passed from wait_ioctl to i915_wait_request
In commit 2e1b873072dfe3bbcc158a9c21acde1ab0d36c55 [v4.2] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Apr 27 13:41:22 2015 +0100 drm/i915: Convert RPS tracking to a intel_rps_client struct we converted the __i915_wait_request() to take a new intel_rps_client struct (rather than having to pass fake drm_i915_file_private structs). However, due to use of passing a void pointer, I didn't spot one callsite in wait-ioctl was passing the wrong pointer. Fwiw, the impact of this bug is zero. Along the rps path, we always first call list_empty(rps) which when we pass in the wrong pointer always evaluates to false and we return early and never chase the invalid pointers. The user visible impact is then wait-ioctl doesn't get the same waitboosting as the other interfaces (set-domain, throttle), which is a performance concern for the *very* few users of the wait interface. There is also a libdrm_intel patch to use the wait-ioctl for drm_intel_bo_wait_rendering() if anyone feels inclined to review libdrm_intel patches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> [danvet: Add Chris' explanation for why the impact of this is pretty close to 0.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
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 6356c347ede0..ef4dbe3d442d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3064,7 +3064,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
3064 if (ret == 0) 3064 if (ret == 0)
3065 ret = __i915_wait_request(req[i], reset_counter, true, 3065 ret = __i915_wait_request(req[i], reset_counter, true,
3066 args->timeout_ns > 0 ? &args->timeout_ns : NULL, 3066 args->timeout_ns > 0 ? &args->timeout_ns : NULL,
3067 file->driver_priv); 3067 to_rps_client(file));
3068 i915_gem_request_unreference__unlocked(req[i]); 3068 i915_gem_request_unreference__unlocked(req[i]);
3069 } 3069 }
3070 return ret; 3070 return ret;