From: Jonas Karlman <jonas@kwiboo.se>
To: Damon Ding <damon.ding@rock-chips.com>
Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org,
rfoss@kernel.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, hjc@rock-chips.com, heiko@sntech.de,
andy.yan@rock-chips.com, wens@kernel.org, samuel@sholland.org,
luca.ceresoli@bootlin.com, Laurent.pinchart@ideasonboard.com,
jernej.skrabec@gmail.com, victor.liu@nxp.com,
dmitry.baryshkov@oss.qualcomm.com, shengjiu.wang@nxp.com,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v1 3/4] drm/rockchip: dw_hdmi: Apply DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector
Date: Sun, 10 May 2026 21:12:08 +0200 [thread overview]
Message-ID: <53e09f70-c449-49bb-b2a0-636d5d4bd395@kwiboo.se> (raw)
In-Reply-To: <20260403070032.447102-4-damon.ding@rock-chips.com>
Hi Damon,
On 4/3/2026 9:00 AM, Damon Ding wrote:
> Convert this driver to DRM_BRIDGE_ATTACH_NO_CONNECTOR and to the
> drm_bridge_connector framework which is the current DRM bridge best
> practice.
Changing to use the bridge connector at this stage will cause the
Rockchip platform to drop features the dw-hdmi connector currently only
can provide, e.g. a CEC notifier, some connector properties and more.
I am also currently working on a multi series effort to:
- phy: rockchip: inno-hdmi: Change TMDS rate handling to configure() ops [v2]
- drm/rockchip: dw_hdmi: Misc cleanup and propagate bus format [v1]
- drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup [v5]
- drm/bridge: dw-hdmi: Improve input/output bus format handling
- drm/bridge: dw-hdmi: Convert to a HDMI bridge and use of bridge connector
- drm/bridge: dw-hdmi: Add and use tmds_char_rate_valid() plat data ops
- drm/meson: hdmi: Misc cleanup and use CEC notifier helpers
- drm/rockchip: dw_hdmi: Enable YCbCr and Deep Color modes
Link to snapshot: https://github.com/Kwiboo/linux-rockchip/commits/next-20260508-rk-hdmi-v3/
Part of that effort include to fully convert the dw-hdmi bridge into a
HDMI bridge, something that is required to fully be able to replace all
features currently provided by the use of the dw-hdmi connector.
In that effort I have also taken a different approach and instead
replace the dw-hdmi connector with the bridge connector directly from
inside the dw-hdmi bridge driver.
Regards,
Jonas
> Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
> ---
> drivers/gpu/drm/rockchip/Kconfig | 1 +
> drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 19 +++++++++++++++----
> 2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig
> index e7f49fe845ea..69b832d0c8c4 100644
> --- a/drivers/gpu/drm/rockchip/Kconfig
> +++ b/drivers/gpu/drm/rockchip/Kconfig
> @@ -76,6 +76,7 @@ config ROCKCHIP_DW_DP
>
> config ROCKCHIP_DW_HDMI
> bool "Rockchip specific extensions for Synopsys DW HDMI"
> + select DRM_BRIDGE_CONNECTOR
> help
> This selects support for Rockchip SoC specific extensions
> for the Synopsys DesignWare HDMI driver. If you want to
> diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> index 21b141b7cb9c..b5cfcb936078 100644
> --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
> @@ -13,6 +13,7 @@
> #include <linux/regulator/consumer.h>
>
> #include <drm/bridge/dw_hdmi.h>
> +#include <drm/drm_bridge_connector.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_of.h>
> #include <drm/drm_probe_helper.h>
> @@ -542,6 +543,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
> struct drm_device *drm = data;
> struct drm_encoder *encoder;
> struct rockchip_hdmi *hdmi;
> + struct drm_connector *connector;
> int ret;
>
> if (!pdev->dev.of_node)
> @@ -608,7 +610,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
>
> platform_set_drvdata(pdev, hdmi);
>
> - hdmi->hdmi = dw_hdmi_bind(pdev, encoder, plat_data, 0);
> + hdmi->hdmi = dw_hdmi_bind(pdev, encoder, plat_data, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
>
> /*
> * If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(),
> @@ -616,12 +618,21 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
> */
> if (IS_ERR(hdmi->hdmi)) {
> ret = PTR_ERR(hdmi->hdmi);
> - goto err_bind;
> + goto err_cleanup_encoder;
> }
>
> - return 0;
> + connector = drm_bridge_connector_init(drm, encoder);
> + if (IS_ERR(connector)) {
> + ret = PTR_ERR(connector);
> + dev_err(hdmi->dev, "Failed to initialize bridge_connector\n");
> + goto err_unbind_bridge;
> + }
>
> -err_bind:
> + return drm_connector_attach_encoder(connector, encoder);
> +
> +err_unbind_bridge:
> + dw_hdmi_unbind(hdmi->hdmi);
> +err_cleanup_encoder:
> drm_encoder_cleanup(encoder);
>
> return ret;
next prev parent reply other threads:[~2026-05-10 19:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 7:00 [PATCH v1 0/4] Apply bridge-connector for the Rockchip DW-HDMI driver Damon Ding
2026-04-03 7:00 ` [PATCH v1 1/4] drm/bridge: dw-hdmi: Pass bridge attach flags for dw_hdmi_bind() Damon Ding
2026-05-10 18:49 ` Jonas Karlman
2026-04-03 7:00 ` [PATCH v1 2/4] drm/bridge: dw-hdmi: Allow &dw_hdmi_plat_data.output_port = 0 without DRM_BRIDGE_ATTACH_NO_CONNECTOR Damon Ding
2026-04-07 14:53 ` Luca Ceresoli
2026-04-03 7:00 ` [PATCH v1 3/4] drm/rockchip: dw_hdmi: Apply DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Damon Ding
2026-05-10 19:12 ` Jonas Karlman [this message]
2026-04-03 7:00 ` [PATCH v1 4/4] drm/rockchip: dw_hdmi: Support to find the next bridge Damon Ding
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=53e09f70-c449-49bb-b2a0-636d5d4bd395@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=damon.ding@rock-chips.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=samuel@sholland.org \
--cc=shengjiu.wang@nxp.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
--cc=wens@kernel.org \
/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