From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
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>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Aradhya Bhatia <a-bhatia1@ti.com>,
Dmitry Baryshkov <lumag@kernel.org>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 3/3] RFT: drm/rcar-du: Modify custom commit tail
Date: Fri, 21 Nov 2025 09:52:03 +0100 [thread overview]
Message-ID: <CAMuHMdW5SuSChcSz_DvHTBC=CQbaVaHZqRUM=DcD5mz0axrzyA@mail.gmail.com> (raw)
In-Reply-To: <20251120-mcde-drm-regression-thirdfix-v3-3-24b1e9886bbf@linaro.org>
Hi Linus,
On Thu, 20 Nov 2025 at 23:56, Linus Walleij <linus.walleij@linaro.org> wrote:
> commit c9b1150a68d9362a0827609fc0dc1664c0d8bfe1
> "drm/atomic-helper: Re-order bridge chain pre-enable and post-disable"
> caused regressions in all bridges that e.g. send DSI commands in
> their .prepare() and .unprepare() callbacks when used with R-Car DU.
>
> This is needed on R-Car DU, where the CRTC provides clock to LVDS
> and DSI, and has to be started before a bridge may call .prepare,
> which may trigger e.g. a DSI transfer.
>
> This specifically fixes the case where ILI9881C is connected to R-Car
> DU DSI. The ILI9881C panel driver does DSI command transfer in its
> struct drm_panel_funcs .prepare function, which is currently called
> before R-Car DU rcar_du_crtc_atomic_enable() rcar_mipi_dsi_pclk_enable()
> and the DSI command transfer times out.
>
> Fixes: c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable and post-disable")
> Link: https://lore.kernel.org/all/20251107230517.471894-1-marek.vasut%2Brenesas%40mailbox.org/
> Co-developed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Thanks for your patch!
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
> @@ -540,11 +540,30 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state)
> rcdu->dpad1_source = rcrtc->index;
> }
>
> - /* Apply the atomic update. */
> - drm_atomic_helper_commit_modeset_disables(dev, old_state);
> + /*
> + * Apply the atomic update.
> + *
> + * We need special ordering to make sure the CRTC disabled last
> + * and enabled first. We do this with modified versions of the
> + * common modeset_disables/enables functions.
> + */
> +
> + /* Variant of drm_atomic_helper_commit_modeset_disables() */
> + drm_encoder_bridge_disable(dev, state);
drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c:555:41: error: ‘state’
undeclared (first use in this function); did you mean ‘statx’?
old_state (everywhere)?
After making that change, it still works on Koelsch (R-Car M2-W),
which was not affected by the breakage.
> + drm_encoder_bridge_post_disable(dev, state);
> + drm_crtc_disable(dev, state);
> + drm_atomic_helper_update_legacy_modeset_state(dev, state);
> + drm_atomic_helper_calc_timestamping_constants(state);
> + drm_crtc_set_mode(dev, state);
> +
> drm_atomic_helper_commit_planes(dev, old_state,
> DRM_PLANE_COMMIT_ACTIVE_ONLY);
> - drm_atomic_helper_commit_modeset_enables(dev, old_state);
> +
> + /* Variant of drm_atomic_helper_commit_modeset_enables() */
> + drm_crtc_enable(dev, state);
> + drm_encoder_bridge_pre_enable(dev, state);
> + drm_encoder_bridge_enable(dev, state);
> + drm_atomic_helper_commit_writebacks(dev, state);
>
> drm_atomic_helper_commit_hw_done(old_state);
> drm_atomic_helper_wait_for_flip_done(dev, old_state);
>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2025-11-21 8:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 22:55 [PATCH v3 0/3] drm/atomic-helpers: Fix MCDE/R-Car DU regressions Linus Walleij
2025-11-20 22:55 ` [PATCH v3 1/3] drm/atomic-helper: Export and namespace some functions Linus Walleij
2025-11-20 22:55 ` [PATCH v3 2/3] drm/mcde: Create custom commit tail Linus Walleij
2025-11-20 22:55 ` [PATCH v3 3/3] RFT: drm/rcar-du: Modify " Linus Walleij
2025-11-21 2:42 ` Laurent Pinchart
2025-11-21 8:17 ` Linus Walleij
2025-12-02 6:31 ` Laurent Pinchart
2025-11-21 8:52 ` Geert Uytterhoeven [this message]
2025-11-21 14:08 ` Linus Walleij
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='CAMuHMdW5SuSChcSz_DvHTBC=CQbaVaHZqRUM=DcD5mz0axrzyA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=a-bhatia1@ti.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=tomi.valkeinen@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;
as well as URLs for NNTP newsgroup(s).