All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/1] Fix drm driver hang on tegra124-nyan-big
@ 2017-12-20 11:32 ` Guillaume Tucker
  0 siblings, 0 replies; 10+ messages in thread
From: Guillaume Tucker @ 2017-12-20 11:32 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter, David Airlie
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Guillaume Tucker

This patch was initially sent along with another one to fix a
first hang in the nouveau drm driver[1].  I'm now sending it
again as a separate patch as it's to fix a second hang which is
not strictly related.  It is hidden by the first hang though, as
this happens later on during the driver initialisation.

The issue this is addressing is due to a rework[2] of the driver
which apparently wasn't fully tested on tegra124 and possibly
also on tegra210.  The sor->clk_out is not used on these
platforms as HDMI and DP are both not supported (but eDP is), so
trying to assign the parent clock to clk_out does nothing.  The
driver then goes on to configure the clock and PLL registers in
tegra_sor_edp_enable and this is where it hangs.

As this is hard to debug further without full documentation or a
hardware debugger, this patch essentially makes the driver do
what it used to do on these platforms before the rework
(i.e. assign the parent clock to sor->clk instead).  There might
be a more correct way of fixing this, hence the RFC.

[1] https://patchwork.kernel.org/patch/10124637/
[2] e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock")

Guillaume Tucker (1):
  drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out

 drivers/gpu/drm/tegra/sor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.11.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH v2 0/1] Fix drm driver hang on tegra124-nyan-big
@ 2017-12-20 11:32 ` Guillaume Tucker
  0 siblings, 0 replies; 10+ messages in thread
From: Guillaume Tucker @ 2017-12-20 11:32 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter, David Airlie
  Cc: linux-tegra, dri-devel, linux-kernel, Guillaume Tucker

This patch was initially sent along with another one to fix a
first hang in the nouveau drm driver[1].  I'm now sending it
again as a separate patch as it's to fix a second hang which is
not strictly related.  It is hidden by the first hang though, as
this happens later on during the driver initialisation.

The issue this is addressing is due to a rework[2] of the driver
which apparently wasn't fully tested on tegra124 and possibly
also on tegra210.  The sor->clk_out is not used on these
platforms as HDMI and DP are both not supported (but eDP is), so
trying to assign the parent clock to clk_out does nothing.  The
driver then goes on to configure the clock and PLL registers in
tegra_sor_edp_enable and this is where it hangs.

As this is hard to debug further without full documentation or a
hardware debugger, this patch essentially makes the driver do
what it used to do on these platforms before the rework
(i.e. assign the parent clock to sor->clk instead).  There might
be a more correct way of fixing this, hence the RFC.

[1] https://patchwork.kernel.org/patch/10124637/
[2] e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock")

Guillaume Tucker (1):
  drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out

 drivers/gpu/drm/tegra/sor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.11.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
  2017-12-20 11:32 ` Guillaume Tucker
@ 2017-12-20 11:32     ` Guillaume Tucker
  -1 siblings, 0 replies; 10+ messages in thread
From: Guillaume Tucker @ 2017-12-20 11:32 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter, David Airlie
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Guillaume Tucker

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-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
CC: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/gpu/drm/tegra/sor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index b0a1dedac802..a344f66d4ecb 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -255,7 +255,7 @@ static int tegra_sor_set_parent_clock(struct tegra_sor *sor, struct clk *parent)
 
 	clk_disable_unprepare(sor->clk);
 
-	err = clk_set_parent(sor->clk_out, parent);
+	err = clk_set_parent(sor->clk_out ? sor->clk_out : sor->clk, parent);
 	if (err < 0)
 		return err;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
@ 2017-12-20 11:32     ` Guillaume Tucker
  0 siblings, 0 replies; 10+ messages in thread
From: Guillaume Tucker @ 2017-12-20 11:32 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter, David Airlie
  Cc: linux-tegra, dri-devel, linux-kernel, Guillaume Tucker

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

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index b0a1dedac802..a344f66d4ecb 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -255,7 +255,7 @@ static int tegra_sor_set_parent_clock(struct tegra_sor *sor, struct clk *parent)
 
 	clk_disable_unprepare(sor->clk);
 
-	err = clk_set_parent(sor->clk_out, parent);
+	err = clk_set_parent(sor->clk_out ? sor->clk_out : sor->clk, parent);
 	if (err < 0)
 		return err;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
  2017-12-20 11:32     ` Guillaume Tucker
@ 2017-12-20 18:15       ` Thierry Reding
  -1 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2017-12-20 18:15 UTC (permalink / raw)
  To: Guillaume Tucker
  Cc: David Airlie, Peter De Schrijver, linux-kernel, dri-devel,
	Jon Hunter, linux-tegra, Thierry Reding


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

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.

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
@ 2017-12-20 18:15       ` Thierry Reding
  0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2017-12-20 18:15 UTC (permalink / raw)
  To: Guillaume Tucker
  Cc: Thierry Reding, Jon Hunter, Peter De Schrijver, David Airlie,
	linux-tegra, dri-devel, linux-kernel

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

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.

Thierry

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
  2017-12-20 18:15       ` Thierry Reding
@ 2018-01-02 18:32         ` Jon Hunter
  -1 siblings, 0 replies; 10+ messages in thread
From: Jon Hunter @ 2018-01-02 18:32 UTC (permalink / raw)
  To: Thierry Reding, Guillaume Tucker
  Cc: David Airlie, Peter De Schrijver, linux-kernel, dri-devel,
	linux-tegra, Thierry Reding


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
@ 2018-01-02 18:32         ` Jon Hunter
  0 siblings, 0 replies; 10+ messages in thread
From: Jon Hunter @ 2018-01-02 18:32 UTC (permalink / raw)
  To: Thierry Reding, Guillaume Tucker, Peter De Schrijver
  Cc: Thierry Reding, Peter De Schrijver, David Airlie, linux-tegra,
	dri-devel, linux-kernel


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
  2018-01-02 18:32         ` Jon Hunter
@ 2018-01-10 12:13           ` Thierry Reding
  -1 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2018-01-10 12:13 UTC (permalink / raw)
  To: Jon Hunter
  Cc: David Airlie, Guillaume Tucker, Peter De Schrijver, linux-kernel,
	dri-devel, linux-tegra, Thierry Reding


[-- 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH v2 1/1] drm/tegra: sor: Fix hang on tegra124 due to NULL clk_out
@ 2018-01-10 12:13           ` Thierry Reding
  0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2018-01-10 12:13 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Guillaume Tucker, Peter De Schrijver, Thierry Reding,
	David Airlie, linux-tegra, dri-devel, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-10 12:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-01-10 12:13           ` Thierry Reding

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.