From: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: 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>,
Fabio Estevam <festevam@gmail.com>,
linux-clk@vger.kernel.org, imx@lists.linux.dev,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v11 4/7] drm/imx: Add support for i.MX94 DCIF
Date: Wed, 18 Nov 2026 17:27:06 +0200 [thread overview]
Message-ID: <av3C0ietJXI1ax3X@vm> (raw)
In-Reply-To: <179449701677.2030221.6593749298448668349.b4-review@b4>
Hi Luca,
Thanks for the review.
On Thu, Nov 12, 2026 at 04:23:36PM +0100, Luca Ceresoli wrote:
> Hello Laurentiu,
>
> > The i.MX94 Display Control Interface features:
> > * Up to maximum 3 layers of alpha blending:
> > - 1 background layer(Layer 0);
> > - 1 foreground layer(Layer 1);
> > - A programmable constant color behind the background layer;
> > * Each layer supports:
> > - programmable plane size;
> > - programmable background color;
> > - embedded alpha and global alpha;
> > * Data output with CRC checksum for 4 programmable regions;
> >
> > Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # bridge refcounting
> > Signed-off-by: Sandor Yu <sandor.yu@nxp.com>
> > Co-developed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
>
> Looks OK, I just have a small remark and a few minor nitpicks, see below.
>
> > +++ b/drivers/gpu/drm/imx/dcif/Kconfig
> > @@ -0,0 +1,16 @@
> > +config DRM_IMX_DCIF
> > + tristate "DRM support for NXP i.MX94 DCIF"
> > + select DRM_KMS_HELPER
> > + select DRM_GEM_DMA_HELPER
> > + select DRM_DISPLAY_HELPER
> > + select DRM_PANEL_BRIDGE
>
> This should be unneeded now. As o fnow it is basically a complicated way to
> say 'select DRM_PANEL'. And you are (rightfully) not using the panel API,
> so this line should probably just be removed. Please double check by
> building multiple configs, including an allmodconfig.
Indeed, I addressed this in v12 and compiled DCIF with allmodconfig for
i386, x86_64 and arm,
>
> > +++ b/drivers/gpu/drm/imx/dcif/dcif-crc.c
> > @@ -0,0 +1,221 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +/*
> > + * Copyright 2025 NXP
>
> 2026 I guess... v11, a long journey, hopefully it won't slip to 2027! :)
Thanks, I guess I forgot to update this. It was/is a long journey
indeed... :/ Addressed in v12.
>
> > +++ b/drivers/gpu/drm/imx/dcif/dcif-crtc.c
> ...
> > +static int dcif_crtc_query_output_bus_format(struct drm_crtc *crtc,
> > + struct drm_crtc_state *crtc_state)
> > +{
> > + struct dcif_crtc_state *dcif_state = to_dcif_crtc_state(crtc_state);
> > + struct drm_bridge *bridge __free(drm_bridge_put) = NULL;
>
> While this is OK, there is generally a preference to declare and assign in
> the same statement when using cleanup actions, so...
>
> > + struct drm_bridge_state *bridge_state;
> > + u32 bus_format;
> > +
> > + dcif_state->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
> > + dcif_state->bus_flags = 0;
> > +
> > + bridge = dcif_crtc_get_bridge(crtc, crtc_state);
>
> ...it should all happen here, as:
>
> struct drm_bridge *bridge __free(drm_bridge_put) =
> dcif_crtc_get_bridge(crtc, crtc_state);
Addressed in v12.
>
> > +++ b/drivers/gpu/drm/imx/dcif/dcif-kms.c
> > @@ -0,0 +1,168 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +/*
> > + * Copyright 2025 NXP
> > + */
> > +
> > +#include <linux/device.h>
> > +#include <linux/of.h>
> > +#include <linux/of_platform.h>
> > +#include <linux/platform_device.h>
> > +
> > +#include <drm/drm_atomic.h>
> > +#include <drm/drm_atomic_helper.h>
> > +#include <drm/drm_bridge.h>
> > +#include <drm/drm_bridge_connector.h>
> > +#include <drm/drm_gem_framebuffer_helper.h>
> > +#include <drm/drm_panel.h>
>
> Unused include?
Removed, thanks.
>
> > +static int dcif_kms_init(struct dcif_dev *dcif)
> > +{
> > + struct drm_device *drm = &dcif->drm;
> > + struct device_node *np = drm->dev->of_node;
> > + struct drm_connector *connector;
> > + struct drm_bridge *bridge;
> > + int ret;
> > +
> > + ret = dcif_crtc_init(dcif);
> > + if (ret)
> > + return ret;
> > +
> > + bridge = devm_drm_of_get_bridge(drm->dev, np, 0, 0);
>
> This function is deprecated. You can use of_drm_get_bridge_by_endpoint()
> instead, which returns a refcounted bridge pointer. And since the bridge
> pointer is a local variable you can just use a cleanup action to put it
> easily:
>
> struct drm_bridge *bridge __free(drm_bridge_put) = of_drm_get_bridge_by_endpoint(...);
Thanks for the hint. I updated the driver to use the new function.
--
Thanks,
Laurentiu
next prev parent reply other threads:[~2026-11-18 15:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 14:27 [PATCH v11 0/7] Add support for i.MX94 DCIF Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 1/7] dt-bindings: display: fsl,ldb: Add i.MX94 LDB Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 2/7] drm/bridge: fsl-ldb: Add support for i.MX94 Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 3/7] dt-bindings: display: imx: Add i.MX94 DCIF Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 4/7] drm/imx: Add support for " Laurentiu Palcu
2026-11-10 15:14 ` sashiko-bot
2026-11-12 15:23 ` Luca Ceresoli
2026-11-18 15:27 ` Laurentiu Palcu [this message]
2026-11-10 14:27 ` [PATCH v11 5/7] dt-bindings: clock: nxp,imx95-blk-ctl: Add LDB bridge child node Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 5/7] dt-bindings: clock: nxp, imx95-blk-ctl: " Laurentiu Palcu
2026-11-10 14:46 ` [PATCH v11 5/7] dt-bindings: clock: nxp,imx95-blk-ctl: " sashiko-bot
2026-11-10 20:07 ` Rob Herring (Arm)
2026-11-10 14:27 ` [PATCH v11 6/7] arm64: dts: imx94: Add display pipeline nodes Laurentiu Palcu
2026-11-10 14:27 ` [PATCH v11 7/7] arm64: dts: imx943-evk: Add display support using IT6263 Laurentiu Palcu
2026-11-12 16:40 ` (subset) [PATCH v11 0/7] Add support for i.MX94 DCIF Luca Ceresoli
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=av3C0ietJXI1ax3X@vm \
--to=laurentiu.palcu@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=airlied@gmail.com \
--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=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.