From patchwork Fri Oct 2 11:40:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Abriou X-Patchwork-Id: 7314881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 48A2A9F32B for ; Fri, 2 Oct 2015 11:41:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6CE1D20887 for ; Fri, 2 Oct 2015 11:41:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C130020618 for ; Fri, 2 Oct 2015 11:41:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42B7B6EDB2; Fri, 2 Oct 2015 04:41:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E22E6EDC2 for ; Fri, 2 Oct 2015 04:41:11 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id t92BcRD8032747; Fri, 2 Oct 2015 13:40:59 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 1x7vaawgwa-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 02 Oct 2015 13:40:59 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 367F83A; Fri, 2 Oct 2015 11:40:39 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6E0A61778; Fri, 2 Oct 2015 11:40:57 +0000 (GMT) Received: from localhost (10.201.23.35) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 2 Oct 2015 13:40:57 +0200 From: Vincent Abriou To: Subject: [PATCH 2/2] Revert "drm/core: Preserve the framebuffer after removing it." Date: Fri, 2 Oct 2015 13:40:39 +0200 Message-ID: <1443786039-12040-2-git-send-email-vincent.abriou@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443786039-12040-1-git-send-email-vincent.abriou@st.com> References: <1443786039-12040-1-git-send-email-vincent.abriou@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.35] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-10-02_08:2015-10-02, 2015-10-02, 1970-01-01 signatures=0 Cc: Daniel Vetter , Fabien Dessenne , Benjamin Gaignard , Vincent Abriou X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: David Herrmann Cc: Daniel Vetter Signed-off-by: Vincent Abriou --- 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); } }