All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>
To: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	JeffyChen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	Tomasz Figa <tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] drm/rockchip: shutdown drm subsystem on shutdown
Date: Sun, 05 Aug 2018 19:23:58 +0100	[thread overview]
Message-ID: <861sbcr7sx.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <CAAMcf8CyUri0LigtJWvahLK62ihPUYa_UvA+2q_EA8m+TL2cqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Sun, 05 Aug 2018 18:38:18 +0100,
Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> On Sun, Aug 5, 2018 at 6:50 PM, Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org> wrote:
> > Hi Vicente,
> >
> > On Sun,  5 Aug 2018 16:09:11 +0200
> > Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >> 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 <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> >> Suggested-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> >> Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> ---
> >>  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'm not completely sure this is the right thing to do here. We want
> > shutdown to teardown the whole thing, not just the DRM context.
> >
> > The driver already calls drm_atomic_helper_shutdown as part of the
> > unbind sequence, which looks very much like what we're trying to
> > achieve here.
> 
> OK, but maybe it is calling drm_atomic_helper_shutdown too late
> because this patch makes a difference and does indeed fix the issue.

I'm not saying it doesn't fix your issue. All I'm saying is that we
may want something that is closer to a full remove than just a shallow
DRM teardown. At the moment, unbind is simply *never* called.

> Anyways, please, apply your version if you have reasons to think it
> is better suited to do the task.

That would be for the DRM maintainers to decide. For that particular
subsystem, I'm just a random contributor.

> > I've already posted a patch[1] which calls the .remove handler,
> > ensuring that the whole infrastructure gets torn down at shutdown time.
> 
> That is funny: after months of having reported the issue, we both
> sent a patch to fix it in less than 3 hours difference!

I was hoping you'd do that earlier, but given that 4.18 is just a week
away and that we still don't have a proper fix for this, I've taken
the matter into my own hands. Without this, I cannot reliably use
kexec anymore, which is just the same as not being able to boot at
all.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

  parent reply	other threads:[~2018-08-05 18:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 19:36 [regression] HDMI breakage just before poweroff Vicente Bergas
     [not found] ` <CAAMcf8D86ssM+YeFAXaYDm9QwwAQLdaOgWyC2F8yQ-_-UNyY+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-03  3:51   ` JeffyChen
     [not found]     ` <5AEA873A.7080701-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-05-03 12:14       ` Robin Murphy
     [not found]         ` <0284fa4f-abd6-26f6-31e2-1a6d24777733-5wv7dgnIgG8@public.gmane.org>
2018-05-03 15:10           ` JeffyChen
     [not found]             ` <5AEB2670.9090305-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-05-03 20:33               ` Vicente Bergas
2018-05-03 21:15           ` Vicente Bergas
2018-06-11 22:04           ` Vicente Bergas
     [not found]             ` <CAAMcf8BJ1skbmR7AazyTPkkdyMoyuA0ihj=Gbnhb9nKWf3FSGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-12  3:52               ` JeffyChen
     [not found]                 ` <5B1F4375.7000000-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-06-12  8:54                   ` Marc Zyngier
     [not found]                     ` <77e4c6e1-015f-5fac-66b6-c942bb2dc9d8-5wv7dgnIgG8@public.gmane.org>
2018-06-12 10:27                       ` JeffyChen
     [not found]                         ` <5B1F9FF7.5070203-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-06-12 10:30                           ` Tomasz Figa
     [not found]                             ` <CAAFQd5D__ArEYSVoWL5A40X6vbYxJ-vOYpsXxiLujC-XK9u2+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-12 11:02                               ` Marc Zyngier
     [not found]                                 ` <86efhc8dyg.wl-marc.zyngier-5wv7dgnIgG8@public.gmane.org>
2018-06-13  7:15                                   ` Vicente Bergas
     [not found]                                     ` <CAAMcf8AmuMStdSUHGEQhii7BUtTRHOSyLhop43rf_nX0GROnnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-13 10:26                                       ` Marc Zyngier
     [not found]                                         ` <cc147c40-dbad-b714-3fe6-858854a56004-5wv7dgnIgG8@public.gmane.org>
2018-06-13 10:46                                           ` JeffyChen
     [not found]                                             ` <5B20F5F0.9090101-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-06-15 16:39                                               ` Vicente Bergas
     [not found]                                                 ` <CAAMcf8D1-7YvOeOMd+rJOWX7XNQwKeAYjfmyAHOR8TC6vc=G1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-15 16:51                                                   ` Marc Zyngier
     [not found]                                                     ` <7ce78e65-51b6-9204-5bb4-e515e36576d4-5wv7dgnIgG8@public.gmane.org>
2018-06-15 18:46                                                       ` Vicente Bergas
     [not found]                                                         ` <CAAMcf8C3fS1SdZVKrsu9zRMn69BcAtFL44QvWMJ8zn4CySnfcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-16 10:35                                                           ` Marc Zyngier
2018-08-05 14:09                                               ` [PATCH] drm/rockchip: shutdown drm subsystem on shutdown Vicente Bergas
     [not found]                                                 ` <20180805140911.19205-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-05 16:50                                                   ` Marc Zyngier
     [not found]                                                     ` <20180805175038.1d3a0c5e-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>
2018-08-05 17:38                                                       ` Vicente Bergas
     [not found]                                                         ` <CAAMcf8CyUri0LigtJWvahLK62ihPUYa_UvA+2q_EA8m+TL2cqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-05 18:23                                                           ` Marc Zyngier [this message]
2018-08-07 12:44                                                   ` Heiko Stuebner
2018-08-07 16:05                                                     ` Vicente Bergas
     [not found]                                                       ` <CAAMcf8D8Vwgi-Amqt8ou9LbDrsRTePjCvwDXWo1JUTGTxLyn_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-07 16:07                                                         ` Heiko Stuebner
2018-08-07 16:20                                                           ` Vicente Bergas
     [not found]                                                             ` <CAAMcf8DJhBk8rG65SmQR4vwtj1zfm7jfKJJ4nAx6OsAeu52T2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-09 13:43                                                               ` Marc Zyngier
     [not found]                                                                 ` <20180909144300.3908a11b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>
2018-09-10  9:08                                                                   ` Heiko Stuebner
2018-09-10  9:57                                                                     ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861sbcr7sx.wl-marc.zyngier@arm.com \
    --to=marc.zyngier-5wv7dgnigg8@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    --cc=tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.