Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp840860yba; Thu, 18 Apr 2019 10:25:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzR1jc4xc7szuTDUkgTifedeQnwBQrjiT9ho8lDShA5Y8r90AjWAEYZWlzRXJrCE1B+I/vw X-Received: by 2002:a65:60ca:: with SMTP id r10mr12349093pgv.64.1555608312083; Thu, 18 Apr 2019 10:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555608312; cv=none; d=google.com; s=arc-20160816; b=pp16teLKwuFTVg1xbvNvvrWqnyCx3VGfWNlSsFPVV46gprpbLzIrRdxnP8uEGSi0LO 0itoiTzAPxfau0MSKtTYIGKsQK0Pf0SVpoYeHLFV6x/r1x6FD/xgtlCNJooJ/O5fgvfm bHzBor3Y4MV9sacvpBDcihQbxHqYE0IGmvC7zvFZ2SxlMgu+7rndrikCINr5HO4hri2i ob4NMfbQwwAa8wSQPRzZcFsoYUm++yPcDyP1YNCmiJS7Tnnw2cda7xdfwx1W+xJWnms6 bR8n6LM3QX8JUka4dgcsikup3ogFPqOUqDD7Ny4wSDIwOIjPC2B4Z+NHo5UHLzSAIBBE ICRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=djjvvefw7ULkztYGiVOQ2HFZUVmLC9lhqE6uCzCS8sk=; b=YjVS5KHEKFWtB8V4ow9QobtdjiAGKGSFqnT5rsxYM6Ojzbk4IEcHE0hAXOs4A7fK+q eWLkW8tr3cnY0x6KTneefiQm/Imi77LZoJGr2LFMlK3ZD6CzTNxWnHvF5Ix0aVa3BCsv dxbzzq/HvB/3Sapnh4D7M0ism6MkR5tceyfKekKtUHU0XgjwjJdJnEAGevLDqdE1KpZJ MWPqOuO5nTHsaQPA3Rn96tzIKr8WV7TEz/FQUMwD89NEU9D/YwIyC897n6wx2tjm5sPf CM0Z1hxOO+pBPCtgAAcDk7I6ZT6B8TedrwgwKT+CrDCKOzL/rQT1sm/O1leE6CasQQd4 GH7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si2580693plo.349.2019.04.18.10.24.56; Thu, 18 Apr 2019 10:25:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389774AbfDRRXJ (ORCPT + 99 others); Thu, 18 Apr 2019 13:23:09 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:59349 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733067AbfDRRXJ (ORCPT ); Thu, 18 Apr 2019 13:23:09 -0400 Received: from collins (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0FF17200009; Thu, 18 Apr 2019 17:23:05 +0000 (UTC) Message-ID: Subject: Re: [linux-sunxi] [PATCH 3/3] drm/sun4i: Fix component unbinding and component master deletion From: Paul Kocialkowski To: Chen-Yu Tsai Cc: dri-devel , linux-arm-kernel , linux-kernel , linux-sunxi , Maxime Ripard , David Airlie , Daniel Vetter , Thomas Petazzoni Date: Thu, 18 Apr 2019 19:23:05 +0200 In-Reply-To: References: <20190418132727.5128-1-paul.kocialkowski@bootlin.com> <20190418132727.5128-4-paul.kocialkowski@bootlin.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le jeudi 18 avril 2019 à 08:03 -0700, Chen-Yu Tsai a écrit : > On Thu, Apr 18, 2019 at 6:27 AM Paul Kocialkowski > wrote: > > For our component-backed driver to be properly removed, we need to > > delete the component master in sun4i_drv_remove and make sure to call > > component_unbind_all in the master's unbind so that all components are > > unbound when the master is. > > > > Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") > > Signed-off-by: Paul Kocialkowski > > --- > > drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c > > index af07291544a4..0ea365e54de1 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_drv.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c > > @@ -137,6 +137,8 @@ static void sun4i_drv_unbind(struct device *dev) > > drm_mode_config_cleanup(drm); > > of_reserved_mem_device_release(dev); > > drm_dev_put(drm); > > + > > + component_unbind_all(dev, NULL); > > Shouldn't this be before drm_dev_put? Everything being in reverse order > of the complement calls in the bind function and all. The component > drivers might still be using the drm dev before they are unbound. Mhh, yes that's a valid concern, thanks for pointing it out. I'll send out a fix for it tomorrow. Cheers, Paul > ChenYu > > > } > > > > static const struct component_master_ops sun4i_drv_master_ops = { > > @@ -385,6 +387,8 @@ static int sun4i_drv_probe(struct platform_device *pdev) > > > > static int sun4i_drv_remove(struct platform_device *pdev) > > { > > + component_master_del(&pdev->dev, &sun4i_drv_master_ops); > > + > > return 0; > > } > > > > -- > > 2.21.0 > > > > -- > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout.