mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
drm_bridge: register content protect property
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> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Fei Shao <fshao@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20250812082135.3351172-2-fshao@chromium.org
This commit is contained in:
parent
2f44bb65f2
commit
407a2fab3c
|
|
@ -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)
|
||||
|
|
@ -849,6 +854,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);
|
||||
|
|
|
|||
|
|
@ -1171,6 +1171,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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user