From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joonyoung Shim Subject: Re: [PATCH] drm: Destroy the planes prior to destroying the associated CRTC Date: Thu, 20 Sep 2012 11:52:58 +0900 Message-ID: <505A850A.4010205@samsung.com> References: <1347874683-21191-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D4949E73F for ; Wed, 19 Sep 2012 19:52:52 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAM00A8JNZ3HX30@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 20 Sep 2012 11:52:50 +0900 (KST) Received: from [10.90.51.60] by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAM00K6BO027F00@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 20 Sep 2012 11:52:50 +0900 (KST) In-reply-to: <1347874683-21191-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: airlied@redhat.com, stable@vger.kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 09/17/2012 06:38 PM, Chris Wilson wrote: > As during the plane cleanup, we wish to disable the hardware and > so may modify state on the associated CRTC, that CRTC must continue to > exist until we are finished. A similar issue can occur in the drm_framebuffer_cleanup(). If crtc and plane use same framebuffer and the framebuffer is destroyed, crtc is turned off prior to turning off plane. > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54101 > Signed-off-by: Chris Wilson > Cc: Jesse Barnes > Cc: stable@vger.kernel.org > --- > drivers/gpu/drm/drm_crtc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 6fbfc24..af81f77 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -1034,15 +1034,15 @@ void drm_mode_config_cleanup(struct drm_device *dev) > fb->funcs->destroy(fb); > } > > - list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) { > - crtc->funcs->destroy(crtc); > - } > - > list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list, > head) { > plane->funcs->destroy(plane); > } > > + list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) { > + crtc->funcs->destroy(crtc); > + } > + > idr_remove_all(&dev->mode_config.crtc_idr); > idr_destroy(&dev->mode_config.crtc_idr); > }