From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.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>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v4 4/7] drm/rcar-du: dsi: Support DSC in the pipeline
Date: Mon, 15 Jun 2026 15:15:26 +0300 [thread overview]
Message-ID: <72189515-4566-46fb-9277-50570b8d28d6@ideasonboard.com> (raw)
In-Reply-To: <20260615091911.GB2821720@killaraus.ideasonboard.com>
Hi,
On 15/06/2026 12:19, Laurent Pinchart wrote:
> Hi Tomi,
>
> Thank you for the patch.
>
> On Mon, Jun 15, 2026 at 09:28:09AM +0300, Tomi Valkeinen wrote:
>> Enabling DSI clocks on rcar-du needs some tricks as the DU dot clock is
>> provided by the DSI. Thus, we call rcar_mipi_dsi_pclk_enable() from the
>> crtc, when enabling the crtc.
>>
>> With DSC (added in upcoming patch) in the pipeline, between the DU and
>> the DSI, the above call path is broken as the crtc tries to call
>> rcar_mipi_dsi_pclk_enable() on the DSC.
>>
>> To solve this problem, add checks to rcar_du_crtc_atomic_enable() and
>> rcar_du_crtc_atomic_disable() to detect the DSC via the bridge type, and
>> skip the DCS bridge when needed.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
>> ---
>> drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c | 18 ++++++++++++++++++
>> drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 1 +
>> 2 files changed, 19 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
>> index 6c07c406f725..f14fd89f9104 100644
>> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
>> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
>> @@ -754,6 +754,15 @@ static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc,
>> (BIT(RCAR_DU_OUTPUT_DSI0) | BIT(RCAR_DU_OUTPUT_DSI1)))) {
>> struct drm_bridge *bridge = rcdu->dsi[rcrtc->index];
>>
>> + /*
>> + * When we have a DSC block between the DU and the DSI,
>> + * the "bridge" points to the DSC. Detect the DSC by looking
>> + * at the bridge type, and skip the DSC if the bridge is not
>> + * the DSI bridge.
>> + */
>> + if (bridge->type != DRM_MODE_CONNECTOR_DSI)
>> + bridge = bridge->next_bridge;
>> +
>
> Is there a reason you don't do this in rcar_du_encoder_init() instead ?
> It would avoid running this code on every enable/disable.
That works too.
Both options feel a bit confusing, in different ways. Your suggestion is
less code and, I think, more correct as rcdu->dsi[] will always point to
a DSI bridge (although that itself is a bit confusing, as one could
expect it to point to a neighboring bridge from DU...), so I'll switch
to that.
Tomi
next prev parent reply other threads:[~2026-06-15 12:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 6:28 [PATCH v4 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-06-15 6:28 ` [PATCH v4 1/7] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
2026-06-15 6:28 ` [PATCH v4 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
2026-06-15 6:39 ` Tomi Valkeinen
2026-06-15 9:24 ` Geert Uytterhoeven
2026-06-15 11:06 ` Tomi Valkeinen
2026-06-15 9:38 ` Conor Dooley
2026-06-15 11:07 ` Tomi Valkeinen
2026-06-15 6:28 ` [PATCH v4 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
2026-06-15 9:16 ` Laurent Pinchart
2026-06-15 6:28 ` [PATCH v4 4/7] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
2026-06-15 9:19 ` Laurent Pinchart
2026-06-15 12:15 ` Tomi Valkeinen [this message]
2026-06-15 6:28 ` [PATCH v4 5/7] arm64: dts: renesas: r8a779g0: Add DSC Tomi Valkeinen
2026-06-15 6:28 ` [PATCH v4 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC Tomi Valkeinen
2026-06-15 6:28 ` [PATCH v4 7/7] arm64: dts: renesas: white-hawk: Add second mini-DP output support Tomi Valkeinen
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=72189515-4566-46fb-9277-50570b8d28d6@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen+renesas@ideasonboard.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
all inboxes | Powered by JetHome®