From e00541fcb23908157e7e5e126a672b2729335b09 Mon Sep 17 00:00:00 2001 From: Sean Paul Date: Tue, 26 Sep 2017 16:19:21 -0400 Subject: [PATCH] CHROMIUM: drm: Update Content Protection ABI The Content Protection properties in 4.4 used v2 of the upstream patches, but chrome (and upstream) prefer v1. This patch removes the ksv property and reinstates the ENABLED enum value to the content protection property. BUG=b:63816472 TEST=Watch protected content on external display, ensure CP is enabled/disabled properly by chrome Signed-off-by: Sean Paul Reviewed-on: https://chromium-review.googlesource.com/687800 Commit-Ready: Sean Paul Tested-by: Sean Paul Reviewed-by: Kristian H. Kristensen Change-Id: I38cecce2d15b4d4b1ce95ef0e572a08f1bc97131 Signed-off-by: Wyon Bi --- drivers/gpu/drm/drm_crtc.c | 5 ----- drivers/gpu/drm/drm_sysfs.c | 23 ----------------------- include/drm/drm_crtc.h | 1 - 3 files changed, 29 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 4802d5458a13..3e3af957f336 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1817,11 +1817,6 @@ static int drm_mode_create_standard_properties(struct drm_device *dev) ARRAY_SIZE(drm_cp_enum_list)); dev->mode_config.content_protection_property = prop; - prop = drm_property_create_range(dev, DRM_MODE_PROP_IMMUTABLE, - "Content Protection KSV", 0, - 0xFFFFFFFFFF); - dev->mode_config.content_protection_ksv_property = prop; - return 0; } diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index c8e5bcc954bb..740e668dd397 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -288,27 +288,6 @@ static ssize_t content_protection_show(struct device *device, drm_get_content_protection_name((int)cp)); } -static ssize_t content_protection_ksv_show(struct device *device, - struct device_attribute *attr, - char *buf) -{ - struct drm_connector *connector = to_drm_connector(device); - struct drm_device *dev = connector->dev; - struct drm_property *prop; - uint64_t ksv; - int ret; - - prop = dev->mode_config.content_protection_ksv_property; - if (!prop) - return 0; - - ret = drm_object_property_get_value(&connector->base, prop, &ksv); - if (ret) - return 0; - - return snprintf(buf, PAGE_SIZE, "%llx\n", ksv); -} - static int drm_get_audio_format(struct edid *edid, char *audioformat, int len) { @@ -438,7 +417,6 @@ static DEVICE_ATTR_RO(dpms); static DEVICE_ATTR_RO(modes); static DEVICE_ATTR_RO(mode); static DEVICE_ATTR_RO(content_protection); -static DEVICE_ATTR_RO(content_protection_ksv); static DEVICE_ATTR_RO(audioformat); static struct attribute *connector_dev_attrs[] = { @@ -448,7 +426,6 @@ static struct attribute *connector_dev_attrs[] = { &dev_attr_modes.attr, &dev_attr_mode.attr, &dev_attr_content_protection.attr, - &dev_attr_content_protection_ksv.attr, &dev_attr_audioformat.attr, NULL }; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 82b866608b81..e7fb665befea 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1640,7 +1640,6 @@ struct drm_mode_config { struct drm_property *prop_active; struct drm_property *prop_mode_id; struct drm_property *content_protection_property; - struct drm_property *content_protection_ksv_property; /* DVI-I properties */ struct drm_property *dvi_i_subconnector_property;