From: Liu Ying <victor.liu@nxp.com>
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Cc: festevam@gmail.com, m.felsch@pengutronix.de,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
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>,
Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v13] drm/bridge: imx: Add i.MX93 parallel display format configuration support
Date: Fri, 24 Jul 2026 16:23:17 +0800 [thread overview]
Message-ID: <amMg9cOTWNzHsH35@raspi> (raw)
In-Reply-To: <gvp7mfhjpgon6hju37ebswo5fjkdzio5lqgcdkhq25zfidayj5@kenuryj2sg3s>
On Fri, Jul 24, 2026 at 11:08:06AM +0300, Laurentiu Palcu wrote:
> Hi Ying,
Hi Laurentiu,
>
> On Thu, Jul 23, 2026 at 02:37:32PM +0800, Liu Ying wrote:
> > NXP i.MX93 mediamix blk-ctrl contains one DISPLAY_MUX register which
> > configures parallel display format by using the "PARALLEL_DISP_FORMAT"
> > field. Add a DRM bridge driver to support the display format configuration.
> >
> > [m.felsch@pengutronix.de: port to v7.0-rc1]
> > [m.felsch@pengutronix.de: add review feedback (Alexander)]
> > [m.felsch@pengutronix.de: fix to short Kconfig description (checkpath)]
> > [m.felsch@pengutronix.de: use "GPL" instead of "GPL v2" (checkpatch)]
> > [m.felsch@pengutronix.de: add bus-width support]
> > [ Liu Ying: Port to drm-misc/drm-misc-next(v7.2-rc2 based) ]
> > [ Liu Ying: Add nxp,imx91-pdfc compatible string ]
> > [ Liu Ying: Call drm_bridge_get() for next_bridge ]
> > [ Liu Ying: Reject unsupported output bus fmt in .atomic_get_input_bus_fmts() ]
> >
> > Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > ---
>
> [...]
>
> > +static void imx93_pdfc_bridge_atomic_enable(struct drm_bridge *bridge,
> > + struct drm_atomic_commit *state)
> > +{
> > + struct imx93_pdfc *pdfc = bridge_to_imx93_pdfc(bridge);
> > + const struct drm_bridge_state *bridge_state;
> > + unsigned int mask = PARALLEL_DISP_FORMAT;
> > + unsigned int val;
> > +
> > + bridge_state = drm_atomic_get_new_bridge_state(state, bridge);
> > +
> > + switch (bridge_state->output_bus_cfg.format) {
> > + case MEDIA_BUS_FMT_RGB888_1X24:
> > + case MEDIA_BUS_FMT_FIXED:
> > + val = FORMAT_RGB888_TO_RGB888;
> > + if (pdfc->phy_bus_width == 18) {
> > + /*
> > + * Can be valid if physical bus limitation exists,
> > + * therefore use dev_dbg().
> > + */
> > + dev_dbg(pdfc->dev, "Truncate two LSBs from each color\n");
> > + val = FORMAT_RGB888_TO_RGB666;
> > + }
> > + break;
> > + case MEDIA_BUS_FMT_RGB666_1X18:
> > + val = FORMAT_RGB888_TO_RGB666;
> > + break;
> > + case MEDIA_BUS_FMT_RGB565_1X16:
> > + val = FORMAT_RGB565_TO_RGB565;
> > + break;
> > + }
> > +
> > + regmap_update_bits(pdfc->regmap, IMX93_DISPLAY_MUX_REG, mask, val);
>
> Apparently, the 'mask' variable is only used in this call, nowhere else. Why
> not use PARALLEL_DISP_FORMAT macro directly here instead of declaring a
> variable just for that?
Marco introduced the mask variable to the code. I'd say it makes the
regmap_update_bits() call fit into one line, so it doesn't look too bad
and I'm fine with it.
>
> Otherwise,
> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
If no objections, may I take this R-b tag as a valid one if keeping the
mask variable as-is?
>
> --
> Thanks,
> Laurentiu
--
Regards,
Liu Ying
next prev parent reply other threads:[~2026-07-24 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 6:37 [PATCH v13] drm/bridge: imx: Add i.MX93 parallel display format configuration support Liu Ying
2026-07-23 15:52 ` Frank Li
2026-07-24 7:37 ` Alexander Stein
2026-07-24 8:08 ` Laurentiu Palcu
2026-07-24 8:23 ` Liu Ying [this message]
2026-07-24 8:28 ` Laurentiu Palcu
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=amMg9cOTWNzHsH35@raspi \
--to=victor.liu@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@pengutronix.de \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=m.felsch@pengutronix.de \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=s.hauer@pengutronix.de \
--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