[4/4] drm/i915: Add HDCP2.2 capable debug print
diff mbox series

Message ID 20200128135425.14596-5-anshuman.gupta@intel.com
State New
Headers show
Series
  • HDCP Misc series
Related show

Commit Message

Anshuman Gupta Jan. 28, 2020, 1:54 p.m. UTC
Few CI panel claims to support HDCP 2.2 but at CI
HDCP IGT test execution these panels are not detecting
as HDCP 2.2 supported panels. Adding HDCP 2.2 version
print will be useful in such cases.

CC: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c   | 2 ++
 drivers/gpu/drm/i915/display/intel_hdmi.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jani Nikula Jan. 28, 2020, 2:23 p.m. UTC | #1
On Tue, 28 Jan 2020, Anshuman Gupta <anshuman.gupta@intel.com> wrote:
> Few CI panel claims to support HDCP 2.2 but at CI
> HDCP IGT test execution these panels are not detecting
> as HDCP 2.2 supported panels. Adding HDCP 2.2 version
> print will be useful in such cases.
>
> CC: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c   | 2 ++
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 991f343579ef..22a3c3e9ade2 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6449,6 +6449,8 @@ int intel_dp_hdcp2_capable(struct intel_digital_port *intel_dig_port,
>  	if (ret != HDCP_2_2_RXCAPS_LEN)
>  		return ret >= 0 ? -EIO : ret;
>  
> +	DRM_DEBUG_KMS("HDCP 2.2 RxCaps VERSION 0x%x\n", rx_caps[0]);

Please use drm_dbg_kms().

> +
>  	if (rx_caps[0] == HDCP_2_2_RX_CAPS_VERSION_VAL &&
>  	    HDCP_2_2_DP_HDCP_CAPABLE(rx_caps[2]))
>  		*capable = true;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 685589064d10..a7af0be83397 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1701,6 +1701,8 @@ int intel_hdmi_hdcp2_capable(struct intel_digital_port *intel_dig_port,
>  	*capable = false;
>  	ret = intel_hdmi_hdcp_read(intel_dig_port, HDCP_2_2_HDMI_REG_VER_OFFSET,
>  				   &hdcp2_version, sizeof(hdcp2_version));
> +	DRM_DEBUG_KMS("HDCP2Version 0%x\n", hdcp2_version);

Please use drm_dbg_kms(). Why is the previous debug "HDCP 2.2" and this
one "HDCP2Version"? You're probably missing an x in 0%x.

BR,
Jani.


> +
>  	if (!ret && hdcp2_version & HDCP_2_2_HDMI_SUPPORT_MASK)
>  		*capable = true;
Ramalingam C Feb. 7, 2020, 2:16 p.m. UTC | #2
On 2020-01-28 at 19:24:25 +0530, Anshuman Gupta wrote:
> Few CI panel claims to support HDCP 2.2 but at CI
> HDCP IGT test execution these panels are not detecting
> as HDCP 2.2 supported panels. Adding HDCP 2.2 version
> print will be useful in such cases.
> 
> CC: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c   | 2 ++
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 991f343579ef..22a3c3e9ade2 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6449,6 +6449,8 @@ int intel_dp_hdcp2_capable(struct intel_digital_port *intel_dig_port,
>  	if (ret != HDCP_2_2_RXCAPS_LEN)
>  		return ret >= 0 ? -EIO : ret;
>  
> +	DRM_DEBUG_KMS("HDCP 2.2 RxCaps VERSION 0x%x\n", rx_caps[0]);
I am not able to convince myself this is needed. After getting this
value we will manually do the operations implemented in the next lines.
So this is not adding any value.
> +
>  	if (rx_caps[0] == HDCP_2_2_RX_CAPS_VERSION_VAL &&
>  	    HDCP_2_2_DP_HDCP_CAPABLE(rx_caps[2]))
>  		*capable = true;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 685589064d10..a7af0be83397 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1701,6 +1701,8 @@ int intel_hdmi_hdcp2_capable(struct intel_digital_port *intel_dig_port,
>  	*capable = false;
>  	ret = intel_hdmi_hdcp_read(intel_dig_port, HDCP_2_2_HDMI_REG_VER_OFFSET,
>  				   &hdcp2_version, sizeof(hdcp2_version));
> +	DRM_DEBUG_KMS("HDCP2Version 0%x\n", hdcp2_version);
Same here too.

Ram.
> +
>  	if (!ret && hdcp2_version & HDCP_2_2_HDMI_SUPPORT_MASK)
>  		*capable = true;
>  
> -- 
> 2.24.0
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 991f343579ef..22a3c3e9ade2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6449,6 +6449,8 @@  int intel_dp_hdcp2_capable(struct intel_digital_port *intel_dig_port,
 	if (ret != HDCP_2_2_RXCAPS_LEN)
 		return ret >= 0 ? -EIO : ret;
 
+	DRM_DEBUG_KMS("HDCP 2.2 RxCaps VERSION 0x%x\n", rx_caps[0]);
+
 	if (rx_caps[0] == HDCP_2_2_RX_CAPS_VERSION_VAL &&
 	    HDCP_2_2_DP_HDCP_CAPABLE(rx_caps[2]))
 		*capable = true;
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 685589064d10..a7af0be83397 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1701,6 +1701,8 @@  int intel_hdmi_hdcp2_capable(struct intel_digital_port *intel_dig_port,
 	*capable = false;
 	ret = intel_hdmi_hdcp_read(intel_dig_port, HDCP_2_2_HDMI_REG_VER_OFFSET,
 				   &hdcp2_version, sizeof(hdcp2_version));
+	DRM_DEBUG_KMS("HDCP2Version 0%x\n", hdcp2_version);
+
 	if (!ret && hdcp2_version & HDCP_2_2_HDMI_SUPPORT_MASK)
 		*capable = true;