From: Dang Huynh <dang.huynh@mainlining.org>
To: Peter Robinson <pbrobinson@gmail.com>
Cc: u-boot@lists.denx.de, Anatolij Gustschin <ag.dev.uboot@gmail.com>,
Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Kever Yang <kever.yang@rock-chips.com>,
Tom Rini <trini@konsulko.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
Alexander Graf <agraf@csgraf.de>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Ondrej Jirman <megi@xff.cz>, Ion Agorria <ion@agorria.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Dragan Simic <dsimic@manjaro.org>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Jonas Karlman <jonas@kwiboo.se>,
Nicolas Frattaroli <frattaroli.nicolas@gmail.com>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
Piotr Zalewski <pZ010001011111@proton.me>
Subject: Re: [PATCH v6 07/12] video: rockchip: vop2: Add video bridge support
Date: Tue, 24 Mar 2026 17:08:43 +0700 [thread overview]
Message-ID: <acJiSYOlV3FJtx-v@meltbook-pro> (raw)
In-Reply-To: <CALeDE9OTnFa4gs1XnGsdN2X0Db2aYAsSLafr8pYf+MQuRSpuXQ@mail.gmail.com>
Hi Peter,
On Wed, Mar 04, 2026 at 12:29:27PM +0000, Peter Robinson wrote:
> Hey Dang,
>
> Finally started to play with this patch set.
>
> > From: Dang Huynh <dang.huynh@mainlining.org>
> >
> > Add support for video bridge to VOP2 so we can use the MIPI DSI
> > bridge driver that we have.
>
> I see a link failure when using this patch set with the
> anbernic-rgxx3-rk3566_defconfig using 2026.04-rc3.
>
> /usr/bin/ld.bfd: drivers/video/rockchip/rk_vop2.o: in function
> `rk_display_init':
> /builddir/build/BUILD/uboot-tools-2026.04-build/u-boot-2026.04-rc3/drivers/video/rockchip/rk_vop2.c:422:(.text.rk_vop2_probe+0x360):
> undefined reference to `display_in_use'
> /usr/bin/ld.bfd:
> /builddir/build/BUILD/uboot-tools-2026.04-build/u-boot-2026.04-rc3/drivers/video/rockchip/rk_vop2.c:437:(.text.rk_vop2_probe+0x388):
> undefined reference to `display_read_timing'
> /usr/bin/ld.bfd:
> /builddir/build/BUILD/uboot-tools-2026.04-build/u-boot-2026.04-rc3/drivers/video/rockchip/rk_vop2.c:492:(.text.rk_vop2_probe+0x794):
> undefined reference to `display_enable'
You need to enable CONFIG_DISPLAY. I'll be fixing this in the next series.
>
> Cheers,
> Peter
>
>
> > Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> > ---
> > drivers/video/rockchip/rk_vop2.c | 81 +++++++++++++++++++++++++++++-----------
> > 1 file changed, 59 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/video/rockchip/rk_vop2.c b/drivers/video/rockchip/rk_vop2.c
> > index 992f215d416..156daafa0c3 100644
> > --- a/drivers/video/rockchip/rk_vop2.c
> > +++ b/drivers/video/rockchip/rk_vop2.c
> > @@ -13,10 +13,12 @@
> > #include <dm/device_compat.h>
> > #include <edid.h>
> > #include <log.h>
> > +#include <panel.h>
> > #include <regmap.h>
> > #include <reset.h>
> > #include <syscon.h>
> > #include <video.h>
> > +#include <video_bridge.h>
> > #include <asm/global_data.h>
> > #include <asm/gpio.h>
> > #include <asm/io.h>
> > @@ -291,6 +293,7 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode vp_node)
> > int vop_id, port_id, win_id;
> > struct display_timing timing;
> > struct udevice *disp;
> > + struct udevice *bridge;
> > int ret;
> > u32 remote_phandle;
> > struct display_plat *disp_uc_plat;
> > @@ -357,8 +360,11 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode vp_node)
> > return -EINVAL;
> > }
> >
> > + if (IS_ENABLED(CONFIG_VIDEO_BRIDGE))
> > + uclass_find_device_by_ofnode(UCLASS_VIDEO_BRIDGE, remote, &bridge);
> > +
> > uclass_find_device_by_ofnode(UCLASS_DISPLAY, remote, &disp);
> > - if (disp)
> > + if (disp || bridge)
> > break;
> > };
> > compat = ofnode_get_property(remote, "compatible", NULL);
> > @@ -390,27 +396,49 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode vp_node)
> > if (ret < 0)
> > return ret;
> >
> > - disp_uc_plat = dev_get_uclass_plat(disp);
> > - debug("Found device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat);
> > - if (display_in_use(disp)) {
> > - debug(" - device in use\n");
> > - return -EBUSY;
> > - }
> > + if (bridge) {
> > + /* video bridge detected, probe it */
> > + ret = device_probe(bridge);
> > + if (ret) {
> > + dev_err(dev, "Failed to probe video bridge: %d\n", ret);
> > + return ret;
> > + }
> >
> > - disp_uc_plat->source_id = vop_id;
> > - disp_uc_plat->src_dev = dev;
> > + /* Attach the DSI controller and the display to the bridge. */
> > + ret = video_bridge_attach(bridge);
> > + if (ret) {
> > + dev_err(dev, "Failed to attach video bridge: %d\n", ret);
> > + return ret;
> > + }
> >
> > - ret = device_probe(disp);
> > - if (ret) {
> > - debug("%s: device '%s' display won't probe (ret=%d)\n",
> > - __func__, dev->name, ret);
> > - return ret;
> > - }
> > + ret = video_bridge_get_display_timing(bridge, &timing);
> > + if (ret) {
> > + dev_err(dev, "Failed to read timings: %d\n", ret);
> > + return ret;
> > + }
> > + } else {
> > + disp_uc_plat = dev_get_uclass_plat(disp);
> > + debug("Found device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat);
> > + if (display_in_use(disp)) {
> > + debug(" - device in use\n");
> > + return -EBUSY;
> > + }
> >
> > - ret = display_read_timing(disp, &timing);
> > - if (ret) {
> > - debug("%s: Failed to read timings\n", __func__);
> > - return ret;
> > + disp_uc_plat->source_id = vop_id;
> > + disp_uc_plat->src_dev = dev;
> > +
> > + ret = device_probe(disp);
> > + if (ret) {
> > + debug("%s: device '%s' display won't probe (ret=%d)\n",
> > + __func__, dev->name, ret);
> > + return ret;
> > + }
> > +
> > + ret = display_read_timing(disp, &timing);
> > + if (ret) {
> > + debug("%s: Failed to read timings\n", __func__);
> > + return ret;
> > + }
> > }
> >
> > /* Set clock rate on video port to display timings */
> > @@ -453,9 +481,18 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode vp_node)
> >
> > rkvop2_mode_set(dev, &timing, vop_id, port_id, platdata);
> >
> > - ret = display_enable(disp, 1 << l2bpp, &timing);
> > - if (ret)
> > - return ret;
> > + if (bridge) {
> > + /* Attach the DSI controller and the display to the bridge. */
> > + ret = video_bridge_set_backlight(bridge, 60);
> > + if (ret) {
> > + dev_err(dev, "Failed to start the video bridge: %d\n", ret);
> > + return ret;
> > + }
> > + } else {
> > + ret = display_enable(disp, 1 << l2bpp, &timing);
> > + if (ret)
> > + return ret;
> > + }
> >
> > uc_priv->xsize = timing.hactive.typ;
> > uc_priv->ysize = timing.vactive.typ;
> >
> > --
> > 2.51.2
> >
> >
next prev parent reply other threads:[~2026-03-24 13:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 5:37 [PATCH v6 00/12] Rockchip VOP2 support Dang Huynh via B4 Relay
2025-11-08 5:37 ` [PATCH v6 01/12] video: rockchip: dw-mipi-dsi: Depend on CONFIG_VIDEO_BRIDGE Dang Huynh via B4 Relay
2025-11-08 5:37 ` [PATCH v6 02/12] video: rockchip: dw_mipi_dsi: Improve pixel clock calculations Dang Huynh via B4 Relay
2025-11-08 5:37 ` [PATCH v6 03/12] video: rockchip: dw_mipi_dsi: Proceed when external PHY is not defined Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 04/12] video: rockchip: dw-mipi-dsi: Add get_display_timing support Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 05/12] video: Add BOE TH101MB31IG002-28A MIPI-DSI panel Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 06/12] video: rockchip: Add VOP2 support Dang Huynh via B4 Relay
2025-11-10 3:24 ` Chaoyi Chen
2025-12-18 4:47 ` Dang Huynh
2025-12-23 1:34 ` Chaoyi Chen
2025-12-25 6:35 ` Dang Huynh
2025-12-29 3:13 ` Chaoyi Chen
2025-12-30 5:42 ` Dang Huynh
2025-11-08 5:38 ` [PATCH v6 07/12] video: rockchip: vop2: Add video bridge support Dang Huynh via B4 Relay
2026-03-04 12:29 ` Peter Robinson
2026-03-24 10:08 ` Dang Huynh [this message]
2026-04-02 3:33 ` Dang Huynh
2025-11-08 5:38 ` [PATCH v6 08/12] arm: dts: rockchip: rk356x: Prerelocate VOP in U-Boot proper Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 09/12] configs: quartz64: Enable vidconsole Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 10/12] video: rockchip: Add HDMI support for RK3568 Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 11/12] configs: pinetab2-rk3566: Enable video and USB keyboard Dang Huynh via B4 Relay
2025-11-08 5:38 ` [PATCH v6 12/12] clk: rockchip: rk3568: Use assigned VPLL clock when possible Dang Huynh via B4 Relay
2026-01-08 22:14 ` [PATCH v6 00/12] Rockchip VOP2 support Stefan Monnier
2026-01-09 1:41 ` Peter Robinson
2026-01-09 4:07 ` Stefan Monnier
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=acJiSYOlV3FJtx-v@meltbook-pro \
--to=dang.huynh@mainlining.org \
--cc=ag.dev.uboot@gmail.com \
--cc=agraf@csgraf.de \
--cc=alpernebiyasak@gmail.com \
--cc=clamor95@gmail.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=dsimic@manjaro.org \
--cc=frattaroli.nicolas@gmail.com \
--cc=ion@agorria.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=megi@xff.cz \
--cc=miquel.raynal@bootlin.com \
--cc=pZ010001011111@proton.me \
--cc=patrice.chotard@foss.st.com \
--cc=pbrobinson@gmail.com \
--cc=philipp.tomsich@vrull.eu \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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