From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Subject: Re: [PATCH] drm/rockchip: shutdown drm subsystem on shutdown Date: Mon, 10 Sep 2018 11:08:51 +0200 Message-ID: <8854779.AqCTpcZcc2@phil> References: <5B20F5F0.9090101@rock-chips.com> <20180909144300.3908a11b@why.wild-wind.fr.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180909144300.3908a11b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@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: Marc Zyngier Cc: "open list:ARM/Rockchip SoC..." , JeffyChen , Robin Murphy , Vicente Bergas , Tomasz Figa List-Id: linux-rockchip.vger.kernel.org Am Sonntag, 9. September 2018, 15:43:00 CEST schrieb Marc Zyngier: > On Tue, 7 Aug 2018 18:20:15 +0200 > Vicente Bergas wrote: > > > On Tue, Aug 7, 2018 at 6:07 PM, Heiko Stuebner wrote: > > > Am Dienstag, 7. August 2018, 18:05:13 CEST schrieb Vicente Bergas: > > >> Hi Heiko, Jeffy, Marc, > > >> > > >> On Tue, Aug 7, 2018 at 2:44 PM, Heiko Stuebner wrote: > > >> > Hi Vicente, > > >> > > > >> > Am Sonntag, 5. August 2018, 16:09:11 CEST schrieb Vicente Bergas: > > >> >> As explained by Robin Murphy: > > >> >> > the IOMMU shutdown disables paging, so if the VOP is still > > >> >> > scanning out then that will result in whatever IOVAs it was using now going > > >> >> > straight out onto the bus as physical addresses. > > >> >> > > >> >> Suggested-by: JeffyChen > > >> >> Suggested-by: Robin Murphy > > >> >> Signed-off-by: Vicente Bergas > > >> >> --- > > >> >> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 9 +++++++++ > > >> >> 1 file changed, 9 insertions(+) > > >> >> > > >> >> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > > >> >> index f814d37b1db2..00a06768edb2 100644 > > >> >> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > > >> >> +++ 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); > > >> > > > >> > I tend to side with Marc's more drastic approach, especially as this one > > >> > should also nicely unbind the encoders used. Are you ok with us going > > >> > with Marc's patch or do you have concerns? > > >> > > >> The patch i posted comes from Jeffy, as is, no modifications. > > >> So, if he has no concerns about it, then it is also fine for me. > > >> > > >> > > > >> > Providing a Tested-by tag would also be great ;-) > > >> > > >> OK, i'll reply to his patch with a Tested-by tag, but i was only > > >> aware of this issue affecting hdmi on power-off, so, the only testing > > >> performed was checking only this. I have done no kexec-related test. > > >> > > >> Only one issue related to this: Marc, how can i reply to your patch > > >> if i was not a recipient? > > > > > > You can also just post it here. Together with Sandy I'm carrying the > > > drm-maintainer hat, so I'm probably the one that applies either one > > > of the patches and can pick up a tag from here as well :-D > > > > > > > > > Heiko > > > > OK, perfect, so, for this patch: > > https://www.spinics.net/lists/arm-kernel/msg670229.html > > here is my > > Tested-by: Vicente Bergas > > tag. > > As said, i only tested that on shutdown, the hdmi output > > is also shut down instead of showing random noise. > > Any update on this patch? I was hoping to see it in 4.18, but so far > nothing has happened. it somehow slipped through my grasp, but I've applied it now. With a stable tag added so it should also trickle down to some stable kernels hopefully. Sorry for the holdup Heiko