diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-12 11:29:47 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-12 12:36:43 +0200 |
commit | b8c3af766b7f9350c581bb44e6ffaaabc8c1c198 (patch) | |
tree | f02f0ae2972d497e4c92f66afd79c5a27eaa7ce0 /drivers/gpu/drm/i915/i915_drv.h | |
parent | a43adf0747ecde0d211f29adcbebf067f92e9cbb (diff) | |
download | op-kernel-dev-b8c3af766b7f9350c581bb44e6ffaaabc8c1c198.zip op-kernel-dev-b8c3af766b7f9350c581bb44e6ffaaabc8c1c198.tar.gz |
drm/i915: WARN if the fence pin_count is invalid
Stéphane Marchesin found a bug where the fences were not being restored,
and in particular the fence pin_count was incorrect. Had we had a
warning in place, this bug would have come to light much earlier. Better
late than never?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Stéphane Marchesin <marcheu@chromium.org>
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index eaa04a6..e5b8ae4 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1703,6 +1703,7 @@ i915_gem_object_unpin_fence(struct drm_i915_gem_object *obj) { if (obj->fence_reg != I915_FENCE_REG_NONE) { struct drm_i915_private *dev_priv = obj->base.dev->dev_private; + WARN_ON(dev_priv->fence_regs[obj->fence_reg].pin_count <= 0); dev_priv->fence_regs[obj->fence_reg].pin_count--; } } |