From: Hsin-Yi Wang <hsinyi@chromium.org>
Some bridges can update HDCP status based on userspace requests if they
support HDCP.
The HDCP property is created after connector initialization and before
registration, just like other connector properties.
Add the content protection property to the connector if a bridge
supports HDCP.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
Changes in v8:
- rebase on top of next-20250731
drivers/gpu/drm/display/drm_bridge_connector.c | 9 +++++++++
include/drm/drm_bridge.h | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
index 5eb7e9bfe361..20376d9616ec 100644
--- a/drivers/gpu/drm/display/drm_bridge_connector.c
+++ b/drivers/gpu/drm/display/drm_bridge_connector.c
@@ -20,6 +20,7 @@
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
+#include <drm/display/drm_hdcp_helper.h>
#include <drm/display/drm_hdmi_audio_helper.h>
#include <drm/display/drm_hdmi_cec_helper.h>
#include <drm/display/drm_hdmi_helper.h>
@@ -641,6 +642,7 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
struct drm_bridge *bridge, *panel_bridge = NULL;
unsigned int supported_formats = BIT(HDMI_COLORSPACE_RGB);
unsigned int max_bpc = 8;
+ bool support_hdcp = false;
int connector_type;
int ret;
@@ -763,6 +765,9 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
if (drm_bridge_is_panel(bridge))
panel_bridge = bridge;
+
+ if (bridge->support_hdcp)
+ support_hdcp = true;
}
if (connector_type == DRM_MODE_CONNECTOR_Unknown)
@@ -845,6 +850,10 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
if (panel_bridge)
drm_panel_bridge_set_orientation(connector, panel_bridge);
+ if (support_hdcp && IS_REACHABLE(CONFIG_DRM_DISPLAY_HELPER) &&
+ IS_ENABLED(CONFIG_DRM_DISPLAY_HDCP_HELPER))
+ drm_connector_attach_content_protection_property(connector, true);
+
return connector;
}
EXPORT_SYMBOL_GPL(drm_bridge_connector_init);
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 8ed80cad77ec..c0c02d65a3fb 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -1122,6 +1122,10 @@ struct drm_bridge {
* before the peripheral.
*/
bool pre_enable_prev_first;
+ /**
+ * @support_hdcp: Indicate that the bridge supports HDCP.
+ */
+ bool support_hdcp;
/**
* @ddc: Associated I2C adapter for DDC access, if any.
*/
--
2.51.0.rc0.205.g4a044479a3-goog
Hi, On Tue, Aug 12, 2025 at 1:23 AM Fei Shao <fshao@chromium.org> wrote: > > From: Hsin-Yi Wang <hsinyi@chromium.org> > > Some bridges can update HDCP status based on userspace requests if they > support HDCP. > > The HDCP property is created after connector initialization and before > registration, just like other connector properties. > > Add the content protection property to the connector if a bridge > supports HDCP. > > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> > Signed-off-by: Fei Shao <fshao@chromium.org> > Reviewed-by: Sean Paul <seanpaul@chromium.org> nit: your Signed-off-by should always be moved to the bottom when posting patches. I wouldn't bother re-posting just for that, though... I can also independently confirm that Sean provided his Reviewed-by tag and then it will be covered by my Signed-off-by. As per my response to the cover letter [1], I'll plan to land both patches midway through next week unless there are objections. [1] https://lore.kernel.org/r/CAD=FV=U+Zh2V2r-THx25Qw7W-Fu_qM4v-+Evi+1tBCg92ieYKg@mail.gmail.com/ -Doug
On Wed, Aug 13, 2025 at 2:07 AM Doug Anderson <dianders@chromium.org> wrote: > > Hi, > > On Tue, Aug 12, 2025 at 1:23 AM Fei Shao <fshao@chromium.org> wrote: > > > > From: Hsin-Yi Wang <hsinyi@chromium.org> > > > > Some bridges can update HDCP status based on userspace requests if they > > support HDCP. > > > > The HDCP property is created after connector initialization and before > > registration, just like other connector properties. > > > > Add the content protection property to the connector if a bridge > > supports HDCP. > > > > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> > > Signed-off-by: Fei Shao <fshao@chromium.org> > > Reviewed-by: Sean Paul <seanpaul@chromium.org> > > nit: your Signed-off-by should always be moved to the bottom when > posting patches. I wouldn't bother re-posting just for that, though... Ah sorry, I didn't notice that.. Could you rearrange the tag order for me when applying these patches? Thanks, Fei
Hi,
On Tue, Aug 12, 2025 at 8:01 PM Fei Shao <fshao@chromium.org> wrote:
>
> On Wed, Aug 13, 2025 at 2:07 AM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Tue, Aug 12, 2025 at 1:23 AM Fei Shao <fshao@chromium.org> wrote:
> > >
> > > From: Hsin-Yi Wang <hsinyi@chromium.org>
> > >
> > > Some bridges can update HDCP status based on userspace requests if they
> > > support HDCP.
> > >
> > > The HDCP property is created after connector initialization and before
> > > registration, just like other connector properties.
> > >
> > > Add the content protection property to the connector if a bridge
> > > supports HDCP.
> > >
> > > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > > Signed-off-by: Fei Shao <fshao@chromium.org>
> > > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> >
> > nit: your Signed-off-by should always be moved to the bottom when
> > posting patches. I wouldn't bother re-posting just for that, though...
>
> Ah sorry, I didn't notice that..
> Could you rearrange the tag order for me when applying these patches?
Sure, adjusted and pushed to drm-misc-next:
[1/2] drm_bridge: register content protect property
commit: 407a2fab3c99c40ad1acedaf028e8222da1f0433
© 2016 - 2026 Red Hat, Inc.