All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Guillaume Tucker <guillaume.tucker@collabora.com>
Cc: David Airlie <airlied@linux.ie>,
	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: Tue, 2 Jan 2018 18:32:11 +0000	[thread overview]
Message-ID: <d18819df-c91b-c2b5-18f5-12f373ae4956@nvidia.com> (raw)
In-Reply-To: <20171220181520.GA9687@ulmo>


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).

Cheers
Jon

-- 
nvpublic
_______________________________________________
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: Jon Hunter <jonathanh@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Guillaume Tucker <guillaume.tucker@collabora.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>,
	Peter De Schrijver <pdeschrijver@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: Tue, 2 Jan 2018 18:32:11 +0000	[thread overview]
Message-ID: <d18819df-c91b-c2b5-18f5-12f373ae4956@nvidia.com> (raw)
In-Reply-To: <20171220181520.GA9687@ulmo>


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).

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2018-01-02 18:32 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 [this message]
2018-01-02 18:32         ` Jon Hunter
2018-01-10 12:13         ` Thierry Reding
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=d18819df-c91b-c2b5-18f5-12f373ae4956@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guillaume.tucker@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=thierry.reding@gmail.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.