[Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Use intel_connector as argument for hdcp_2_2_capable

Shankar, Uma uma.shankar at intel.com
Thu Aug 31 04:36:08 UTC 2023



> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal at intel.com>
> Sent: Wednesday, August 30, 2023 1:05 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>; Shankar, Uma
> <uma.shankar at intel.com>; Murthy, Arun R <arun.r.murthy at intel.com>; Kandpal,
> Suraj <suraj.kandpal at intel.com>
> Subject: [PATCH 1/2] drm/i915/hdcp: Use intel_connector as argument for
> hdcp_2_2_capable
> 
> Use intel_connector as argument instead of intel_digital_port in hdcp_2_2_capable
> function and dig_port can be later derived from connector. This will help with getting
> the correct hdcp version of particular monitor in a MST setup.

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

> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.c       | 3 ++-
>  drivers/gpu/drm/i915/display/intel_hdcp.c          | 3 +--
>  drivers/gpu/drm/i915/display/intel_hdmi.c          | 3 ++-
>  4 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index c62f4ec315e8..c21064794f32 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -500,7 +500,7 @@ struct intel_hdcp_shim {
>  	enum hdcp_wired_protocol protocol;
> 
>  	/* Detects whether sink is HDCP2.2 capable */
> -	int (*hdcp_2_2_capable)(struct intel_digital_port *dig_port,
> +	int (*hdcp_2_2_capable)(struct intel_connector *connector,
>  				bool *capable);
> 
>  	/* Write HDCP2.2 messages */
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index b0cfe759d3e5..3b579887bb99 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -648,9 +648,10 @@ int intel_dp_hdcp2_check_link(struct intel_digital_port
> *dig_port,  }
> 
>  static
> -int intel_dp_hdcp2_capable(struct intel_digital_port *dig_port,
> +int intel_dp_hdcp2_capable(struct intel_connector *connector,
>  			   bool *capable)
>  {
> +	struct intel_digital_port *dig_port =
> +intel_attached_dig_port(connector);
>  	u8 rx_caps[3];
>  	int ret;
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c
> b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index cb45f21f71eb..8cca4793cf92 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -163,7 +163,6 @@ bool intel_hdcp_capable(struct intel_connector *connector)
>  /* Is HDCP2.2 capable on Platform and Sink */  bool intel_hdcp2_capable(struct
> intel_connector *connector)  {
> -	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
>  	struct drm_i915_private *i915 = to_i915(connector->base.dev);
>  	struct intel_hdcp *hdcp = &connector->hdcp;
>  	bool capable = false;
> @@ -193,7 +192,7 @@ bool intel_hdcp2_capable(struct intel_connector
> *connector)
>  	mutex_unlock(&i915->display.hdcp.hdcp_mutex);
> 
>  	/* Sink's capability for HDCP2.2 */
> -	hdcp->shim->hdcp_2_2_capable(dig_port, &capable);
> +	hdcp->shim->hdcp_2_2_capable(connector, &capable);
> 
>  	return capable;
>  }
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c
> b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 116556d6352a..d34eba5b132c 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1735,9 +1735,10 @@ int intel_hdmi_hdcp2_check_link(struct intel_digital_port
> *dig_port,  }
> 
>  static
> -int intel_hdmi_hdcp2_capable(struct intel_digital_port *dig_port,
> +int intel_hdmi_hdcp2_capable(struct intel_connector *connector,
>  			     bool *capable)
>  {
> +	struct intel_digital_port *dig_port =
> +intel_attached_dig_port(connector);
>  	u8 hdcp2_version;
>  	int ret;
> 
> --
> 2.25.1



More information about the Intel-gfx mailing list