<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On Tuesday 25 July 2017 06:04 PM, Sean
Paul wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOw6vbLdwwK=k-k4xjNOZBuq=VU_g2OAPDS7Cren3RuJUsY-GA@mail.gmail.com">
<pre wrap="">On Mon, Jul 24, 2017 at 2:12 PM, Ramalingam C <a class="moz-txt-link-rfc2396E" href="mailto:ramalingam.c@intel.com"><ramalingam.c@intel.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">DRM connector property is created to represent the content protection
state of the connector and to configure the same.
Content protection states defined:
DRM_MODE_CONTENT_PROTECTION_UNSUPPORTED - Unsupported
DRM_MODE_CONTENT_PROTECTION_DISABLE - Disabled
DRM_MODE_CONTENT_PROTECTION_ENABLE - Enabled
v2: Redesigned the property to match with CP needs of CrOS [Sean].
v3: Renamed the state names. Header is removed [sean].
Signed-off-by: Ramalingam C <a class="moz-txt-link-rfc2396E" href="mailto:ramalingam.c@intel.com"><ramalingam.c@intel.com></a>
---
drivers/gpu/drm/drm_connector.c | 14 ++++++++++++++
include/drm/drm_mode_config.h | 5 +++++
include/uapi/drm/drm_mode.h | 5 +++++
3 files changed, 24 insertions(+)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 5cd61af..d6aaa08 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -617,6 +617,13 @@ static const struct drm_prop_enum_list drm_link_status_enum_list[] = {
};
DRM_ENUM_NAME_FN(drm_get_link_status_name, drm_link_status_enum_list)
+static const struct drm_prop_enum_list drm_cp_enum_list[] = {
+ { DRM_MODE_CONTENT_PROTECTION_UNSUPPORTED, "Unsupported" },
</pre>
</blockquote>
<pre wrap="">
You're still changing the enum names from the original patch/CrOS
implementation.
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html">https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html</a>
<a class="moz-txt-link-freetext" href="https://cs.chromium.org/chromium/src/ui/ozone/platform/drm/gpu/drm_display.cc?l=27">https://cs.chromium.org/chromium/src/ui/ozone/platform/drm/gpu/drm_display.cc?l=27</a></pre>
</blockquote>
<br>
<font size="-1">Sean,<br>
<br>
I think we have bit of confusion here.<br>
<br>
And in previous discussion you were fine with new state of
property that is<br>
"unsupported" - indicates no common HDCP version is supported on
HDCP src and Sink combo.<br>
<br>
when CP is not possible, if property exist, userspace will
interpret it as CP is supported and attempt for enabling.<br>
I prefer indicating Unsupported state than failing such requests
blindly.<br>
<br>
In that case to interpret the new state, we need to change CrOS
User space code.<br>
<br>
In the RFC you mentioned above, two version of uapi interfaces are
discussed.<br>
V1 uses single property to configure the CP and also for
status indication.<br>
V2 uses two properties one for configuring and another one
for status of Content protection.<br>
<br>
But CrOS user space is currently using the V1 interface.<br>
<br>
which will be preferred approach right now (V1/V2)?<br>
In either way we need to change the CrOS :(<br>
<br>
Lets say we need to modify CrOS user space, will there be any help
for that?<br>
I am not aware what it takes though.<br>
<br>
I am trying to discuss both uapi versions of V1 and V2. I prefer
V2 though.<br>
<br>
If V1 is preferred we need a single property as below<br>
"content protection" property with {"Unsupported", "Undesired",
"Desired", "Enabled"}<br>
"Type1_desired" and "Type1_Enabled" are
needed for HDCP2.2<br>
<br>
<br>
If V2 is preferred we need two properties as below<br>
<br>
"content protection" property with {"Unsupported", "Undesired",
"Desired"}<br>
("Type1_desired" - needed For HDCP2.2)<br>
"content protection status" property with {"Disabled", "Enabled"}<br>
("Type1_enabled" - needed for HDCP2.2)<br>
<br>
- Not providing the ksv, as reflecting one ksv is not
serving any purpose.<br>
Even for revocation check you need provision to list
all device IDs (Max 32devices x 5Bytes ID) attached to repeater.<br>
So it is good to reflect the current protection level
of link through enum.<br>
<br>
And Usage will be as below:<br>
By default property "content protection" will be set to<br>
- "Unsupported" (If CP is not possible on the Link)<br>
- "Undesired" (If Link is not protected. CP is
possible)<br>
By default property "content protection status" will be set to<br>
- "Disabled"<br>
<br>
the sequence of enabling protection on a link:<br>
- User space will set "content protection" "Undesired"
-> "Desired"<br>
- kernel will start the Authentication.<br>
- Once Auth is successful, kernel will change "content
protection status" as "Disabled" -> "Enabled"<br>
<br>
The sequence of disabling protection on a link:<br>
- User space will set "content protection" "Desired"
-> "Undesired"<br>
- kernel will start the disable encryption.<br>
- Once it is successful, kernel will change "content
protection status" as "Enabled" -> "Disabled"<br>
<br>
The sequence in case of encryption Failure on protected link:<br>
- When Failure of encryption occurs, kernel will change
"content protection status" as "Enabled" -> "Disabled"<br>
- Kernel will try for retry for authentication and
encryption.<br>
- If the link is encrypted once again, kernel will
change "content protection status" as "Disabled" -> "Enabled"<br>
- But if retry failed, kernel will change "content
protection" as "Desired" -> "Undesired"<br>
- So the "Desired" state of "content protection" property
indicates that kernel is authenticating/re authenticating the link
for encryption.<br>
<br>
--Ram</font><br>
<blockquote type="cite"
cite="mid:CAOw6vbLdwwK=k-k4xjNOZBuq=VU_g2OAPDS7Cren3RuJUsY-GA@mail.gmail.com">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">+ { DRM_MODE_CONTENT_PROTECTION_DISABLE, "Disabled" },
+ { DRM_MODE_CONTENT_PROTECTION_ENABLE, "Enabled" },
+};
+DRM_ENUM_NAME_FN(drm_get_cp_status_name, drm_cp_enum_list)
+
/**
* drm_display_info_set_bus_formats - set the supported bus formats
* @info: display info to store bus formats in
@@ -789,6 +796,13 @@ int drm_connector_create_standard_properties(struct drm_device *dev)
return -ENOMEM;
dev->mode_config.link_status_property = prop;
+ prop = drm_property_create_enum(dev, 0, "Content Protection",
+ drm_cp_enum_list,
+ ARRAY_SIZE(drm_cp_enum_list));
+ if (!prop)
+ return -ENOMEM;
+ dev->mode_config.cp_property = prop;
+
return 0;
}
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index 4298171..7acb8b2 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -538,6 +538,11 @@ struct drm_mode_config {
*/
struct drm_property *link_status_property;
/**
+ * @cp_property: Default connector property for CP
+ * of a connector
</pre>
</blockquote>
<pre wrap="">
Can you please elaborate on this, so readers can understand how this
property works? Perhaps just copy the docs from the original patch?
</pre>
<blockquote type="cite">
<pre wrap="">+ */
+ struct drm_property *cp_property;
+ /**
* @plane_type_property: Default plane property to differentiate
* CURSOR, PRIMARY and OVERLAY legacy uses of planes.
*/
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 403339f..554a770 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -127,6 +127,11 @@ extern "C" {
#define DRM_MODE_LINK_STATUS_GOOD 0
#define DRM_MODE_LINK_STATUS_BAD 1
+/* Content Protection options */
+#define DRM_MODE_CONTENT_PROTECTION_UNSUPPORTED 0
+#define DRM_MODE_CONTENT_PROTECTION_DISABLE 1
+#define DRM_MODE_CONTENT_PROTECTION_ENABLE 2
+
/*
* DRM_MODE_ROTATE_<degrees>
*
--
2.7.4
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>