Skip to contentSkip to conversation

drm/hdcp: optimizing the srm handling

PATCH Superseded Ramalingam C 3 participants 5 messages Jan 27, 2020 – Jan 28, 2020

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/hdcp: optimizing the srm handling

As we are not using the sysfs infrastructure anymore, link to it is removed. And global srm data and mutex to protect it are removed, with required handling at revocation check function.

v2:
srm_data is dropped and few more comments are addressed.

---
 drivers/gpu/drm/drm_hdcp.c     | 144 ++++++++++++---------------------
 drivers/gpu/drm/drm_internal.h |   4 -
 drivers/gpu/drm/drm_sysfs.c    |   2 -
 include/drm/drm_hdcp.h         |   4 +-
 4 files changed, 55 insertions(+), 99 deletions(-)
drivers/gpu/drm/drm_hdcp.c +53 -91
index 9191633a3c43..30749a13108e 100644
@@ -23,14 +23,6 @@
 
 #include "drm_internal.h"
 
-static struct hdcp_srm {
-	u32 revoked_ksv_cnt;
-	u8 *revoked_ksv_list;
-
-	/* Mutex to protect above struct member */
-	struct mutex mutex;
-} *srm_data;
-
 static inline void drm_hdcp_print_ksv(const u8 *ksv)
 {
 	DRM_DEBUG("\t%#02x, %#02x, %#02x, %#02x, %#02x\n",
@@ -91,7 +83,8 @@ static inline u32 get_vrl_length(const u8 *buf)
 	return drm_hdcp_be24_to_cpu(buf);
 }
 
-static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count;
@@ -131,29 +124,28 @@ static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
 	ksv_count = drm_hdcp_get_revoked_ksv_count(buf, vrl_length);
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
 
-	if (drm_hdcp_get_revoked_ksvs(buf, srm_data->revoked_ksv_list,
+	if (drm_hdcp_get_revoked_ksvs(buf, revoked_ksv_list,
 				      vrl_length) != ksv_count) {
-		srm_data->revoked_ksv_cnt = 0;
-		kfree(srm_data->revoked_ksv_list);
+		*revoked_ksv_cnt = 0;
+		kfree(revoked_ksv_list);
 		return -EINVAL;
 	}
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
-static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count, ksv_sz;
@@ -195,13 +187,11 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	ksv_count = (*buf << 2) | DRM_HDCP_2_KSV_COUNT_2_LSBITS(*(buf + 1));
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
@@ -210,10 +200,10 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	buf += DRM_HDCP_2_NO_OF_DEV_PLUS_RESERVED_SZ;
 
 	DRM_DEBUG("Revoked KSVs: %d\n", ksv_count);
-	memcpy(srm_data->revoked_ksv_list, buf, ksv_sz);
+	memcpy(revoked_ksv_list, buf, ksv_sz);
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
 static inline bool is_srm_version_hdcp1(const u8 *buf)
@@ -226,18 +216,22 @@ static inline bool is_srm_version_hdcp2(const u8 *buf)
 	return *buf == (u8)(DRM_HDCP_2_SRM_ID << 4 | DRM_HDCP_2_INDICATOR);
 }
 
-static void drm_hdcp_srm_update(const u8 *buf, size_t count)
+static void drm_hdcp_srm_update(const u8 *buf, size_t count,
+				u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)
 {
 	if (count < sizeof(struct hdcp_srm_header))
 		return;
 
 	if (is_srm_version_hdcp1(buf))
-		drm_hdcp_parse_hdcp1_srm(buf, count);
+		drm_hdcp_parse_hdcp1_srm(buf, count, revoked_ksv_list,
+					 revoked_ksv_cnt);
 	else if (is_srm_version_hdcp2(buf))
-		drm_hdcp_parse_hdcp2_srm(buf, count);
+		drm_hdcp_parse_hdcp2_srm(buf, count, revoked_ksv_list,
+					 revoked_ksv_cnt);
 }
 
-static void drm_hdcp_request_srm(struct drm_device *drm_dev)
+static void drm_hdcp_request_srm(struct drm_device *drm_dev,
+				 u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)
 {
 	char fw_name[36] = "display_hdcp_srm.bin";
 	const struct firmware *fw;
@@ -250,7 +244,8 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
 		goto exit;
 
 	if (fw->size && fw->data)
-		drm_hdcp_srm_update(fw->data, fw->size);
+		drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
+				    revoked_ksv_cnt);
 
 exit:
 	release_firmware(fw);
@@ -279,70 +274,37 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
  * https://www.digital-cp.com/sites/default/files/specifications/HDCP%20on%20HDMI%20Specification%20Rev2_2_Final1.pdf
  *
  * Returns:
- * TRUE on any of the KSV is revoked, else FALSE.
+ * Count of the revoked KSVs.
  */
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs,
-				 u32 ksv_count)
+int drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs_in,
+				u32 ksv_count)
 {
-	u32 rev_ksv_cnt, cnt, i, j;
-	u8 *rev_ksv_list;
-
-	if (!srm_data)
-		return false;
-
-	mutex_lock(&srm_data->mutex);
-	drm_hdcp_request_srm(drm_dev);
-
-	rev_ksv_cnt = srm_data->revoked_ksv_cnt;
-	rev_ksv_list = srm_data->revoked_ksv_list;
-
-	/* If the Revoked ksv list is empty */
-	if (!rev_ksv_cnt || !rev_ksv_list) {
-		mutex_unlock(&srm_data->mutex);
-		return false;
-	}
-
-	for  (cnt = 0; cnt < ksv_count; cnt++) {
-		rev_ksv_list = srm_data->revoked_ksv_list;
-		for (i = 0; i < rev_ksv_cnt; i++) {
-			for (j = 0; j < DRM_HDCP_KSV_LEN; j++)
-				if (ksvs[j] != rev_ksv_list[j]) {
-					break;
-				} else if (j == (DRM_HDCP_KSV_LEN - 1)) {
-					DRM_DEBUG("Revoked KSV is ");
-					drm_hdcp_print_ksv(ksvs);
-					mutex_unlock(&srm_data->mutex);
-					return true;
-				}
-			/* Move the offset to next KSV in the revoked list */
-			rev_ksv_list += DRM_HDCP_KSV_LEN;
+	u8 *revoked_ksv_list = NULL, *ksvs, *list_itr;
+	u32 revoked_ksv_cnt = 0, i, j;
+	int ret = 0;
+
+	drm_hdcp_request_srm(drm_dev, revoked_ksv_list, &revoked_ksv_cnt);
+	list_itr = revoked_ksv_list;
+
+	for (i = 0; i < revoked_ksv_cnt; i++) {
+		ksvs = ksvs_in;
+		for  (j = 0; j < ksv_count; j++) {
+			if (!memcmp(ksvs, list_itr, DRM_HDCP_KSV_LEN)) {
+				DRM_DEBUG("Revoked KSV is ");
+				drm_hdcp_print_ksv(ksvs);
+				ret++;
+			}
+			/* Iterate to next ksv_offset */
+			ksvs += DRM_HDCP_KSV_LEN;
 		}
-
-		/* Iterate to next ksv_offset */
-		ksvs += DRM_HDCP_KSV_LEN;
+		/* Move the offset to next KSV in the revoked list */
+		list_itr += DRM_HDCP_KSV_LEN;
 	}
-	mutex_unlock(&srm_data->mutex);
-	return false;
-}
-EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
-
-int drm_setup_hdcp_srm(struct class *drm_class)
-{
-	srm_data = kzalloc(sizeof(*srm_data), GFP_KERNEL);
-	if (!srm_data)
-		return -ENOMEM;
-	mutex_init(&srm_data->mutex);
 
-	return 0;
-}
-
-void drm_teardown_hdcp_srm(struct class *drm_class)
-{
-	if (srm_data) {
-		kfree(srm_data->revoked_ksv_list);
-		kfree(srm_data);
-	}
+	kfree(revoked_ksv_list);
+	return ret;
 }
+EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
 
 static struct drm_prop_enum_list drm_cp_enum_list[] = {
 	{ DRM_MODE_CONTENT_PROTECTION_UNDESIRED, "Undesired" },
drivers/gpu/drm/drm_internal.h +0 -4
index 6937bf923f05..a34c7f8373fa 100644
@@ -235,7 +235,3 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,
 void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent,
 				const struct drm_framebuffer *fb);
 int drm_framebuffer_debugfs_init(struct drm_minor *minor);
-
-/* drm_hdcp.c */
-int drm_setup_hdcp_srm(struct class *drm_class);
-void drm_teardown_hdcp_srm(struct class *drm_class);
drivers/gpu/drm/drm_sysfs.c +0 -2
index dd2bc85f43cc..2e83c3d72af9 100644
@@ -85,7 +85,6 @@ int drm_sysfs_init(void)
 	}
 
 	drm_class->devnode = drm_devnode;
-	drm_setup_hdcp_srm(drm_class);
 	return 0;
 }
 
@@ -98,7 +97,6 @@ void drm_sysfs_destroy(void)
 {
 	if (IS_ERR_OR_NULL(drm_class))
 		return;
-	drm_teardown_hdcp_srm(drm_class);
 	class_remove_file(drm_class, &class_attr_version.attr);
 	class_destroy(drm_class);
 	drm_class = NULL;
include/drm/drm_hdcp.h +2 -2
index 06a11202a097..d512089b873f 100644
@@ -288,8 +288,8 @@ struct hdcp_srm_header {
 struct drm_device;
 struct drm_connector;
 
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
-				 u8 *ksvs, u32 ksv_count);
+int drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
+				u8 *ksvs, u32 ksv_count);
 int drm_connector_attach_content_protection_property(
 		struct drm_connector *connector, bool hdcp_content_type);
 void drm_hdcp_update_content_protection(struct drm_connector *connector,
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 36 lines · Ramalingam C

As we are not using the sysfs infrastructure anymore, link to it is removed. And global srm data and mutex to protect it are removed, with required handling at revocation check function.

v2:
srm_data is dropped and few more comments are addressed.

---
 drivers/gpu/drm/drm_hdcp.c     | 144 ++++++++++++---------------------
 drivers/gpu/drm/drm_internal.h |   4 -
 drivers/gpu/drm/drm_sysfs.c    |   2 -
 include/drm/drm_hdcp.h         |   4 +-
 4 files changed, 55 insertions(+), 99 deletions(-)
drivers/gpu/drm/drm_hdcp.c +0 -8
index 9191633a3c43..30749a13108e 100644
@@ -23,14 +23,6 @@
 
 #include "drm_internal.h"
 
-static struct hdcp_srm {
-	u32 revoked_ksv_cnt;
-	u8 *revoked_ksv_list;
-
-	/* Mutex to protect above struct member */
-	struct mutex mutex;
-} *srm_data;
-
 static inline void drm_hdcp_print_ksv(const u8 *ksv)
 {
 	DRM_DEBUG("\t%#02x, %#02x, %#02x, %#02x, %#02x\n",

drivers/gpu/drm/drm_hdcp.c static inline u32 get_vrl_length(const u8 *buf) · line 87

Quoted 6 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
@@ -91,7 +83,8 @@ static inline u32 get_vrl_length(const u8 *buf)
 	return drm_hdcp_be24_to_cpu(buf);
 }
 
-static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

Shouldn't this be u8 **revoked_ksv_list since you want to return the pointer for use in the caller? I'm surprised any of this worked when you tested it...

Quoted 30 lines
drivers/gpu/drm/drm_hdcp.c +6 -8
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count;
@@ -131,29 +124,28 @@ static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
 	ksv_count = drm_hdcp_get_revoked_ksv_count(buf, vrl_length);
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
 
-	if (drm_hdcp_get_revoked_ksvs(buf, srm_data->revoked_ksv_list,
+	if (drm_hdcp_get_revoked_ksvs(buf, revoked_ksv_list,
 				      vrl_length) != ksv_count) {
-		srm_data->revoked_ksv_cnt = 0;
-		kfree(srm_data->revoked_ksv_list);
+		*revoked_ksv_cnt = 0;
+		kfree(revoked_ksv_list);
 		return -EINVAL;
 	}

drivers/gpu/drm/drm_hdcp.c static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count) · line 148

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +4 -3
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
-static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

Same comment here, this should be u8 **

Quoted 35 lines
drivers/gpu/drm/drm_hdcp.c +6 -8
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count, ksv_sz;
@@ -195,13 +187,11 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	ksv_count = (*buf << 2) | DRM_HDCP_2_KSV_COUNT_2_LSBITS(*(buf + 1));
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
@@ -210,10 +200,10 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	buf += DRM_HDCP_2_NO_OF_DEV_PLUS_RESERVED_SZ;
 
 	DRM_DEBUG("Revoked KSVs: %d\n", ksv_count);
-	memcpy(srm_data->revoked_ksv_list, buf, ksv_sz);
+	memcpy(revoked_ksv_list, buf, ksv_sz);
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
 static inline bool is_srm_version_hdcp1(const u8 *buf)

drivers/gpu/drm/drm_hdcp.c static inline bool is_srm_version_hdcp2(const u8 *buf) · line 220

Quoted 6 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
@@ -226,18 +216,22 @@ static inline bool is_srm_version_hdcp2(const u8 *buf)
 	return *buf == (u8)(DRM_HDCP_2_SRM_ID << 4 | DRM_HDCP_2_INDICATOR);
 }
 
-static void drm_hdcp_srm_update(const u8 *buf, size_t count)
+static void drm_hdcp_srm_update(const u8 *buf, size_t count,
+				u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

and here

Quoted 7 lines
drivers/gpu/drm/drm_hdcp.c +1 -1
 {
 	if (count < sizeof(struct hdcp_srm_header))
 		return;
 
 	if (is_srm_version_hdcp1(buf))
-		drm_hdcp_parse_hdcp1_srm(buf, count);
+		drm_hdcp_parse_hdcp1_srm(buf, count, revoked_ksv_list,

drivers/gpu/drm/drm_hdcp.c static inline bool is_srm_version_hdcp2(const u8 *buf) · line 234

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +5 -2
+					 revoked_ksv_cnt);
 	else if (is_srm_version_hdcp2(buf))
-		drm_hdcp_parse_hdcp2_srm(buf, count);
+		drm_hdcp_parse_hdcp2_srm(buf, count, revoked_ksv_list,
+					 revoked_ksv_cnt);
 }
 
-static void drm_hdcp_request_srm(struct drm_device *drm_dev)
+static void drm_hdcp_request_srm(struct drm_device *drm_dev,
+				 u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

and here

Quoted 14 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
 {
 	char fw_name[36] = "display_hdcp_srm.bin";
 	const struct firmware *fw;
@@ -250,7 +244,8 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
 		goto exit;
 
 	if (fw->size && fw->data)
-		drm_hdcp_srm_update(fw->data, fw->size);
+		drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
+				    revoked_ksv_cnt);
 
 exit:
 	release_firmware(fw);

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 277

Quoted 5 lines
drivers/gpu/drm/drm_hdcp.c +1 -1
@@ -279,70 +274,37 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
  * https://www.digital-cp.com/sites/default/files/specifications/HDCP%20on%20HDMI%20Specification%20Rev2_2_Final1.pdf
  *
  * Returns:
- * TRUE on any of the KSV is revoked, else FALSE.
+ * Count of the revoked KSVs.

What about on error?

Quoted 29 lines
drivers/gpu/drm/drm_hdcp.c +2 -25
  */
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs,
-				 u32 ksv_count)
+int drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs_in,
+				u32 ksv_count)
 {
-	u32 rev_ksv_cnt, cnt, i, j;
-	u8 *rev_ksv_list;
-
-	if (!srm_data)
-		return false;
-
-	mutex_lock(&srm_data->mutex);
-	drm_hdcp_request_srm(drm_dev);
-
-	rev_ksv_cnt = srm_data->revoked_ksv_cnt;
-	rev_ksv_list = srm_data->revoked_ksv_list;
-
-	/* If the Revoked ksv list is empty */
-	if (!rev_ksv_cnt || !rev_ksv_list) {
-		mutex_unlock(&srm_data->mutex);
-		return false;
-	}
-
-	for  (cnt = 0; cnt < ksv_count; cnt++) {
-		rev_ksv_list = srm_data->revoked_ksv_list;
-		for (i = 0; i < rev_ksv_cnt; i++) {
-			for (j = 0; j < DRM_HDCP_KSV_LEN; j++)
-				if (ksvs[j] != rev_ksv_list[j]) {

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 282

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +1 -9
-					break;
-				} else if (j == (DRM_HDCP_KSV_LEN - 1)) {
-					DRM_DEBUG("Revoked KSV is ");
-					drm_hdcp_print_ksv(ksvs);
-					mutex_unlock(&srm_data->mutex);
-					return true;
-				}
-			/* Move the offset to next KSV in the revoked list */
-			rev_ksv_list += DRM_HDCP_KSV_LEN;
+	u8 *revoked_ksv_list = NULL, *ksvs, *list_itr;

Where is revoked_ksv_list freed?

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 286

Quoted 4 lines
drivers/gpu/drm/drm_hdcp.c +4 -0
+	u32 revoked_ksv_cnt = 0, i, j;
+	int ret = 0;
+
+	drm_hdcp_request_srm(drm_dev, revoked_ksv_list, &revoked_ksv_cnt);

This can't fail?

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 291

Quoted 5 lines
drivers/gpu/drm/drm_hdcp.c +5 -0
+	list_itr = revoked_ksv_list;
+
+	for (i = 0; i < revoked_ksv_cnt; i++) {
+		ksvs = ksvs_in;
+		for  (j = 0; j < ksv_count; j++) {

You can save yourself the iterators if you just generate the offsets like:

        for (i = 0; i < revoked_ksv_cnt; i++) {
                u8 *a = &ksvs_in[j * DRM_HDCP_KSV_LEN];
                for  (j = 0; j < ksv_count; j++) {
                        u8 *b = &revoked_ksv_list[i * DRM_HDCP_KSV_LEN];

                        if (!memcmp(a, b, DRM_HDCP_KSV_LEN)) {
                                ...
                        }
Quoted 96 lines
drivers/gpu/drm/drm_hdcp.c +12 -23
+			if (!memcmp(ksvs, list_itr, DRM_HDCP_KSV_LEN)) {
+				DRM_DEBUG("Revoked KSV is ");
+				drm_hdcp_print_ksv(ksvs);
+				ret++;
+			}
+			/* Iterate to next ksv_offset */
+			ksvs += DRM_HDCP_KSV_LEN;
 		}
-
-		/* Iterate to next ksv_offset */
-		ksvs += DRM_HDCP_KSV_LEN;
+		/* Move the offset to next KSV in the revoked list */
+		list_itr += DRM_HDCP_KSV_LEN;
 	}
-	mutex_unlock(&srm_data->mutex);
-	return false;
-}
-EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
-
-int drm_setup_hdcp_srm(struct class *drm_class)
-{
-	srm_data = kzalloc(sizeof(*srm_data), GFP_KERNEL);
-	if (!srm_data)
-		return -ENOMEM;
-	mutex_init(&srm_data->mutex);
 
-	return 0;
-}
-
-void drm_teardown_hdcp_srm(struct class *drm_class)
-{
-	if (srm_data) {
-		kfree(srm_data->revoked_ksv_list);
-		kfree(srm_data);
-	}
+	kfree(revoked_ksv_list);
+	return ret;
 }
+EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
 
 static struct drm_prop_enum_list drm_cp_enum_list[] = {
 	{ DRM_MODE_CONTENT_PROTECTION_UNDESIRED, "Undesired" },
drivers/gpu/drm/drm_internal.h +0 -4
index 6937bf923f05..a34c7f8373fa 100644
@@ -235,7 +235,3 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,
 void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent,
 				const struct drm_framebuffer *fb);
 int drm_framebuffer_debugfs_init(struct drm_minor *minor);
-
-/* drm_hdcp.c */
-int drm_setup_hdcp_srm(struct class *drm_class);
-void drm_teardown_hdcp_srm(struct class *drm_class);
drivers/gpu/drm/drm_sysfs.c +0 -2
index dd2bc85f43cc..2e83c3d72af9 100644
@@ -85,7 +85,6 @@ int drm_sysfs_init(void)
 	}
 
 	drm_class->devnode = drm_devnode;
-	drm_setup_hdcp_srm(drm_class);
 	return 0;
 }
 
@@ -98,7 +97,6 @@ void drm_sysfs_destroy(void)
 {
 	if (IS_ERR_OR_NULL(drm_class))
 		return;
-	drm_teardown_hdcp_srm(drm_class);
 	class_remove_file(drm_class, &class_attr_version.attr);
 	class_destroy(drm_class);
 	drm_class = NULL;
include/drm/drm_hdcp.h +2 -2
index 06a11202a097..d512089b873f 100644
@@ -288,8 +288,8 @@ struct hdcp_srm_header {
 struct drm_device;
 struct drm_connector;
 
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
-				 u8 *ksvs, u32 ksv_count);
+int drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
+				u8 *ksvs, u32 ksv_count);
 int drm_connector_attach_content_protection_property(
 		struct drm_connector *connector, bool hdcp_content_type);
 void drm_hdcp_update_content_protection(struct drm_connector *connector,
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 40 lines · Sean Paul
Quoted 39 lines · Ramalingam C

As we are not using the sysfs infrastructure anymore, link to it is removed. And global srm data and mutex to protect it are removed, with required handling at revocation check function.

v2:
srm_data is dropped and few more comments are addressed.

---
 drivers/gpu/drm/drm_hdcp.c     | 144 ++++++++++++---------------------
 drivers/gpu/drm/drm_internal.h |   4 -
 drivers/gpu/drm/drm_sysfs.c    |   2 -
 include/drm/drm_hdcp.h         |   4 +-
 4 files changed, 55 insertions(+), 99 deletions(-)
drivers/gpu/drm/drm_hdcp.c +0 -8
index 9191633a3c43..30749a13108e 100644
@@ -23,14 +23,6 @@
 
 #include "drm_internal.h"
 
-static struct hdcp_srm {
-	u32 revoked_ksv_cnt;
-	u8 *revoked_ksv_list;
-
-	/* Mutex to protect above struct member */
-	struct mutex mutex;
-} *srm_data;
-
 static inline void drm_hdcp_print_ksv(const u8 *ksv)
 {
 	DRM_DEBUG("\t%#02x, %#02x, %#02x, %#02x, %#02x\n",
@@ -91,7 +83,8 @@ static inline u32 get_vrl_length(const u8 *buf)
 	return drm_hdcp_be24_to_cpu(buf);
 }
 
Quoted 6 lines

drivers/gpu/drm/drm_hdcp.c static inline u32 get_vrl_length(const u8 *buf) · line 87

Quoted 3 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
-static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

Shouldn't this be u8 **revoked_ksv_list since you want to return the pointer for use in the caller? I'm surprised any of this worked when you tested it...

Not tested yet. And forgot to add RFC too. Sorry for wasting your time.

-Ram

Quoted 292 lines
Quoted 31 lines
drivers/gpu/drm/drm_hdcp.c +6 -8
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count;
@@ -131,29 +124,28 @@ static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count)
 	ksv_count = drm_hdcp_get_revoked_ksv_count(buf, vrl_length);
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
 
-	if (drm_hdcp_get_revoked_ksvs(buf, srm_data->revoked_ksv_list,
+	if (drm_hdcp_get_revoked_ksvs(buf, revoked_ksv_list,
 				      vrl_length) != ksv_count) {
-		srm_data->revoked_ksv_cnt = 0;
-		kfree(srm_data->revoked_ksv_list);
+		*revoked_ksv_cnt = 0;
+		kfree(revoked_ksv_list);
 		return -EINVAL;
 	}

drivers/gpu/drm/drm_hdcp.c static int drm_hdcp_parse_hdcp1_srm(const u8 *buf, size_t count) · line 148

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +4 -3
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
-static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
+static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count,
+				    u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

Same comment here, this should be u8 **

Quoted 35 lines
drivers/gpu/drm/drm_hdcp.c +6 -8
 {
 	struct hdcp_srm_header *header;
 	u32 vrl_length, ksv_count, ksv_sz;
@@ -195,13 +187,11 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	ksv_count = (*buf << 2) | DRM_HDCP_2_KSV_COUNT_2_LSBITS(*(buf + 1));
 	if (!ksv_count) {
 		DRM_DEBUG("Revoked KSV count is 0\n");
-		return count;
+		return 0;
 	}
 
-	kfree(srm_data->revoked_ksv_list);
-	srm_data->revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN,
-					     GFP_KERNEL);
-	if (!srm_data->revoked_ksv_list) {
+	revoked_ksv_list = kcalloc(ksv_count, DRM_HDCP_KSV_LEN, GFP_KERNEL);
+	if (!revoked_ksv_list) {
 		DRM_ERROR("Out of Memory\n");
 		return -ENOMEM;
 	}
@@ -210,10 +200,10 @@ static int drm_hdcp_parse_hdcp2_srm(const u8 *buf, size_t count)
 	buf += DRM_HDCP_2_NO_OF_DEV_PLUS_RESERVED_SZ;
 
 	DRM_DEBUG("Revoked KSVs: %d\n", ksv_count);
-	memcpy(srm_data->revoked_ksv_list, buf, ksv_sz);
+	memcpy(revoked_ksv_list, buf, ksv_sz);
 
-	srm_data->revoked_ksv_cnt = ksv_count;
-	return count;
+	*revoked_ksv_cnt = ksv_count;
+	return 0;
 }
 
 static inline bool is_srm_version_hdcp1(const u8 *buf)

drivers/gpu/drm/drm_hdcp.c static inline bool is_srm_version_hdcp2(const u8 *buf) · line 220

Quoted 6 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
@@ -226,18 +216,22 @@ static inline bool is_srm_version_hdcp2(const u8 *buf)
 	return *buf == (u8)(DRM_HDCP_2_SRM_ID << 4 | DRM_HDCP_2_INDICATOR);
 }
 
-static void drm_hdcp_srm_update(const u8 *buf, size_t count)
+static void drm_hdcp_srm_update(const u8 *buf, size_t count,
+				u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

and here

Quoted 7 lines
drivers/gpu/drm/drm_hdcp.c +1 -1
 {
 	if (count < sizeof(struct hdcp_srm_header))
 		return;
 
 	if (is_srm_version_hdcp1(buf))
-		drm_hdcp_parse_hdcp1_srm(buf, count);
+		drm_hdcp_parse_hdcp1_srm(buf, count, revoked_ksv_list,

drivers/gpu/drm/drm_hdcp.c static inline bool is_srm_version_hdcp2(const u8 *buf) · line 234

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +5 -2
+					 revoked_ksv_cnt);
 	else if (is_srm_version_hdcp2(buf))
-		drm_hdcp_parse_hdcp2_srm(buf, count);
+		drm_hdcp_parse_hdcp2_srm(buf, count, revoked_ksv_list,
+					 revoked_ksv_cnt);
 }
 
-static void drm_hdcp_request_srm(struct drm_device *drm_dev)
+static void drm_hdcp_request_srm(struct drm_device *drm_dev,
+				 u8 *revoked_ksv_list, u32 *revoked_ksv_cnt)

and here

Quoted 14 lines
drivers/gpu/drm/drm_hdcp.c +2 -1
 {
 	char fw_name[36] = "display_hdcp_srm.bin";
 	const struct firmware *fw;
@@ -250,7 +244,8 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
 		goto exit;
 
 	if (fw->size && fw->data)
-		drm_hdcp_srm_update(fw->data, fw->size);
+		drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
+				    revoked_ksv_cnt);
 
 exit:
 	release_firmware(fw);

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 277

Quoted 5 lines
drivers/gpu/drm/drm_hdcp.c +1 -1
@@ -279,70 +274,37 @@ static void drm_hdcp_request_srm(struct drm_device *drm_dev)
  * https://www.digital-cp.com/sites/default/files/specifications/HDCP%20on%20HDMI%20Specification%20Rev2_2_Final1.pdf
  *
  * Returns:
- * TRUE on any of the KSV is revoked, else FALSE.
+ * Count of the revoked KSVs.

What about on error?

Quoted 29 lines
drivers/gpu/drm/drm_hdcp.c +2 -25
  */
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs,
-				 u32 ksv_count)
+int drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs_in,
+				u32 ksv_count)
 {
-	u32 rev_ksv_cnt, cnt, i, j;
-	u8 *rev_ksv_list;
-
-	if (!srm_data)
-		return false;
-
-	mutex_lock(&srm_data->mutex);
-	drm_hdcp_request_srm(drm_dev);
-
-	rev_ksv_cnt = srm_data->revoked_ksv_cnt;
-	rev_ksv_list = srm_data->revoked_ksv_list;
-
-	/* If the Revoked ksv list is empty */
-	if (!rev_ksv_cnt || !rev_ksv_list) {
-		mutex_unlock(&srm_data->mutex);
-		return false;
-	}
-
-	for  (cnt = 0; cnt < ksv_count; cnt++) {
-		rev_ksv_list = srm_data->revoked_ksv_list;
-		for (i = 0; i < rev_ksv_cnt; i++) {
-			for (j = 0; j < DRM_HDCP_KSV_LEN; j++)
-				if (ksvs[j] != rev_ksv_list[j]) {

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 282

Quoted 10 lines
drivers/gpu/drm/drm_hdcp.c +1 -9
-					break;
-				} else if (j == (DRM_HDCP_KSV_LEN - 1)) {
-					DRM_DEBUG("Revoked KSV is ");
-					drm_hdcp_print_ksv(ksvs);
-					mutex_unlock(&srm_data->mutex);
-					return true;
-				}
-			/* Move the offset to next KSV in the revoked list */
-			rev_ksv_list += DRM_HDCP_KSV_LEN;
+	u8 *revoked_ksv_list = NULL, *ksvs, *list_itr;

Where is revoked_ksv_list freed?

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 286

Quoted 4 lines
drivers/gpu/drm/drm_hdcp.c +4 -0
+	u32 revoked_ksv_cnt = 0, i, j;
+	int ret = 0;
+
+	drm_hdcp_request_srm(drm_dev, revoked_ksv_list, &revoked_ksv_cnt);

This can't fail?

drivers/gpu/drm/drm_hdcp.c static void drm_hdcp_request_srm(struct drm_device *drm_dev) · line 291

Quoted 5 lines
drivers/gpu/drm/drm_hdcp.c +5 -0
+	list_itr = revoked_ksv_list;
+
+	for (i = 0; i < revoked_ksv_cnt; i++) {
+		ksvs = ksvs_in;
+		for  (j = 0; j < ksv_count; j++) {

You can save yourself the iterators if you just generate the offsets like:

        for (i = 0; i < revoked_ksv_cnt; i++) {
                u8 *a = &ksvs_in[j * DRM_HDCP_KSV_LEN];
                for  (j = 0; j < ksv_count; j++) {
                        u8 *b = &revoked_ksv_list[i * DRM_HDCP_KSV_LEN];

                        if (!memcmp(a, b, DRM_HDCP_KSV_LEN)) {
                                ...
                        }
Quoted 92 lines
drivers/gpu/drm/drm_hdcp.c +12 -23
+			if (!memcmp(ksvs, list_itr, DRM_HDCP_KSV_LEN)) {
+				DRM_DEBUG("Revoked KSV is ");
+				drm_hdcp_print_ksv(ksvs);
+				ret++;
+			}
+			/* Iterate to next ksv_offset */
+			ksvs += DRM_HDCP_KSV_LEN;
 		}
-
-		/* Iterate to next ksv_offset */
-		ksvs += DRM_HDCP_KSV_LEN;
+		/* Move the offset to next KSV in the revoked list */
+		list_itr += DRM_HDCP_KSV_LEN;
 	}
-	mutex_unlock(&srm_data->mutex);
-	return false;
-}
-EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
-
-int drm_setup_hdcp_srm(struct class *drm_class)
-{
-	srm_data = kzalloc(sizeof(*srm_data), GFP_KERNEL);
-	if (!srm_data)
-		return -ENOMEM;
-	mutex_init(&srm_data->mutex);
 
-	return 0;
-}
-
-void drm_teardown_hdcp_srm(struct class *drm_class)
-{
-	if (srm_data) {
-		kfree(srm_data->revoked_ksv_list);
-		kfree(srm_data);
-	}
+	kfree(revoked_ksv_list);
+	return ret;
 }
+EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
 
 static struct drm_prop_enum_list drm_cp_enum_list[] = {
 	{ DRM_MODE_CONTENT_PROTECTION_UNDESIRED, "Undesired" },
drivers/gpu/drm/drm_internal.h +0 -4
index 6937bf923f05..a34c7f8373fa 100644
@@ -235,7 +235,3 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,
 void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent,
 				const struct drm_framebuffer *fb);
 int drm_framebuffer_debugfs_init(struct drm_minor *minor);
-
-/* drm_hdcp.c */
-int drm_setup_hdcp_srm(struct class *drm_class);
-void drm_teardown_hdcp_srm(struct class *drm_class);
drivers/gpu/drm/drm_sysfs.c +0 -2
index dd2bc85f43cc..2e83c3d72af9 100644
@@ -85,7 +85,6 @@ int drm_sysfs_init(void)
 	}
 
 	drm_class->devnode = drm_devnode;
-	drm_setup_hdcp_srm(drm_class);
 	return 0;
 }
 
@@ -98,7 +97,6 @@ void drm_sysfs_destroy(void)
 {
 	if (IS_ERR_OR_NULL(drm_class))
 		return;
-	drm_teardown_hdcp_srm(drm_class);
 	class_remove_file(drm_class, &class_attr_version.attr);
 	class_destroy(drm_class);
 	drm_class = NULL;
include/drm/drm_hdcp.h +2 -2
index 06a11202a097..d512089b873f 100644
@@ -288,8 +288,8 @@ struct hdcp_srm_header {
 struct drm_device;
 struct drm_connector;
 
-bool drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
-				 u8 *ksvs, u32 ksv_count);
+int drm_hdcp_check_ksvs_revoked(struct drm_device *dev,
+				u8 *ksvs, u32 ksv_count);
 int drm_connector_attach_content_protection_property(
 		struct drm_connector *connector, bool hdcp_content_type);
 void drm_hdcp_update_content_protection(struct drm_connector *connector,
Signature · 1 line
2.20.1
Quoted 7 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/hdcp: optimizing the srm handling (rev2)

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: drm/hdcp: optimizing the srm handling (rev2)
URL : https://patchwork.freedesktop.org/series/72312/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7827 -> Patchwork_16282
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/index.html

Known issues
------------

Here are the changes found in Patchwork_16282 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_close_race@basic-process:
- fi-byt-j1900: [PASS][1] -> [FAIL][2] ([i915#694])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-byt-j1900/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-byt-j1900/igt@[email protected]

* igt@gem_exec_parallel@fds:
- fi-hsw-peppy: [PASS][3] -> [INCOMPLETE][4] ([i915#694])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-hsw-peppy/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-hsw-peppy/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- fi-hsw-4770: [PASS][5] -> [SKIP][6] ([fdo#109271]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-hsw-4770/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-hsw-4770/igt@[email protected]

* igt@i915_selftest@live_gem_contexts:
- fi-byt-j1900: [PASS][7] -> [DMESG-FAIL][8] ([i915#722])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#111096] / [i915#323])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_hangcheck:
- fi-icl-u3: [INCOMPLETE][11] ([fdo#108569] / [i915#140]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-icl-u3/igt@i915_selftest@live_hangcheck.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [DMESG-WARN][13] ([IGT#4] / [i915#263]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/fi-icl-u2/igt@[email protected]

[IGT#4]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/4
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#263]: https://gitlab.freedesktop.org/drm/intel/issues/263
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722

Participating hosts (46 -> 38)
------------------------------

Additional (3): fi-ivb-3770 fi-skl-6600u fi-bsw-n3050
Missing (11): fi-ilk-m540 fi-kbl-7560u fi-byt-squawks fi-bsw-cyan fi-ilk-650 fi-ctg-p8600 fi-whl-u fi-kbl-8809g fi-blb-e6850 fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7827 -> Patchwork_16282

CI-20190529: 20190529
CI_DRM_7827: c8969aeacfff681c83a800e82b0f18a6ab3e77ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5389: 966c58649dee31bb5bf2fad92f75ffd365968b81 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16282: 026d21a8ab510a3005f4fdbc95b84ca88449606c @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

026d21a8ab51 drm/hdcp: optimizing the srm handling

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/hdcp: optimizing the srm handling (rev2)

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: drm/hdcp: optimizing the srm handling (rev2)
URL : https://patchwork.freedesktop.org/series/72312/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7827_full -> Patchwork_16282_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_16282_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_busy@busy-vcs1:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +16 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb6/igt@[email protected]

* igt@gem_ctx_persistence@vcs1-mixed-process:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb3/igt@[email protected]

* igt@gem_eio@kms:
- shard-snb: [PASS][5] -> [INCOMPLETE][6] ([i915#82])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-snb1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-snb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-self-bsd:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +6 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb1/igt@[email protected]

* igt@gen7_exec_parse@basic-offset:
- shard-hsw: [PASS][9] -> [FAIL][10] ([i915#694])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-hsw6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-hsw7/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][11] -> [FAIL][12] ([i915#454])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb4/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb6/igt@[email protected]

* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-apl: [PASS][13] -> [DMESG-WARN][14] ([i915#180])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][15] -> [DMESG-WARN][16] ([i915#180]) +5 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-kbl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-kbl4/igt@[email protected]

* igt@kms_flip@dpms-vs-vblank-race:
- shard-glk: [PASS][17] -> [FAIL][18] ([i915#407])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-glk3/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-glk6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-skl6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-skl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][21] -> [FAIL][22] ([fdo#108145] / [i915#265])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-skl3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-skl1/igt@[email protected]

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-skl: [PASS][23] -> [DMESG-WARN][24] ([IGT#6])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-skl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-skl8/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb3/igt@kms_psr@psr2_no_drrs.html

* igt@kms_setmode@basic:
- shard-glk: [PASS][27] -> [FAIL][28] ([i915#31])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-glk6/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-glk6/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109276]) +18 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb7/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_persistence@vcs1-queued:
- shard-iclb: [SKIP][31] ([fdo#109276] / [fdo#112080]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb7/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb1/igt@[email protected]

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][33] ([fdo#110841]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb4/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb5/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- shard-skl: [INCOMPLETE][35] ([i915#69]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-skl5/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-skl5/igt@[email protected]

* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [SKIP][37] ([i915#677]) -> [PASS][38] +3 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][39] ([fdo#112146]) -> [PASS][40] +5 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb7/igt@[email protected]

* igt@gem_exec_suspend@basic-s3:
- shard-kbl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +2 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-kbl4/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-kbl2/igt@[email protected]

* igt@gem_softpin@noreloc-s3:
- shard-apl: [DMESG-WARN][43] ([i915#180]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl8/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl3/igt@[email protected]

* igt@i915_selftest@live_blt:
- shard-hsw: [DMESG-FAIL][45] ([i915#553] / [i915#725]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-hsw1/igt@i915_selftest@live_blt.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-hsw5/igt@i915_selftest@live_blt.html

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [INCOMPLETE][47] ([i915#300]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-skl4/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-skl9/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][49] ([fdo#109441]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb6/igt@kms_psr@psr2_cursor_mmap_cpu.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

* igt@kms_setmode@basic:
- shard-apl: [FAIL][51] ([i915#31]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl3/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl7/igt@[email protected]

* igt@perf_pmu@init-busy-vcs1:
- shard-iclb: [SKIP][53] ([fdo#112080]) -> [PASS][54] +12 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb1/igt@[email protected]

* igt@prime_busy@hang-bsd2:
- shard-iclb: [SKIP][55] ([fdo#109276]) -> [PASS][56] +17 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb3/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb4/igt@[email protected]

#### Warnings ####

* igt@gem_tiled_blits@normal:
- shard-hsw: [FAIL][57] ([i915#694]) -> [FAIL][58] ([i915#818])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-hsw4/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-hsw1/igt@[email protected]

* igt@kms_content_protection@atomic:
- shard-kbl: [FAIL][59] ([fdo#110321] / [fdo#110336]) -> [INCOMPLETE][60] ([fdo#103665]) +2 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-kbl3/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-kbl7/igt@[email protected]

* igt@kms_content_protection@atomic-dpms:
- shard-apl: [FAIL][61] ([fdo#110321] / [fdo#110336]) -> [INCOMPLETE][62] ([fdo#103927]) +2 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl4/igt@[email protected]

* igt@kms_content_protection@lic:
- shard-apl: [FAIL][63] ([fdo#110321]) -> [INCOMPLETE][64] ([fdo#103927]) +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl2/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl6/igt@[email protected]

* igt@kms_content_protection@srm:
- shard-kbl: [FAIL][65] ([fdo#110321]) -> [INCOMPLETE][66] ([fdo#103665]) +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-kbl6/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-kbl6/igt@[email protected]

* igt@kms_content_protection@uevent:
- shard-kbl: [FAIL][67] ([i915#357]) -> [INCOMPLETE][68] ([fdo#103665])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-kbl2/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-kbl1/igt@[email protected]
- shard-apl: [FAIL][69] ([i915#357]) -> [INCOMPLETE][70] ([fdo#103927])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-apl3/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-apl7/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][71] ([fdo#109349]) -> [DMESG-WARN][72] ([fdo#107724])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7827/shard-iclb6/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/shard-iclb2/igt@[email protected]

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#357]: https://gitlab.freedesktop.org/drm/intel/issues/357
[i915#407]: https://gitlab.freedesktop.org/drm/intel/issues/407
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7827 -> Patchwork_16282

CI-20190529: 20190529
CI_DRM_7827: c8969aeacfff681c83a800e82b0f18a6ab3e77ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5389: 966c58649dee31bb5bf2fad92f75ffd365968b81 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16282: 026d21a8ab510a3005f4fdbc95b84ca88449606c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16282/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx