From: Liu Ying <victor.liu@nxp.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: 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>, Peng Fan <peng.fan@nxp.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>,
luca.ceresoli@bootlin.com, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
frank.li@nxp.com
Subject: Re: [PATCH v10 2/3] drm/bridge: imx: Add i.MX93 parallel display format configuration support
Date: Tue, 3 Mar 2026 17:33:57 +0800 [thread overview]
Message-ID: <edc74093-abe3-4782-8e81-afd87222c146@nxp.com> (raw)
In-Reply-To: <jyawx2cllg2jecdvx6bdfv4qiinfiwb6cuuwdhditpr2g2evee@qiox37ahgczd>
On Tue, Mar 03, 2026 at 09:05:43AM +0100, Marco Felsch wrote:
> On 26-03-03, Liu Ying wrote:
>> On Mon, Mar 02, 2026 at 05:10:41PM +0100, Marco Felsch wrote:
>>> From: Liu Ying <victor.liu@nxp.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Liu Ying <victor.liu@nxp.com>
>>> [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]
>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>>> ---
>>> drivers/gpu/drm/bridge/imx/Kconfig | 11 ++
>>> drivers/gpu/drm/bridge/imx/Makefile | 1 +
>>> drivers/gpu/drm/bridge/imx/imx93-pdfc.c | 225 ++++++++++++++++++++++++++++++++
>>> 3 files changed, 237 insertions(+)
>>>
>>
>> [...]
>>
>>> +static bool imx93_pdfc_bus_output_fmt_supported(const u32 fmt)
>>
>> As I mentioned in v9, can you drop const?
>> I don't think const is needed.
>
> It makes sense to spot failures early. Albeit this function is very
> small, the fmt shouldn't be changed and therefore needs to be const.
If fmt is a pointer, then I think it makes sense to keep const.
Otherwise, it looks a bit over engineered to have const, since this
function is really small and no one would try to change fmt.
>
> I forgot to add the double space fix though, thanks.
>
>>> +{
>>> + int i;
>>> +
>>> + for (i = 0; i < ARRAY_SIZE(imx93_pdfc_bus_output_fmts); i++) {
>>> + if (imx93_pdfc_bus_output_fmts[i] == fmt)
>>> + return true;
>>> + }
>>> +
>>> + return false;
>>> +}
[...]
>>> +static int imx93_pdfc_bridge_atomic_check(struct drm_bridge *bridge,
>>> + struct drm_bridge_state *bridge_state,
>>> + struct drm_crtc_state *crtc_state,
>>> + struct drm_connector_state *conn_state)
>>> +{
>>> + struct imx93_pdfc *pdfc = bridge_to_imx93_pdfc(bridge);
>>> + const u32 format = bridge_state->output_bus_cfg.format;
>>
>> Can you drop const?
>
> No because this function is not supposed to change the format. The
> function documentation says: this function can alter the bus_cfg.flags
> bit _not_ the format.
The local variable format is not a pointer, so literally the value of
bridge_state->output_bus_cfg.format cannot be changed through format,
which follows the documentation. So, I think const could be dropped.
>
> Regards,
> Marco
>
>
>
>>
>> --
>> Regards,
>> Liu Ying
>>
>
--
Regards,
Liu Ying
next prev parent reply other threads:[~2026-03-03 9:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 16:10 [PATCH v10 0/3] Add i.MX91/93 parallel display support Marco Felsch
2026-03-02 16:10 ` [PATCH v10 1/3] dt-bindings: soc: imx93-media-blk-ctrl: Add PDFC subnode to schema and example Marco Felsch
2026-03-03 3:17 ` Liu Ying
2026-03-03 7:59 ` Marco Felsch
2026-03-03 9:45 ` Liu Ying
2026-03-02 16:10 ` [PATCH v10 2/3] drm/bridge: imx: Add i.MX93 parallel display format configuration support Marco Felsch
2026-03-03 3:27 ` Liu Ying
2026-03-03 8:05 ` Marco Felsch
2026-03-03 8:49 ` Luca Ceresoli
2026-03-03 9:33 ` Liu Ying [this message]
2026-03-03 10:13 ` Marco Felsch
2026-03-02 16:10 ` [PATCH v10 3/3] arm64: dts: imx93: Add parallel display output nodes Marco Felsch
2026-03-03 3:04 ` [PATCH v10 0/3] Add i.MX91/93 parallel display support Liu Ying
2026-03-03 7:48 ` Marco Felsch
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=edc74093-abe3-4782-8e81-afd87222c146@nxp.com \
--to=victor.liu@nxp.com \
--cc=Laurent.pinchart@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=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--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=peng.fan@nxp.com \
--cc=rfoss@kernel.org \
--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