From: Mikko Perttunen <mperttunen@nvidia.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Thierry Reding <treding@nvidia.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Dmitry Osipenko <digetx@gmail.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org
Subject: Re: [PATCH v1 4/5] gpu/drm: tegra: dsi: add support for Tegra20/Tegra30
Date: Fri, 18 Jul 2025 18:25:43 +0900 [thread overview]
Message-ID: <6623644.ejJDZkT8p0@senjougahara> (raw)
In-Reply-To: <CAPVz0n1u3=UcYvbZEfC59kMLD647pJKKiOQ308oQ9qde4vQcyQ@mail.gmail.com>
On Friday, July 18, 2025 6:19 PM Svyatoslav Ryhel wrote:
> пт, 18 лип. 2025 р. о 12:15 Mikko Perttunen <mperttunen@nvidia.com> пише:
> > On Thursday, July 17, 2025 11:21 PM Svyatoslav Ryhel wrote:
> > > Tegra20/Tegra30 are fully compatible with existing tegra DSI driver
> > > apart
> >
> > 'apart from'
> >
> > > clock configuration and MIPI calibration which are addressed by this
> > > patch.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > >
> > > drivers/gpu/drm/tegra/drm.c | 2 ++
> > > drivers/gpu/drm/tegra/dsi.c | 69 ++++++++++++++++++++++---------------
> > > drivers/gpu/drm/tegra/dsi.h | 10 ++++++
> > > 3 files changed, 54 insertions(+), 27 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
> > > index 4596073fe28f..5d64cd57e764 100644
> > > --- a/drivers/gpu/drm/tegra/drm.c
> > > +++ b/drivers/gpu/drm/tegra/drm.c
> > > @@ -1359,10 +1359,12 @@ static SIMPLE_DEV_PM_OPS(host1x_drm_pm_ops,
> > > host1x_drm_suspend,
> > >
> > > static const struct of_device_id host1x_drm_subdevs[] = {
> > >
> > > { .compatible = "nvidia,tegra20-dc", },
> > >
> > > + { .compatible = "nvidia,tegra20-dsi", },
> > >
> > > { .compatible = "nvidia,tegra20-hdmi", },
> > > { .compatible = "nvidia,tegra20-gr2d", },
> > > { .compatible = "nvidia,tegra20-gr3d", },
> > > { .compatible = "nvidia,tegra30-dc", },
> > >
> > > + { .compatible = "nvidia,tegra30-dsi", },
> > >
> > > { .compatible = "nvidia,tegra30-hdmi", },
> > > { .compatible = "nvidia,tegra30-gr2d", },
> > > { .compatible = "nvidia,tegra30-gr3d", },
> > >
> > > diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
> > > index 3f91a24ebef2..85bcb8bee1ae 100644
> > > --- a/drivers/gpu/drm/tegra/dsi.c
> > > +++ b/drivers/gpu/drm/tegra/dsi.c
> > > @@ -662,39 +662,48 @@ static int tegra_dsi_pad_enable(struct tegra_dsi
> > > *dsi) {
> > >
> > > u32 value;
> > >
> > > - value = DSI_PAD_CONTROL_VS1_PULLDN(0) |
> > > DSI_PAD_CONTROL_VS1_PDIO(0);
> > > - tegra_dsi_writel(dsi, value, DSI_PAD_CONTROL_0);
> > > + /* Tegra20/30 uses DSIv0 while Tegra114+ uses DSIv1 */
> > > + if (of_device_is_compatible(dsi->dev->of_node,
> > > "nvidia,tegra20-dsi")
> > >
> > > + of_device_is_compatible(dsi->dev->of_node,
> > > "nvidia,tegra30-dsi"))
> >
> > You need to add "soc data" structures to the of_match table instead of
> > checking for compatible string in the code itself.
>
> I assumed that introducing "soc data" for 2 occurrences would be excessive.
Even one occurrence is enough :) No device tree properties should be accessed
after probe.
Cheers,
Mikko
>
> > Thanks,
> > Mikko
next prev parent reply other threads:[~2025-07-18 9:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 14:21 [PATCH v1 0/5] gpu/drm: tegra: add DSI support for Tegra20/Tegra30 Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 1/5] dt-bindings: display: tegra: document MIPI calibration " Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 2/5] clk: tegra20: reparent dsi clock to pll_d_out0 Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 3/5] gpu/drm: host1x: mipi: add Tegra20/Tegra30 MIPI calibration logic Svyatoslav Ryhel
2025-07-18 9:11 ` Mikko Perttunen
2025-07-18 9:17 ` Svyatoslav Ryhel
2025-07-23 1:36 ` Mikko Perttunen
2025-08-16 14:36 ` Dmitry Osipenko
2025-07-17 14:21 ` [PATCH v1 4/5] gpu/drm: tegra: dsi: add support for Tegra20/Tegra30 Svyatoslav Ryhel
2025-07-18 9:15 ` Mikko Perttunen
2025-07-18 9:19 ` Svyatoslav Ryhel
2025-07-18 9:25 ` Mikko Perttunen [this message]
2025-07-17 14:21 ` [PATCH v1 5/5] ARM: tegra: add MIPI calibration binding " Svyatoslav Ryhel
2025-07-18 9:01 ` Mikko Perttunen
2025-07-18 9:15 ` Svyatoslav Ryhel
2025-07-18 9:22 ` Mikko Perttunen
2025-07-18 9:26 ` Svyatoslav Ryhel
2025-07-23 1:57 ` Mikko Perttunen
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=6623644.ejJDZkT8p0@senjougahara \
--to=mperttunen@nvidia.com \
--cc=airlied@gmail.com \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=simona@ffwll.ch \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.com \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox