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

Message ID 1443786039-12040-2-git-send-email-vincent.abriou@st.com
State New
Headers show

Commit Message

Vincent Abriou Oct. 2, 2015, 11:40 a.m. UTC
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

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

diff mbox

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,
-	drm_framebuffer_unreference(fb);
+	drm_framebuffer_remove(fb);
 	return 0;
@@ -3517,7 +3517,7 @@  void drm_fb_release(struct drm_file *priv)
 		/* This will also drop the fpriv->fbs reference. */
-		drm_framebuffer_unreference(fb);
+		drm_framebuffer_remove(fb);