[PATCH 05/11] drm/i915: move pin & fence for plane past potential error paths
Jesse Barnes
jbarnes at virtuousgeek.org
Tue Oct 25 02:47:00 PDT 2011
This avoids the need to unpin on the error path.
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_overlay2.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_overlay2.c b/drivers/gpu/drm/i915/intel_overlay2.c
index 2e38b15..e583bd0 100644
--- a/drivers/gpu/drm/i915/intel_overlay2.c
+++ b/drivers/gpu/drm/i915/intel_overlay2.c
@@ -62,9 +62,6 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
old_obj = intel_plane->obj;
mutex_lock(&dev->struct_mutex);
- ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
- if (ret)
- goto out_unlock;
dvscntr = I915_READ(reg);
@@ -104,6 +101,10 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
goto out_unlock;
}
+ ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
+ if (ret)
+ goto out_unlock;
+
intel_plane->obj = obj;
dvscntr |= DVS_TILED;
--
1.7.4.1
More information about the dri-devel
mailing list