All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: add HDCP caps debugfs
@ 2020-02-24 19:55 Bhawanpreet Lakha
  2020-02-24 21:15 ` Harry Wentland
  0 siblings, 1 reply; 4+ messages in thread
From: Bhawanpreet Lakha @ 2020-02-24 19:55 UTC (permalink / raw)
  To: alexander.deucher, amd-gfx
  Cc: Bhawanpreet Lakha, harry.wentland, nicholas.kazlauskas

Add debugfs to get HDCP capability. This is also useful for
kms_content_protection igt test.

Use:
	cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
	cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index ead5c05eec92..52982c8c871f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -815,6 +815,44 @@ static int vrr_range_show(struct seq_file *m, void *data)
 	return 0;
 }
 
+#ifdef CONFIG_DRM_AMD_DC_HDCP
+/*
+ * Returns the HDCP capability of the Display (1.4 for now).
+ *
+ * NOTE* Not all HDMI displays report their HDCP caps even when they are capable.
+ * Since its rare for a display to not be HDCP 1.4 capable, we set HDMI as always capable.
+ *
+ * Example usage: cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
+ *		or cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
+ */
+static int hdcp_sink_capability_show(struct seq_file *m, void *data)
+{
+	struct drm_connector *connector = m->private;
+	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
+	bool hdcp_cap, hdcp2_cap;
+
+	if (connector->status != connector_status_connected)
+		return -ENODEV;
+
+	seq_printf(m, "%s:%d HDCP version: ", connector->name, connector->base.id);
+
+	hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link);
+	hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link);
+
+
+	if (hdcp_cap)
+		seq_printf(m, "%s ", "HDCP1.4");
+	if (hdcp2_cap)
+		seq_printf(m, "%s ", "HDCP2.2");
+
+	if (!hdcp_cap && !hdcp2_cap)
+		seq_printf(m, "%s ", "None");
+
+	seq_puts(m, "\n");
+
+	return 0;
+}
+#endif
 /* function description
  *
  * generic SDP message access for testing
@@ -940,6 +978,9 @@ static ssize_t dp_dpcd_data_read(struct file *f, char __user *buf,
 DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
 DEFINE_SHOW_ATTRIBUTE(output_bpc);
 DEFINE_SHOW_ATTRIBUTE(vrr_range);
+#ifdef CONFIG_DRM_AMD_DC_HDCP
+DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
+#endif
 
 static const struct file_operations dp_link_settings_debugfs_fops = {
 	.owner = THIS_MODULE,
@@ -995,12 +1036,23 @@ static const struct {
 		{"test_pattern", &dp_phy_test_pattern_fops},
 		{"output_bpc", &output_bpc_fops},
 		{"vrr_range", &vrr_range_fops},
+#ifdef CONFIG_DRM_AMD_DC_HDCP
+		{"hdcp_sink_capability", &hdcp_sink_capability_fops},
+#endif
 		{"sdp_message", &sdp_message_fops},
 		{"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
 		{"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
 		{"aux_dpcd_data", &dp_dpcd_data_debugfs_fops}
 };
 
+#ifdef CONFIG_DRM_AMD_DC_HDCP
+static const struct {
+	char *name;
+	const struct file_operations *fops;
+} hdmi_debugfs_entries[] = {
+		{"hdcp_sink_capability", &hdcp_sink_capability_fops}
+};
+#endif
 /*
  * Force YUV420 output if available from the given mode
  */
@@ -1066,6 +1118,15 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
 	debugfs_create_file_unsafe("force_yuv420_output", 0644, dir, connector,
 				   &force_yuv420_output_fops);
 
+#ifdef CONFIG_DRM_AMD_DC_HDCP
+	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
+		for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
+			debugfs_create_file(hdmi_debugfs_entries[i].name,
+					    0644, dir, connector,
+					    hdmi_debugfs_entries[i].fops);
+		}
+	}
+#endif
 }
 
 /*
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/display: add HDCP caps debugfs
  2020-02-24 19:55 [PATCH] drm/amd/display: add HDCP caps debugfs Bhawanpreet Lakha
@ 2020-02-24 21:15 ` Harry Wentland
  2020-02-24 21:51   ` Bhawanpreet Lakha
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Wentland @ 2020-02-24 21:15 UTC (permalink / raw)
  To: Bhawanpreet Lakha, alexander.deucher, amd-gfx
  Cc: harry.wentland, nicholas.kazlauskas



On 2020-02-24 2:55 p.m., Bhawanpreet Lakha wrote:
> Add debugfs to get HDCP capability. This is also useful for
> kms_content_protection igt test.
> 
> Use:
> 	cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
> 	cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
> 
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
> ---
>  .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 61 +++++++++++++++++++
>  1 file changed, 61 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index ead5c05eec92..52982c8c871f 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -815,6 +815,44 @@ static int vrr_range_show(struct seq_file *m, void *data)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_DRM_AMD_DC_HDCP
> +/*
> + * Returns the HDCP capability of the Display (1.4 for now).
> + *
> + * NOTE* Not all HDMI displays report their HDCP caps even when they are capable.
> + * Since its rare for a display to not be HDCP 1.4 capable, we set HDMI as always capable.
> + *
> + * Example usage: cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
> + *		or cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
> + */
> +static int hdcp_sink_capability_show(struct seq_file *m, void *data)
> +{
> +	struct drm_connector *connector = m->private;
> +	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
> +	bool hdcp_cap, hdcp2_cap;
> +
> +	if (connector->status != connector_status_connected)
> +		return -ENODEV;
> +
> +	seq_printf(m, "%s:%d HDCP version: ", connector->name, connector->base.id);
> +
> +	hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link);
> +	hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link);
> +
> +
> +	if (hdcp_cap)
> +		seq_printf(m, "%s ", "HDCP1.4");
> +	if (hdcp2_cap)
> +		seq_printf(m, "%s ", "HDCP2.2");
> +
> +	if (!hdcp_cap && !hdcp2_cap)
> +		seq_printf(m, "%s ", "None");
> +
> +	seq_puts(m, "\n");
> +
> +	return 0;
> +}
> +#endif
>  /* function description
>   *
>   * generic SDP message access for testing
> @@ -940,6 +978,9 @@ static ssize_t dp_dpcd_data_read(struct file *f, char __user *buf,
>  DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
>  DEFINE_SHOW_ATTRIBUTE(output_bpc);
>  DEFINE_SHOW_ATTRIBUTE(vrr_range);
> +#ifdef CONFIG_DRM_AMD_DC_HDCP
> +DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
> +#endif
>  
>  static const struct file_operations dp_link_settings_debugfs_fops = {
>  	.owner = THIS_MODULE,
> @@ -995,12 +1036,23 @@ static const struct {
>  		{"test_pattern", &dp_phy_test_pattern_fops},
>  		{"output_bpc", &output_bpc_fops},
>  		{"vrr_range", &vrr_range_fops},
> +#ifdef CONFIG_DRM_AMD_DC_HDCP
> +		{"hdcp_sink_capability", &hdcp_sink_capability_fops},
> +#endif
>  		{"sdp_message", &sdp_message_fops},
>  		{"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
>  		{"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
>  		{"aux_dpcd_data", &dp_dpcd_data_debugfs_fops}
>  };
>  
> +#ifdef CONFIG_DRM_AMD_DC_HDCP
> +static const struct {
> +	char *name;
> +	const struct file_operations *fops;
> +} hdmi_debugfs_entries[] = {
> +		{"hdcp_sink_capability", &hdcp_sink_capability_fops}
> +};
> +#endif
>  /*
>   * Force YUV420 output if available from the given mode
>   */
> @@ -1066,6 +1118,15 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
>  	debugfs_create_file_unsafe("force_yuv420_output", 0644, dir, connector,
>  				   &force_yuv420_output_fops);
>  
> +#ifdef CONFIG_DRM_AMD_DC_HDCP
> +	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {

Your patch description mentions DP and HDMI but here you're only
creating it for HDMI. Should we create it for all HDCP-capable signal
types, i.e. DP and HDMI?

Harry

> +		for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
> +			debugfs_create_file(hdmi_debugfs_entries[i].name,
> +					    0644, dir, connector,
> +					    hdmi_debugfs_entries[i].fops);
> +		}
> +	}
> +#endif
>  }
>  
>  /*
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/display: add HDCP caps debugfs
  2020-02-24 21:15 ` Harry Wentland
@ 2020-02-24 21:51   ` Bhawanpreet Lakha
  2020-02-24 21:59     ` Harry Wentland
  0 siblings, 1 reply; 4+ messages in thread
From: Bhawanpreet Lakha @ 2020-02-24 21:51 UTC (permalink / raw)
  To: Harry Wentland, alexander.deucher, amd-gfx
  Cc: harry.wentland, nicholas.kazlauskas


On 2020-02-24 4:15 p.m., Harry Wentland wrote:
>
> On 2020-02-24 2:55 p.m., Bhawanpreet Lakha wrote:
>> Add debugfs to get HDCP capability. This is also useful for
>> kms_content_protection igt test.
>>
>> Use:
>> 	cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
>> 	cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
>>
>> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
>> ---
>>   .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 61 +++++++++++++++++++
>>   1 file changed, 61 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>> index ead5c05eec92..52982c8c871f 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>> @@ -815,6 +815,44 @@ static int vrr_range_show(struct seq_file *m, void *data)
>>   	return 0;
>>   }
>>   
>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>> +/*
>> + * Returns the HDCP capability of the Display (1.4 for now).
>> + *
>> + * NOTE* Not all HDMI displays report their HDCP caps even when they are capable.
>> + * Since its rare for a display to not be HDCP 1.4 capable, we set HDMI as always capable.
>> + *
>> + * Example usage: cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
>> + *		or cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
>> + */
>> +static int hdcp_sink_capability_show(struct seq_file *m, void *data)
>> +{
>> +	struct drm_connector *connector = m->private;
>> +	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
>> +	bool hdcp_cap, hdcp2_cap;
>> +
>> +	if (connector->status != connector_status_connected)
>> +		return -ENODEV;
>> +
>> +	seq_printf(m, "%s:%d HDCP version: ", connector->name, connector->base.id);
>> +
>> +	hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link);
>> +	hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link);
>> +
>> +
>> +	if (hdcp_cap)
>> +		seq_printf(m, "%s ", "HDCP1.4");
>> +	if (hdcp2_cap)
>> +		seq_printf(m, "%s ", "HDCP2.2");
>> +
>> +	if (!hdcp_cap && !hdcp2_cap)
>> +		seq_printf(m, "%s ", "None");
>> +
>> +	seq_puts(m, "\n");
>> +
>> +	return 0;
>> +}
>> +#endif
>>   /* function description
>>    *
>>    * generic SDP message access for testing
>> @@ -940,6 +978,9 @@ static ssize_t dp_dpcd_data_read(struct file *f, char __user *buf,
>>   DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
>>   DEFINE_SHOW_ATTRIBUTE(output_bpc);
>>   DEFINE_SHOW_ATTRIBUTE(vrr_range);
>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>> +DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
>> +#endif
>>   
>>   static const struct file_operations dp_link_settings_debugfs_fops = {
>>   	.owner = THIS_MODULE,
>> @@ -995,12 +1036,23 @@ static const struct {
>>   		{"test_pattern", &dp_phy_test_pattern_fops},
>>   		{"output_bpc", &output_bpc_fops},
>>   		{"vrr_range", &vrr_range_fops},
>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>> +		{"hdcp_sink_capability", &hdcp_sink_capability_fops},
>> +#endif
>>   		{"sdp_message", &sdp_message_fops},
>>   		{"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
>>   		{"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
>>   		{"aux_dpcd_data", &dp_dpcd_data_debugfs_fops}
>>   };
>>   
>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>> +static const struct {
>> +	char *name;
>> +	const struct file_operations *fops;
>> +} hdmi_debugfs_entries[] = {
>> +		{"hdcp_sink_capability", &hdcp_sink_capability_fops}
>> +};
>> +#endif
>>   /*
>>    * Force YUV420 output if available from the given mode
>>    */
>> @@ -1066,6 +1118,15 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
>>   	debugfs_create_file_unsafe("force_yuv420_output", 0644, dir, connector,
>>   				   &force_yuv420_output_fops);
>>   
>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>> +	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
> Your patch description mentions DP and HDMI but here you're only
> creating it for HDMI. Should we create it for all HDCP-capable signal
> types, i.e. DP and HDMI?
>
> Harry

There is a loop above that is called for dp_debugfs_entries[]. I have 
added the HDCP debugfs to that struct so no need to recreate the loop.

Bhawan

>> +		for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
>> +			debugfs_create_file(hdmi_debugfs_entries[i].name,
>> +					    0644, dir, connector,
>> +					    hdmi_debugfs_entries[i].fops);
>> +		}
>> +	}
>> +#endif
>>   }
>>   
>>   /*
>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/display: add HDCP caps debugfs
  2020-02-24 21:51   ` Bhawanpreet Lakha
@ 2020-02-24 21:59     ` Harry Wentland
  0 siblings, 0 replies; 4+ messages in thread
From: Harry Wentland @ 2020-02-24 21:59 UTC (permalink / raw)
  To: Bhawanpreet Lakha, alexander.deucher, amd-gfx
  Cc: harry.wentland, nicholas.kazlauskas



On 2020-02-24 4:51 p.m., Bhawanpreet Lakha wrote:
> 
> On 2020-02-24 4:15 p.m., Harry Wentland wrote:
>>
>> On 2020-02-24 2:55 p.m., Bhawanpreet Lakha wrote:
>>> Add debugfs to get HDCP capability. This is also useful for
>>> kms_content_protection igt test.
>>>
>>> Use:
>>>     cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
>>>     cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
>>>
>>> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
>>> ---
>>>   .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 61 +++++++++++++++++++
>>>   1 file changed, 61 insertions(+)
>>>
>>> diff --git
>>> a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> index ead5c05eec92..52982c8c871f 100644
>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> @@ -815,6 +815,44 @@ static int vrr_range_show(struct seq_file *m,
>>> void *data)
>>>       return 0;
>>>   }
>>>   +#ifdef CONFIG_DRM_AMD_DC_HDCP
>>> +/*
>>> + * Returns the HDCP capability of the Display (1.4 for now).
>>> + *
>>> + * NOTE* Not all HDMI displays report their HDCP caps even when they
>>> are capable.
>>> + * Since its rare for a display to not be HDCP 1.4 capable, we set
>>> HDMI as always capable.
>>> + *
>>> + * Example usage: cat /sys/kernel/debug/dri/0/DP-1/hdcp_sink_capability
>>> + *        or cat /sys/kernel/debug/dri/0/HDMI-A-1/hdcp_sink_capability
>>> + */
>>> +static int hdcp_sink_capability_show(struct seq_file *m, void *data)
>>> +{
>>> +    struct drm_connector *connector = m->private;
>>> +    struct amdgpu_dm_connector *aconnector =
>>> to_amdgpu_dm_connector(connector);
>>> +    bool hdcp_cap, hdcp2_cap;
>>> +
>>> +    if (connector->status != connector_status_connected)
>>> +        return -ENODEV;
>>> +
>>> +    seq_printf(m, "%s:%d HDCP version: ", connector->name,
>>> connector->base.id);
>>> +
>>> +    hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link);
>>> +    hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link);
>>> +
>>> +
>>> +    if (hdcp_cap)
>>> +        seq_printf(m, "%s ", "HDCP1.4");
>>> +    if (hdcp2_cap)
>>> +        seq_printf(m, "%s ", "HDCP2.2");
>>> +
>>> +    if (!hdcp_cap && !hdcp2_cap)
>>> +        seq_printf(m, "%s ", "None");
>>> +
>>> +    seq_puts(m, "\n");
>>> +
>>> +    return 0;
>>> +}
>>> +#endif
>>>   /* function description
>>>    *
>>>    * generic SDP message access for testing
>>> @@ -940,6 +978,9 @@ static ssize_t dp_dpcd_data_read(struct file *f,
>>> char __user *buf,
>>>   DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
>>>   DEFINE_SHOW_ATTRIBUTE(output_bpc);
>>>   DEFINE_SHOW_ATTRIBUTE(vrr_range);
>>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>>> +DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
>>> +#endif
>>>     static const struct file_operations dp_link_settings_debugfs_fops
>>> = {
>>>       .owner = THIS_MODULE,
>>> @@ -995,12 +1036,23 @@ static const struct {
>>>           {"test_pattern", &dp_phy_test_pattern_fops},
>>>           {"output_bpc", &output_bpc_fops},
>>>           {"vrr_range", &vrr_range_fops},
>>> +#ifdef CONFIG_DRM_AMD_DC_HDCP
>>> +        {"hdcp_sink_capability", &hdcp_sink_capability_fops},
>>> +#endif
>>>           {"sdp_message", &sdp_message_fops},
>>>           {"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
>>>           {"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
>>>           {"aux_dpcd_data", &dp_dpcd_data_debugfs_fops}
>>>   };
>>>   +#ifdef CONFIG_DRM_AMD_DC_HDCP
>>> +static const struct {
>>> +    char *name;
>>> +    const struct file_operations *fops;
>>> +} hdmi_debugfs_entries[] = {
>>> +        {"hdcp_sink_capability", &hdcp_sink_capability_fops}
>>> +};
>>> +#endif
>>>   /*
>>>    * Force YUV420 output if available from the given mode
>>>    */
>>> @@ -1066,6 +1118,15 @@ void connector_debugfs_init(struct
>>> amdgpu_dm_connector *connector)
>>>       debugfs_create_file_unsafe("force_yuv420_output", 0644, dir,
>>> connector,
>>>                      &force_yuv420_output_fops);
>>>   +#ifdef CONFIG_DRM_AMD_DC_HDCP
>>> +    if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
>> Your patch description mentions DP and HDMI but here you're only
>> creating it for HDMI. Should we create it for all HDCP-capable signal
>> types, i.e. DP and HDMI?
>>
>> Harry
> 
> There is a loop above that is called for dp_debugfs_entries[]. I have
> added the HDCP debugfs to that struct so no need to recreate the loop.
> 

I see it now. Thanks.

Patch is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> Bhawan
> 
>>> +        for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
>>> +            debugfs_create_file(hdmi_debugfs_entries[i].name,
>>> +                        0644, dir, connector,
>>> +                        hdmi_debugfs_entries[i].fops);
>>> +        }
>>> +    }
>>> +#endif
>>>   }
>>>     /*
>>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-24 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 19:55 [PATCH] drm/amd/display: add HDCP caps debugfs Bhawanpreet Lakha
2020-02-24 21:15 ` Harry Wentland
2020-02-24 21:51   ` Bhawanpreet Lakha
2020-02-24 21:59     ` Harry Wentland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.