* [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
@ 2026-04-25 2:28 John Madieu
2026-04-25 6:39 ` Biju Das
0 siblings, 1 reply; 7+ messages in thread
From: John Madieu @ 2026-04-25 2:28 UTC (permalink / raw)
To: biju.das.jz, maarten.lankhorst, mripard, tzimmermann, airlied,
simona
Cc: dri-devel, linux-renesas-soc, linux-kernel, john.madieu,
John Madieu
rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the same
arguments: once right after devm_drm_bridge_alloc() succeeds and again
after the reset controllers have been acquired. The second call is
redundant; remove it.
No functional change.
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index 0b4861824319..b8527661a409 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -1441,8 +1441,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
return dev_err_probe(dsi->dev, PTR_ERR(dsi->prstc),
"failed to get prst\n");
- platform_set_drvdata(pdev, dsi);
-
pm_runtime_enable(dsi->dev);
ret = pm_runtime_resume_and_get(dsi->dev);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-04-25 2:28 [PATCH] drm: renesas: rz-du: mipi-dsi: drop " John Madieu
@ 2026-04-25 6:39 ` Biju Das
2026-04-25 10:47 ` John Madieu
0 siblings, 1 reply; 7+ messages in thread
From: Biju Das @ 2026-04-25 6:39 UTC (permalink / raw)
To: John Madieu, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
john.madieu@gmail.com
Hi John,
Thanks for the patch.
> -----Original Message-----
> From: John Madieu <john.madieu.xa@bp.renesas.com>
> Sent: 25 April 2026 03:29
> Subject: [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
>
> rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the same
> arguments: once right after devm_drm_bridge_alloc() succeeds and again after the reset controllers have
> been acquired. The second call is redundant; remove it.
>
> No functional change.
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> ---
> drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-
> du/rzg2l_mipi_dsi.c
> index 0b4861824319..b8527661a409 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1441,8 +1441,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
> return dev_err_probe(dsi->dev, PTR_ERR(dsi->prstc),
> "failed to get prst\n");
>
> - platform_set_drvdata(pdev, dsi);
> -
Keep this one here and drop the earlier one as pm_runtime_resume is the first user
of drvdata.
Cheers,
Biju
> pm_runtime_enable(dsi->dev);
>
> ret = pm_runtime_resume_and_get(dsi->dev);
> --
> 2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-04-25 6:39 ` Biju Das
@ 2026-04-25 10:47 ` John Madieu
0 siblings, 0 replies; 7+ messages in thread
From: John Madieu @ 2026-04-25 10:47 UTC (permalink / raw)
To: Biju Das, maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
john.madieu@gmail.com
Hi Biju,
Thank you for your review.
> -----Original Message-----
> From: Biju Das <biju.das.jz@bp.renesas.com>
> Sent: Samstag, 25. April 2026 08:40
> To: John Madieu <john.madieu.xa@bp.renesas.com>;
> maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> tzimmermann@suse.de; airlied@gmail.com; simona@ffwll.ch
> Subject: RE: [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate
> platform_set_drvdata() call
>
> Hi John,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: John Madieu <john.madieu.xa@bp.renesas.com>
> > Sent: 25 April 2026 03:29
> > Subject: [PATCH] drm: renesas: rz-du: mipi-dsi: drop duplicate
> > platform_set_drvdata() call
> >
> > rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the
> > same
> > arguments: once right after devm_drm_bridge_alloc() succeeds and again
> > after the reset controllers have been acquired. The second call is
> redundant; remove it.
> >
> > No functional change.
> >
> > Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> > ---
> > drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > b/drivers/gpu/drm/renesas/rz- du/rzg2l_mipi_dsi.c index
> > 0b4861824319..b8527661a409 100644
> > --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > @@ -1441,8 +1441,6 @@ static int rzg2l_mipi_dsi_probe(struct
> platform_device *pdev)
> > return dev_err_probe(dsi->dev, PTR_ERR(dsi->prstc),
> > "failed to get prst\n");
> >
> > - platform_set_drvdata(pdev, dsi);
> > -
>
> Keep this one here and drop the earlier one as pm_runtime_resume is the
> first user of drvdata.
>
Got it. I'll post a v2 with the appropriate change.
Regards,
John
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
@ 2026-11-10 11:46 Prabhakar
2026-11-10 11:51 ` sashiko-bot
2026-11-10 11:59 ` Biju Das
0 siblings, 2 replies; 7+ messages in thread
From: Prabhakar @ 2026-11-10 11:46 UTC (permalink / raw)
To: Biju Das, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel, linux-renesas-soc, linux-kernel, Prabhakar,
Fabrizio Castro, Prabhakar
From: John Madieu <john.madieu.xa@bp.renesas.com>
The platform driver data is already set earlier in
rzg2l_mipi_dsi_probe(). The subsequent platform_set_drvdata() call
uses the same arguments and is therefore redundant.
Remove the duplicate call.
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index 5b257f5adf06..985d6e02203c 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -1576,8 +1576,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
if (!dsi->dcs_buf_virt)
return -ENOMEM;
- platform_set_drvdata(pdev, dsi);
-
ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
if (ret)
return ret;
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
2026-11-10 11:46 [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call Prabhakar
@ 2026-11-10 11:51 ` sashiko-bot
2026-11-10 11:59 ` Biju Das
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-11-10 11:51 UTC (permalink / raw)
To: Prabhakar; +Cc: dri-devel, wsa+renesas
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm: renesas: rz-du: null pointer dereference in
rzg2l_mipi_dsi_probe() [1]
--
commit dcaf0e503b70614276db2fd071bf963a09140504
Author: John Madieu <john.madieu.xa@bp.renesas.com>
drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
This commit removes a redundant platform_set_drvdata() call in
rzg2l_mipi_dsi_probe().
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> index 5b257f5adf06c..985d6e02203c1 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1576,8 +1576,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
> if (!dsi->dcs_buf_virt)
> return -ENOMEM;
>
> - platform_set_drvdata(pdev, dsi);
> -
> ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
> if (ret)
> return ret;
[Severity: High]
This problem wasn't introduced by this patch, but can a NULL pointer
dereference occur in rzg2l_mipi_dsi_probe() [1] if the driver is
manually bound via sysfs without matching device tree data?
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c:rzg2l_mipi_dsi_probe() {
...
dsi->info = of_device_get_match_data(&pdev->dev);
...
ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
...
ret = dsi->info->dphy_init(dsi, 80000000ULL * MILLI);
...
}
of_device_get_match_data() returns NULL when no match is found, and
dsi->info is later dereferenced without a NULL check in
rzg2l_mipi_dsi_pwrrdy_init() and when calling dsi->info->dphy_init().
[1] https://sashiko.dev/#/bug/linux-14b243a7-c808-4384-b0dc-3416dc888b2a
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110114622.229608-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
2026-11-10 11:46 [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call Prabhakar
2026-11-10 11:51 ` sashiko-bot
@ 2026-11-10 11:59 ` Biju Das
2026-11-10 12:21 ` Lad, Prabhakar
1 sibling, 1 reply; 7+ messages in thread
From: Biju Das @ 2026-11-10 11:59 UTC (permalink / raw)
To: Prabhakar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Prabhakar, Fabrizio Castro, Prabhakar Mahadev Lad
Hi Prabhakar,
Thanks for the patch.
> -----Original Message-----
> From: Prabhakar <prabhakar.csengg@gmail.com>
> Sent: 10 November 2026 11:46
> Subject: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
>
> From: John Madieu <john.madieu.xa@bp.renesas.com>
>
> The platform driver data is already set earlier in rzg2l_mipi_dsi_probe(). The subsequent
> platform_set_drvdata() call uses the same arguments and is therefore redundant.
>
> Remove the duplicate call.
Some thread related to the patch [1]. Can you please drop the first one and keep the second
one?
[1] https://lore.kernel.org/all/TY6PR01MB173770FD0BA340F5A50633E21FF322@TY6PR01MB17377.jpnprd01.prod.outlook.com/
Cheers,
Biju
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-
> du/rzg2l_mipi_dsi.c
> index 5b257f5adf06..985d6e02203c 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1576,8 +1576,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
> if (!dsi->dcs_buf_virt)
> return -ENOMEM;
>
> - platform_set_drvdata(pdev, dsi);
> -
> ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
> if (ret)
> return ret;
> --
> 2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
2026-11-10 11:59 ` Biju Das
@ 2026-11-10 12:21 ` Lad, Prabhakar
0 siblings, 0 replies; 7+ messages in thread
From: Lad, Prabhakar @ 2026-11-10 12:21 UTC (permalink / raw)
To: Biju Das
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Prabhakar, Fabrizio Castro, Prabhakar Mahadev Lad
Hi Biju,
On Tue, Nov 10, 2026 at 11:59 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Hi Prabhakar,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: Prabhakar <prabhakar.csengg@gmail.com>
> > Sent: 10 November 2026 11:46
> > Subject: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
> >
> > From: John Madieu <john.madieu.xa@bp.renesas.com>
> >
> > The platform driver data is already set earlier in rzg2l_mipi_dsi_probe(). The subsequent
> > platform_set_drvdata() call uses the same arguments and is therefore redundant.
> >
> > Remove the duplicate call.
>
> Some thread related to the patch [1]. Can you please drop the first one and keep the second
> one?
>
Ah, I missed this thread, I will update it and send a v4.
Cheers,
Prabhakar
> [1] https://lore.kernel.org/all/TY6PR01MB173770FD0BA340F5A50633E21FF322@TY6PR01MB17377.jpnprd01.prod.outlook.com/
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-10 12:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 11:46 [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call Prabhakar
2026-11-10 11:51 ` sashiko-bot
2026-11-10 11:59 ` Biju Das
2026-11-10 12:21 ` Lad, Prabhakar
-- strict thread matches above, loose matches on Subject: below --
2026-04-25 2:28 [PATCH] drm: renesas: rz-du: mipi-dsi: drop " John Madieu
2026-04-25 6:39 ` Biju Das
2026-04-25 10:47 ` John Madieu
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.