[Intel-gfx] [PATCH] drm/i915/hdcp: add intel_dp_hdcp.h and rename init accordingly

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Apr 27 20:39:48 UTC 2021


On Tue, Apr 27, 2021 at 02:45:20PM +0300, Jani Nikula wrote:
> Add separate intel_dp_hdcp.h to go with intel_dp_hdcp.c, and rename the
> init function intel_dp_hdcp_init() to follow naming where function
> prefix matches the file name.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c      |  5 +++--
>  drivers/gpu/drm/i915/display/intel_dp.h      |  3 ---
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.c |  5 +++--
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.h | 15 +++++++++++++++
>  drivers/gpu/drm/i915/display/intel_dp_mst.c  |  5 +++--
>  5 files changed, 24 insertions(+), 9 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/display/intel_dp_hdcp.h
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 4ad12dde5938..dfa7da928ae5 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -49,10 +49,11 @@
>  #include "intel_display_types.h"
>  #include "intel_dp.h"
>  #include "intel_dp_aux.h"
> +#include "intel_dp_hdcp.h"
>  #include "intel_dp_link_training.h"
>  #include "intel_dp_mst.h"
> -#include "intel_dpll.h"
>  #include "intel_dpio_phy.h"
> +#include "intel_dpll.h"
>  #include "intel_fifo_underrun.h"
>  #include "intel_hdcp.h"
>  #include "intel_hdmi.h"
> @@ -5348,7 +5349,7 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
>  	intel_dp_add_properties(intel_dp, connector);
>  
>  	if (is_hdcp_supported(dev_priv, port) && !intel_dp_is_edp(intel_dp)) {
> -		int ret = intel_dp_init_hdcp(dig_port, intel_connector);
> +		int ret = intel_dp_hdcp_init(dig_port, intel_connector);
>  		if (ret)
>  			drm_dbg_kms(&dev_priv->drm,
>  				    "HDCP init failed, skipping.\n");
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index 8db5062f6c4a..680631b5b437 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -119,9 +119,6 @@ void intel_ddi_update_pipe(struct intel_atomic_state *state,
>  			   const struct intel_crtc_state *crtc_state,
>  			   const struct drm_connector_state *conn_state);
>  
> -int intel_dp_init_hdcp(struct intel_digital_port *dig_port,
> -		       struct intel_connector *intel_connector);
> -
>  bool intel_dp_initial_fastset_check(struct intel_encoder *encoder,
>  				    struct intel_crtc_state *crtc_state);
>  void intel_dp_sync_state(struct intel_encoder *encoder,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 2dd9360bdf9a..d7c3a74b81a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -11,9 +11,10 @@
>  #include <drm/drm_hdcp.h>
>  #include <drm/drm_print.h>
>  
> -#include "intel_display_types.h"
>  #include "intel_ddi.h"
> +#include "intel_display_types.h"
>  #include "intel_dp.h"
> +#include "intel_dp_hdcp.h"
>  #include "intel_hdcp.h"
>  
>  static unsigned int transcoder_to_stream_enc_status(enum transcoder cpu_transcoder)
> @@ -835,7 +836,7 @@ static const struct intel_hdcp_shim intel_dp_mst_hdcp_shim = {
>  	.protocol = HDCP_PROTOCOL_DP,
>  };
>  
> -int intel_dp_init_hdcp(struct intel_digital_port *dig_port,
> +int intel_dp_hdcp_init(struct intel_digital_port *dig_port,
>  		       struct intel_connector *intel_connector)
>  {
>  	struct drm_device *dev = intel_connector->base.dev;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.h b/drivers/gpu/drm/i915/display/intel_dp_hdcp.h
> new file mode 100644
> index 000000000000..eff5ec5c5021
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2021 Intel Corporation
> + */
> +
> +#ifndef __INTEL_DP_HDCP___
> +#define __INTEL_DP_HDCP___
> +
> +struct intel_connector;
> +struct intel_digital_port;
> +
> +int intel_dp_hdcp_init(struct intel_digital_port *dig_port,
> +		       struct intel_connector *intel_connector);
> +
> +#endif /* __INTEL_DP_HDCP___ */
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 180f97cd74cb..3558bce242ee 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -34,11 +34,12 @@
>  #include "intel_connector.h"
>  #include "intel_ddi.h"
>  #include "intel_display_types.h"
> -#include "intel_hotplug.h"
>  #include "intel_dp.h"
> +#include "intel_dp_hdcp.h"
>  #include "intel_dp_mst.h"
>  #include "intel_dpio_phy.h"
>  #include "intel_hdcp.h"
> +#include "intel_hotplug.h"
>  #include "skl_scaler.h"
>  
>  static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
> @@ -832,7 +833,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>  	intel_attach_broadcast_rgb_property(connector);
>  
>  	if (DISPLAY_VER(dev_priv) <= 12) {
> -		ret = intel_dp_init_hdcp(dig_port, intel_connector);
> +		ret = intel_dp_hdcp_init(dig_port, intel_connector);
>  		if (ret)
>  			drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP MST init failed, skipping.\n",
>  				    connector->name, connector->base.id);
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list