From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Ze Huang" <ze.huang@oss.qualcomm.com>,
"Alexey Brodkin" <abrodkin@synopsys.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Linus Walleij" <linusw@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Alex Lanzano" <lanzano.alex@gmail.com>,
"Oleksandr Andrushchenko" <oleksandr_andrushchenko@epam.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Marian Cichy" <m.cichy@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 1/2] drm/imx/lcdc: avoid duplicate clk_per enable
Date: Wed, 16 Sep 2026 08:24:05 +0200 [thread overview]
Message-ID: <bbf8fd0e-8e1c-4899-98f4-b8231800de8c@suse.de> (raw)
In-Reply-To: <20260727-drm-simple-kms-removal-v3-1-de36e534f7a1@oss.qualcomm.com>
Hi
Am 26.07.26 um 21:42 schrieb Ze Huang:
> The simple-KMS helper calls the pipe update after enabling the CRTC.
> On an enable commit, imx_lcdc_pipe_enable() already programs the
> mode and enables clk_per. The following pipe update sees the plane move
> from no CRTC to the active CRTC, treats it as a mode update, and calls
> imx_lcdc_update_hw_registers() again.
>
> That second call has no old CRTC state to disable clk_per first, but it
> enables clk_per again at the end. The disable path only drops one
> reference, leaving clk_per enabled after each on/off cycle.
>
> Skip the register update from the pipe update path when the CRTC already
> needs a modeset. The enable path has already programmed the hardware for
> that commit; keep the event handling in pipe update unchanged.
That seems reasonable. Once the driver uses regular DRM helpers instead
of simple_kms, it can all be untangled and this test won't be necessary
any longer.
>
> Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25")
> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
> index f52832b43aca..81024f7d9e96 100644
> --- a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
> +++ b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
> @@ -311,7 +311,8 @@ static void imx_lcdc_pipe_update(struct drm_simple_display_pipe *pipe,
> else if (old_crtc != crtc)
> mode_changed = true;
>
> - imx_lcdc_update_hw_registers(pipe, old_state, mode_changed);
> + if (!drm_atomic_crtc_needs_modeset(crtc->state))
> + imx_lcdc_update_hw_registers(pipe, old_state, mode_changed);
>
> if (event) {
> crtc->state->event = NULL;
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-09-16 6:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 19:42 [PATCH v3 0/2] drm: replace simple display pipe users with atomic helpers Ze Huang
2026-07-26 19:42 ` [PATCH v3 1/2] drm/imx/lcdc: avoid duplicate clk_per enable Ze Huang
2026-09-16 6:24 ` Thomas Zimmermann [this message]
2026-09-18 16:58 ` Ze Huang
2026-07-26 19:42 ` [PATCH v3 2/2] drm/imx: replace struct drm_simple_display_pipe with regular atomic helpers Ze Huang
2026-09-16 6:50 ` Thomas Zimmermann
2026-09-16 7:46 ` Maxime Ripard
2026-09-16 7:51 ` Thomas Zimmermann
2026-09-18 17:05 ` Ze Huang
2026-09-18 15:14 ` Ze Huang
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=bbf8fd0e-8e1c-4899-98f4-b8231800de8c@suse.de \
--to=tzimmermann@suse.de \
--cc=Frank.Li@nxp.com \
--cc=abrodkin@synopsys.com \
--cc=airlied@gmail.com \
--cc=andrew@codeconstruct.com.au \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=hansg@kernel.org \
--cc=imx@lists.linux.dev \
--cc=joel@jms.id.au \
--cc=kernel@pengutronix.de \
--cc=lanzano.alex@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.cichy@pengutronix.de \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=p.zabel@pengutronix.de \
--cc=s.hauer@pengutronix.de \
--cc=simona@ffwll.ch \
--cc=u.kleine-koenig@pengutronix.de \
--cc=xen-devel@lists.xenproject.org \
--cc=ze.huang@oss.qualcomm.com \
/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