diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2014-11-24 13:49:30 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-03 03:35:16 -0500 |
commit | b6660d59f66835e4e99eaa772ea4cb74f96f4de3 (patch) | |
tree | 1989fffc54dcebbf92cb6598437e88c98effcb13 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 6259cead57ebc19325183f8fd9968e19fc2fbe53 (diff) |
drm/i915: Make 'i915_gem_check_olr' actually check by request not seqno
Updated the _check_olr() function to actually take a request object and compare
it to the OLR rather than extracting seqnos and comparing those.
Note that there is one use case where the request object being processed is no
longer available at that point in the call stack. Hence a temporary copy of the
original function is still present (but called _check_ols() instead). This will
be removed in a subsequent patch.
Also, downgraded a BUG_ON to a WARN_ON as apparently the former is frowned upon
for shipping code.
For: VIZ-4377
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4924f1d3d4b4..e6a997cd0cd0 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -2577,7 +2577,7 @@ bool i915_gem_retire_requests(struct drm_device *dev); | |||
2577 | void i915_gem_retire_requests_ring(struct intel_engine_cs *ring); | 2577 | void i915_gem_retire_requests_ring(struct intel_engine_cs *ring); |
2578 | int __must_check i915_gem_check_wedge(struct i915_gpu_error *error, | 2578 | int __must_check i915_gem_check_wedge(struct i915_gpu_error *error, |
2579 | bool interruptible); | 2579 | bool interruptible); |
2580 | int __must_check i915_gem_check_olr(struct intel_engine_cs *ring, u32 seqno); | 2580 | int __must_check i915_gem_check_olr(struct drm_i915_gem_request *req); |
2581 | 2581 | ||
2582 | static inline bool i915_reset_in_progress(struct i915_gpu_error *error) | 2582 | static inline bool i915_reset_in_progress(struct i915_gpu_error *error) |
2583 | { | 2583 | { |
@@ -3117,4 +3117,20 @@ wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms) | |||
3117 | } | 3117 | } |
3118 | } | 3118 | } |
3119 | 3119 | ||
3120 | /* XXX: Temporary solution to be removed later in patch series. */ | ||
3121 | static inline int __must_check i915_gem_check_ols( | ||
3122 | struct intel_engine_cs *ring, u32 seqno) | ||
3123 | { | ||
3124 | int ret; | ||
3125 | |||
3126 | WARN_ON(!mutex_is_locked(&ring->dev->struct_mutex)); | ||
3127 | |||
3128 | ret = 0; | ||
3129 | if (seqno == i915_gem_request_get_seqno(ring->outstanding_lazy_request)) | ||
3130 | ret = i915_add_request(ring, NULL); | ||
3131 | |||
3132 | return ret; | ||
3133 | } | ||
3134 | /* XXX: Temporary solution to be removed later in patch series. */ | ||
3135 | |||
3120 | #endif | 3136 | #endif |