From: Thierry Reding <thierry.reding@gmail.com>
To: 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,
Jon Hunter <jonathanh@nvidia.com>,
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, 20 Dec 2017 19:15:20 +0100 [thread overview]
Message-ID: <20171220181520.GA9687@ulmo> (raw)
In-Reply-To: <0f776b7500ee0e74b316b9803803b309779d2ff7.1513768618.git.guillaume.tucker@collabora.com>
[-- 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
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Guillaume Tucker <guillaume.tucker@collabora.com>
Cc: Thierry Reding <treding@nvidia.com>,
Jon Hunter <jonathanh@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: Wed, 20 Dec 2017 19:15:20 +0100 [thread overview]
Message-ID: <20171220181520.GA9687@ulmo> (raw)
In-Reply-To: <0f776b7500ee0e74b316b9803803b309779d2ff7.1513768618.git.guillaume.tucker@collabora.com>
[-- 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 --]
next prev parent reply other threads:[~2017-12-20 18:15 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 [this message]
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
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=20171220181520.GA9687@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.