Message ID | 20180912185252.27191-2-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] drm/i915: Balance prepare_fb/cleanup_fb | expand |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1333493c0618..947301312ea3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13188,7 +13188,7 @@ intel_prepare_plane_fb(struct drm_plane *plane, false, I915_FENCE_TIMEOUT, GFP_KERNEL); if (ret < 0) - return ret; + goto unpin_fb; fence = reservation_object_get_excl_rcu(obj->resv); if (fence) { @@ -13213,6 +13213,13 @@ intel_prepare_plane_fb(struct drm_plane *plane, } return 0; + +unpin_fb: + mutex_lock(&dev_priv->drm.struct_mutex); + intel_plane_unpin_fb(to_intel_plane_state(new_state)); + mutex_unlock(&dev_priv->drm.struct_mutex); + + return ret; } /**