summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index f9756a9710a6..61b1a5f1e855 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1512,6 +1512,8 @@ eb_select_ring(struct drm_i915_private *dev_priv,
*/
static int i915_early_fence_wait(struct intel_engine_cs *ring, int fence_fd)
{
+ struct drm_i915_private *dev_priv = to_i915(ring->dev);
+ struct i915_scheduler *scheduler = dev_priv->scheduler;
struct sync_fence *fence;
int ret = 0;
@@ -1533,8 +1535,12 @@ static int i915_early_fence_wait(struct intel_engine_cs *ring, int fence_fd)
* because the the mutex lock has not yet been acquired and
* the wait is interruptible.
*/
- if (!i915_safe_to_ignore_fence(ring, fence))
+ if (i915_safe_to_ignore_fence(ring, fence))
+ scheduler->stats[ring->id].fence_ignore++;
+ else {
+ scheduler->stats[ring->id].fence_wait++;
ret = sync_fence_wait(fence, -1);
+ }
sync_fence_put(fence);
return ret;