diff mbox series

[2/2] drm/i915/hdcp: Use correct aux for capability check scenario

Message ID 20230830073437.666263-3-suraj.kandpal@intel.com (mailing list archive)
State New, archived
Headers show
Series Fix HDCP2 capability check | expand

Commit Message

Kandpal, Suraj Aug. 30, 2023, 7:34 a.m. UTC
Send the correct aux rather than the one derived
from intel_digital_port so that the HDCP version of both monitors
are fetched rather than just the primary one's

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Shankar, Uma Aug. 31, 2023, 4:36 a.m. UTC | #1
> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal@intel.com>
> Sent: Wednesday, August 30, 2023 1:05 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>; Kandpal,
> Suraj <suraj.kandpal@intel.com>
> Subject: [PATCH 2/2] drm/i915/hdcp: Use correct aux for capability check scenario
> 
> Send the correct aux rather than the one derived from intel_digital_port so that the
> HDCP version of both monitors are fetched rather than just the primary one's

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 3b579887bb99..3a595cd433d4 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -651,12 +651,14 @@ static
>  int intel_dp_hdcp2_capable(struct intel_connector *connector,
>  			   bool *capable)
>  {
> -	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
> +	struct drm_dp_aux *aux;
>  	u8 rx_caps[3];
>  	int ret;
> 
> +	aux = intel_dp_hdcp_get_aux(connector);
> +
>  	*capable = false;
> -	ret = drm_dp_dpcd_read(&dig_port->dp.aux,
> +	ret = drm_dp_dpcd_read(aux,
>  			       DP_HDCP_2_2_REG_RX_CAPS_OFFSET,
>  			       rx_caps, HDCP_2_2_RXCAPS_LEN);
>  	if (ret != HDCP_2_2_RXCAPS_LEN)
> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
index 3b579887bb99..3a595cd433d4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
@@ -651,12 +651,14 @@  static
 int intel_dp_hdcp2_capable(struct intel_connector *connector,
 			   bool *capable)
 {
-	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
+	struct drm_dp_aux *aux;
 	u8 rx_caps[3];
 	int ret;
 
+	aux = intel_dp_hdcp_get_aux(connector);
+
 	*capable = false;
-	ret = drm_dp_dpcd_read(&dig_port->dp.aux,
+	ret = drm_dp_dpcd_read(aux,
 			       DP_HDCP_2_2_REG_RX_CAPS_OFFSET,
 			       rx_caps, HDCP_2_2_RXCAPS_LEN);
 	if (ret != HDCP_2_2_RXCAPS_LEN)