mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-28 21:46:02 -04:00
drm: move content protection property to mode_config
Content protection property is created once and stored in drm_mode_config. And attached to all HDCP capable connectors. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-2-ramalingam.c@intel.com
This commit is contained in:
committed by
Daniel Vetter
parent
0152b3b3f4
commit
585b000de2
@@ -1534,18 +1534,19 @@ int drm_connector_attach_content_protection_property(
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_property *prop;
|
||||
struct drm_property *prop =
|
||||
dev->mode_config.content_protection_property;
|
||||
|
||||
prop = drm_property_create_enum(dev, 0, "Content Protection",
|
||||
drm_cp_enum_list,
|
||||
ARRAY_SIZE(drm_cp_enum_list));
|
||||
if (!prop)
|
||||
prop = drm_property_create_enum(dev, 0, "Content Protection",
|
||||
drm_cp_enum_list,
|
||||
ARRAY_SIZE(drm_cp_enum_list));
|
||||
if (!prop)
|
||||
return -ENOMEM;
|
||||
|
||||
drm_object_attach_property(&connector->base, prop,
|
||||
DRM_MODE_CONTENT_PROTECTION_UNDESIRED);
|
||||
|
||||
connector->content_protection_property = prop;
|
||||
dev->mode_config.content_protection_property = prop;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user