From: Hugo Villeneuve <hugo@hugovil.com>
To: Chris Brandt <chris.brandt@renesas.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
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>,
Pavel Machek <pavel@nabladev.com>,
linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Hugo Villeneuve <hvilleneuve@dimonoff.com>
Subject: Re: [PATCH v2] drm: renesas: rz-du: mipi_dsi: Fix return path on error
Date: Wed, 22 Apr 2026 11:02:37 -0400 [thread overview]
Message-ID: <20260422110237.15cd5208452a1d6d842ab5dd@hugovil.com> (raw)
In-Reply-To: <20260422145146.1638998-1-chris.brandt@renesas.com>
Hi Chris,
On Wed, 22 Apr 2026 10:51:46 -0400
Chris Brandt <chris.brandt@renesas.com> wrote:
> In case of error, we should unwind correctly.
> Switching to using dmam_ instead of dma_ and moving the code earlier
> fixes the issue.
>
> Fixes: 6f392f371650 ("drm: renesas: rz-du: Implement MIPI DSI host transfers")
> Suggested-by: Pavel Machek <pavel@nabladev.com>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> Acked-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>
> ---
> V1->V2:
> - Need to take into account mipi_dsi_host_register was already called (Geert)
> - Switch to using dmam_alloc_coherent to automate unwinding (Chris)
> - Added Acked-by (Hugo)
You should not add "Acked-by" tags if you make
modifications _after_ someone has given its Ack (unless it is just a
minor cosmetic or coding style change)...
In other words, my ack was for V1, not V2 which is quite different from
V1 :)
Don't resend a V3 just for that, I will have a look later at V2...
> ---
> drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 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 29f2b7d24fe5..b908e702b607 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1442,6 +1442,11 @@ 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");
>
> + dsi->dcs_buf_virt = dmam_alloc_coherent(dsi->dev, RZG2L_DCS_BUF_SIZE,
> + &dsi->dcs_buf_phys, GFP_KERNEL);
> + if (!dsi->dcs_buf_virt)
> + return -ENOMEM;
> +
> platform_set_drvdata(pdev, dsi);
>
> pm_runtime_enable(dsi->dev);
> @@ -1474,11 +1479,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
> if (ret < 0)
> goto err_pm_disable;
>
> - dsi->dcs_buf_virt = dma_alloc_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZE,
> - &dsi->dcs_buf_phys, GFP_KERNEL);
> - if (!dsi->dcs_buf_virt)
> - return -ENOMEM;
> -
> return 0;
>
> err_phy:
> @@ -1493,8 +1493,6 @@ static void rzg2l_mipi_dsi_remove(struct platform_device *pdev)
> {
> struct rzg2l_mipi_dsi *dsi = platform_get_drvdata(pdev);
>
> - dma_free_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZE, dsi->dcs_buf_virt,
> - dsi->dcs_buf_phys);
> mipi_dsi_host_unregister(&dsi->host);
> pm_runtime_disable(&pdev->dev);
> }
> --
> 2.52.0
>
>
--
Hugo Villeneuve
next prev parent reply other threads:[~2026-04-22 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 14:51 [PATCH v2] drm: renesas: rz-du: mipi_dsi: Fix return path on error Chris Brandt
2026-04-22 15:02 ` Hugo Villeneuve [this message]
2026-04-22 21:31 ` Claude review: " Claude Code Review Bot
2026-04-22 21:31 ` Claude Code Review Bot
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=20260422110237.15cd5208452a1d6d842ab5dd@hugovil.com \
--to=hugo@hugovil.com \
--cc=airlied@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=chris.brandt@renesas.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hvilleneuve@dimonoff.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pavel@nabladev.com \
--cc=simona@ffwll.ch \
--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