[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6623644.ejJDZkT8p0@senjougahara>
Date: Fri, 18 Jul 2025 18:25:43 +0900
From: Mikko Perttunen <mperttunen@...dia.com>
To: Svyatoslav Ryhel <clamor95@...il.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Thierry Reding <treding@...dia.com>, Jonathan Hunter <jonathanh@...dia.com>,
Peter De Schrijver <pdeschrijver@...dia.com>,
Prashant Gaikwad <pgaikwad@...dia.com>,
Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>,
Dmitry Osipenko <digetx@...il.com>, dri-devel@...ts.freedesktop.org,
devicetree@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject:
Re: [PATCH v1 4/5] gpu/drm: tegra: dsi: add support for Tegra20/Tegra30
On Friday, July 18, 2025 6:19 PM Svyatoslav Ryhel wrote:
> пт, 18 лип. 2025 р. о 12:15 Mikko Perttunen <mperttunen@...dia.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@...il.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
Powered by blists - more mailing lists