From: Liu Ying <victor.liu@nxp.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
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>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Dmitry Baryshkov <lumag@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Marek Vasut <marek.vasut@mailbox.org>,
Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH v6 07/13] drm/imx: dc: Use TCON operation mode
Date: Mon, 26 Oct 2026 17:37:45 +0800 [thread overview]
Message-ID: <at8faVUk6GOXVjmX@raspi> (raw)
In-Reply-To: <apqBoxjblzSIuG36@houat>
On Fri, Sep 04, 2026 at 10:32:35AM +0200, Maxime Ripard wrote:
> Hi,
Hi,
Sorry for the late reply.
>
> On Fri, Sep 04, 2026 at 03:54:57PM +0800, Liu Ying wrote:
> > @@ -273,7 +285,22 @@ dc_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_commit *state)
> > dc_ed_pec_sync_trigger(dc_crtc->ed_cont);
> > dc_ed_pec_sync_trigger(dc_crtc->ed_safe);
> > dc_fg_shdtokgen(dc_crtc->fg);
> > +
> > + /* Don't relinquish CPU until TCON is set to operation mode. */
> > + local_irq_save(flags);
> > + preempt_disable();
> > +
> > dc_fg_enable(dc_crtc->fg);
> > + /*
> > + * Turn TCON into operation mode as soon as the first dumb
> > + * frame is generated by DC(we don't relinquish CPU to ensure
> > + * this). This makes DPR/PRG be able to evade the frame.
> > + */
> > + DC_CRTC_WAIT_FOR_FRAMEGEN_FRAME_INDEX_MOVING(dc_crtc->fg);
> > + dc_tc_set_operation_mode(dc_crtc->tc);
> > +
> > + local_irq_restore(flags);
> > + preempt_enable();
>
> That's really not great... Can you expand on why you need this, and is
> there really no other way to do it?
This is a sequence instructed by NXP/Freescale IP designer to ensure
that the prefetch engine(DPRC + PRG) can be enabled reliably - TCON must
be switched to operation mode from bypass mode as soon as FrameGen finishes
generating the first frame(frame index moves). This is the only way to
do that, AFAIK.
I'll address Sashiko AI bot's comments about local irq disablement in
next version.
>
> Maxime
--
Regards,
Liu Ying
next prev parent reply other threads:[~2026-10-26 9:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 7:54 [PATCH v6 00/13] drm/imx: dc: Use prefetch engine Liu Ying
2026-09-04 7:54 ` [PATCH v6 01/13] dt-bindings: display: imx: Add i.MX8qxp/qm PRG binding Liu Ying
2026-09-04 7:54 ` [PATCH v6 02/13] dt-bindings: display: imx: Add i.MX8qxp/qm DPR channel binding Liu Ying
2026-09-04 7:54 ` [PATCH v6 03/13] drm/imx: dc-fu: Fix dimensions Liu Ying
2026-09-04 7:54 ` [PATCH v6 04/13] drm/imx: dc-crtc: Disable at boot Liu Ying
2026-09-04 8:27 ` Maxime Ripard
2026-10-26 9:30 ` Liu Ying
2026-09-04 7:54 ` [PATCH v6 05/13] drm/imx: dc: Add PRG support Liu Ying
2026-09-04 8:29 ` Maxime Ripard
2026-09-04 7:54 ` [PATCH v6 06/13] drm/imx: dc: Add DPR channel support Liu Ying
2026-09-04 8:29 ` Maxime Ripard
2026-09-04 7:54 ` [PATCH v6 07/13] drm/imx: dc: Use TCON operation mode Liu Ying
2026-09-04 8:32 ` Maxime Ripard
2026-10-26 9:37 ` Liu Ying [this message]
2026-09-04 7:54 ` [PATCH v6 08/13] drm/imx: dc-ed: Support getting source selection Liu Ying
2026-09-04 8:32 ` Maxime Ripard
2026-09-04 7:54 ` [PATCH v6 09/13] drm/imx: dc-lb: Support getting secondary input selection Liu Ying
2026-09-04 8:33 ` Maxime Ripard
2026-09-04 7:55 ` [PATCH v6 10/13] drm/imx: dc-ed: Drop initial source selection Liu Ying
2026-09-04 8:33 ` Maxime Ripard
2026-09-04 7:55 ` [PATCH v6 11/13] drm/imx: dc-lb: Drop initial primary and secondary input selections Liu Ying
2026-09-04 8:33 ` Maxime Ripard
2026-09-04 7:55 ` [PATCH v6 12/13] drm/imx: dc-fu: Get DPR channel Liu Ying
2026-09-04 8:36 ` Maxime Ripard
2026-09-04 7:55 ` [PATCH v6 13/13] drm/imx: dc: Use prefetch engine Liu Ying
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=at8faVUk6GOXVjmX@raspi \
--to=victor.liu@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marek.vasut@mailbox.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--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
all inboxes | Powered by JetHome®