All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: David Airlie <airlied@linux.ie>,
	Guillaume Tucker <guillaume.tucker@collabora.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-tegra@vger.kernel.org, Thierry Reding <treding@nvidia.com>
Subject: Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
Date: Wed, 10 Jan 2018 13:13:34 +0100	[thread overview]
Message-ID: <20180110121334.GA25824@ulmo> (raw)
In-Reply-To: <d18819df-c91b-c2b5-18f5-12f373ae4956@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 2545 bytes --]

On Tue, Jan 02, 2018 at 06:32:11PM +0000, Jon Hunter wrote:
> 
> On 20/12/17 18:15, Thierry Reding wrote:
> > On Wed, Dec 20, 2017 at 11:32:23AM +0000, Guillaume Tucker wrote:
> >> When neither HDMI nor DP is supported such as on the tegra124, the
> >> sor->clk_out is not initialised and remains NULL.  In this case, the
> >> parent clock can't be assigned to it so revert to the previous
> >> behaviour of assigning it to the main sor->clk instead.
> >>
> >> This fixes a kernel hang on tegra124 and should also affect tegra210
> >> as they both don't support HDMI and DP.  Tested on tegra124 only.
> >>
> >> Fixes: e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock")
> >> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> >> CC: Thierry Reding <treding@nvidia.com>
> >> ---
> >>  drivers/gpu/drm/tegra/sor.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > How about just the below instead? It's one more line than your patch,
> > but it will automatically handle all occurrences of clk_out properly.
> > 
> > --- >8 ---
> > diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> > index f6313c4d612e..4be9edf9c6fe 100644
> > --- a/drivers/gpu/drm/tegra/sor.c
> > +++ b/drivers/gpu/drm/tegra/sor.c
> > @@ -3047,6 +3047,8 @@ static int tegra_sor_probe(struct platform_device *pdev)
> >                                 name, err);
> >                         goto remove;
> >                 }
> > +       } else {
> > +               sor->clk_out = sor->clk;
> >         }
> >  
> >         sor->clk_parent = devm_clk_get(&pdev->dev, "parent");
> > --- >8 ---
> > 
> > That said, I suspect the SOR might be compatible from a clock point of
> > view with later versions and perhaps we just didn't implement clocks
> > correctly back in the Tegra124 timeframe.
> > 
> > Maybe Peter knows.
> 
> So the above change from Thierry works for me and we need this for v4.15
> (otherwise nyan-big does not boot) so you can have my ...
> 
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> 
> However, would be good to have Peter's ACK, especially seeing that
> Tegra210 sor0 does not support HDMI and DP. So we need to make sure this
> is correct for Tegra210 as well (although I have not seen any
> regressions for Tegra210).

There are no Tegra210 boards with eDP or LVDS support, which are the
only setups that are impacted by this.

I've sent out the above as a proper patch. I'll submit this for a late
fixes pull request.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Guillaume Tucker <guillaume.tucker@collabora.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Thierry Reding <treding@nvidia.com>,
	David Airlie <airlied@linux.ie>,
	linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
Date: Wed, 10 Jan 2018 13:13:34 +0100	[thread overview]
Message-ID: <20180110121334.GA25824@ulmo> (raw)
In-Reply-To: <d18819df-c91b-c2b5-18f5-12f373ae4956@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 2545 bytes --]

On Tue, Jan 02, 2018 at 06:32:11PM +0000, Jon Hunter wrote:
> 
> On 20/12/17 18:15, Thierry Reding wrote:
> > On Wed, Dec 20, 2017 at 11:32:23AM +0000, Guillaume Tucker wrote:
> >> When neither HDMI nor DP is supported such as on the tegra124, the
> >> sor->clk_out is not initialised and remains NULL.  In this case, the
> >> parent clock can't be assigned to it so revert to the previous
> >> behaviour of assigning it to the main sor->clk instead.
> >>
> >> This fixes a kernel hang on tegra124 and should also affect tegra210
> >> as they both don't support HDMI and DP.  Tested on tegra124 only.
> >>
> >> Fixes: e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock")
> >> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> >> CC: Thierry Reding <treding@nvidia.com>
> >> ---
> >>  drivers/gpu/drm/tegra/sor.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > How about just the below instead? It's one more line than your patch,
> > but it will automatically handle all occurrences of clk_out properly.
> > 
> > --- >8 ---
> > diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> > index f6313c4d612e..4be9edf9c6fe 100644
> > --- a/drivers/gpu/drm/tegra/sor.c
> > +++ b/drivers/gpu/drm/tegra/sor.c
> > @@ -3047,6 +3047,8 @@ static int tegra_sor_probe(struct platform_device *pdev)
> >                                 name, err);
> >                         goto remove;
> >                 }
> > +       } else {
> > +               sor->clk_out = sor->clk;
> >         }
> >  
> >         sor->clk_parent = devm_clk_get(&pdev->dev, "parent");
> > --- >8 ---
> > 
> > That said, I suspect the SOR might be compatible from a clock point of
> > view with later versions and perhaps we just didn't implement clocks
> > correctly back in the Tegra124 timeframe.
> > 
> > Maybe Peter knows.
> 
> So the above change from Thierry works for me and we need this for v4.15
> (otherwise nyan-big does not boot) so you can have my ...
> 
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> 
> However, would be good to have Peter's ACK, especially seeing that
> Tegra210 sor0 does not support HDMI and DP. So we need to make sure this
> is correct for Tegra210 as well (although I have not seen any
> regressions for Tegra210).

There are no Tegra210 boards with eDP or LVDS support, which are the
only setups that are impacted by this.

I've sent out the above as a proper patch. I'll submit this for a late
fixes pull request.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-01-10 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 11:32 [RFC PATCH v2 0/1] Fix drm driver hang on tegra124-nyan-big Guillaume Tucker
2017-12-20 11:32 ` Guillaume Tucker
     [not found] ` <cover.1513768618.git.guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-12-20 11:32   ` [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out Guillaume Tucker
2017-12-20 11:32     ` Guillaume Tucker
2017-12-20 18:15     ` Thierry Reding
2017-12-20 18:15       ` Thierry Reding
2018-01-02 18:32       ` Jon Hunter
2018-01-02 18:32         ` Jon Hunter
2018-01-10 12:13         ` Thierry Reding [this message]
2018-01-10 12:13           ` Thierry Reding

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=20180110121334.GA25824@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guillaume.tucker@collabora.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=treding@nvidia.com \
    /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.