[Intel-gfx] [PATCH 2/3] drm/i915: Fix fence leaks if fbdev setup fails

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Tue Jan 28 13:51:55 CET 2014


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

We pin and fence the object using intel_pin_fenced_fb_obj() but
just went ahead and unpinned it directly from the gtt. Make the
destruction symmetric by using intel_unpin_fenced_fb_obj().

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_fbdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index ea5ca6b..51b41c5 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -104,7 +104,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
 	return 0;
 
 out_unpin:
-	i915_gem_object_ggtt_unpin(obj);
+	intel_unpin_fenced_fb_obj(obj);
 out_unref:
 	drm_gem_object_unreference(&obj->base);
 out:
@@ -208,7 +208,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	return 0;
 
 out_unpin:
-	i915_gem_object_ggtt_unpin(obj);
+	intel_unpin_fenced_fb_obj(obj);
 	drm_gem_object_unreference(&obj->base);
 out_unlock:
 	mutex_unlock(&dev->struct_mutex);
-- 
1.8.3.2




More information about the Intel-gfx mailing list