[PATCH 2/2] Revert "drm/core: Preserve the framebuffer after removing it."

Vincent Abriou vincent.abriou at st.com
Fri Oct 2 04:40:39 PDT 2015


This reverts commit 13803132818cf8084d169617be060fd8e3411a98.

This patch need to be revert because it breaks middlewares way of working.
As example, modetest and weston, only relies on drmModeRmFB to close
CRTC or planes.
Keeping this patch will induce weird behavior like a plane displayed
with modetest will be visible on weston and vice-versa.

We can overcome this by updating the middleware (successfully tested
with modetest) to force them to disable CRTC and plane using
drmModeSetCrtc or drmModeSetPlane.
But it is a long to way and for short term, it is not acceptable to break
ABI.

Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: David Herrmann <dh.herrmann at gmail.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Vincent Abriou <vincent.abriou at st.com>
---
 drivers/gpu/drm/drm_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 626b0a5..9b9c4b4 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3327,7 +3327,7 @@ int drm_mode_rmfb(struct drm_device *dev,
 	mutex_unlock(&dev->mode_config.fb_lock);
 	mutex_unlock(&file_priv->fbs_lock);
 
-	drm_framebuffer_unreference(fb);
+	drm_framebuffer_remove(fb);
 
 	return 0;
 
@@ -3517,7 +3517,7 @@ void drm_fb_release(struct drm_file *priv)
 		list_del_init(&fb->filp_head);
 
 		/* This will also drop the fpriv->fbs reference. */
-		drm_framebuffer_unreference(fb);
+		drm_framebuffer_remove(fb);
 	}
 }
 
-- 
1.9.1



More information about the dri-devel mailing list