From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vicente Bergas Subject: Re: [regression] HDMI breakage just before poweroff Date: Fri, 15 Jun 2018 18:39:41 +0200 Message-ID: References: <5AEA873A.7080701@rock-chips.com> <0284fa4f-abd6-26f6-31e2-1a6d24777733@arm.com> <5B1F4375.7000000@rock-chips.com> <77e4c6e1-015f-5fac-66b6-c942bb2dc9d8@arm.com> <5B1F9FF7.5070203@rock-chips.com> <86efhc8dyg.wl-marc.zyngier@arm.com> <5B20F5F0.9090101@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5B20F5F0.9090101-TNX95d0MmH7DzftRWevZcw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: JeffyChen Cc: =?UTF-8?Q?Heiko_St=C3=BCbner?= , Marc Zyngier , Sandy Huang , Tomasz Figa , "open list:ARM/Rockchip SoC..." , Klaus Goger , Sean Paul , Robin Murphy , Jakob Unterwurzacher List-Id: linux-rockchip.vger.kernel.org On Wed, Jun 13, 2018 at 12:46 PM, JeffyChen wrote: > Hi Marc & Vicente, > > On 06/13/2018 06:26 PM, Marc Zyngier wrote: >>> >>> > >>> >--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c >>> >+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c >>> >@@ -451,6 +451,7 @@ >>> > static struct platform_driver rockchip_drm_platform_driver = { >>> > .probe = rockchip_drm_platform_probe, >>> > .remove = rockchip_drm_platform_remove, >>> >+ .shutdown = (void (*)(struct platform_device >>> >*))rockchip_drm_platform_remove, >> >> No, please...:-( Provide a wrapper that returns void instead. > > > hmmm, this is just a test only hack, i am thinking maybe > drm_atomic_helper_shutdown is enough for shutdown() ? > > > something like: > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > @@ -442,6 +442,14 @@ static int rockchip_drm_platform_remove(struct > platform_device *pdev) > return 0; > } > > +static void rockchip_drm_platform_shutdown(struct platform_device *pdev) > +{ > + struct drm_device *drm = platform_get_drvdata(pdev); > + > + if (drm) > + drm_atomic_helper_shutdown(drm); > +} > + > Hi, I can confirm that rockchip_drm_platform_shutdown works as fine as rockchip_drm_platform_remove. Just a note: The first time I noticed this error was because it appeared on display, now that the display is off, are we sure the error is fixed? Also, could there be other peripherals that need to be powered off before the iommu? For curiosity: why is the iommu disabled before kexec instead of resetting it after kexec? Regards, Vicente.