[Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Move common message filling function to its own file
Jani Nikula
jani.nikula at linux.intel.com
Wed Sep 20 09:13:30 UTC 2023
On Wed, 20 Sep 2023, Suraj Kandpal <suraj.kandpal at intel.com> wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> index eba2057c5a9e..e53dbe8d9048 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> @@ -9,6 +9,8 @@
> #include <linux/err.h>
> #include <linux/types.h>
>
> +#include "i915_drv.h"
> +
Please don't include i915_drv.h from headers if it can be avoided. This
patch for sure has no reason to do so.
> struct drm_i915_private;
>
> struct intel_hdcp_gsc_message {
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.h b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.h
> new file mode 100644
> index 000000000000..8da3c50d759f
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.h
> @@ -0,0 +1,56 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2023 Intel Corporation
> + */
> +
> +#ifndef __INTEL_HDCP_GSC_MESSAGE_H__
> +#define __INTEL_HDCP_GSC_MESSAGE_H__
> +
> +#include <drm/i915_hdcp_interface.h>
> +
> +#include "intel_hdcp_gsc.h"
What in this header requires including either of those headers that
can't be solved with forward declatations?
*Always* use forward declarations instead of #includes in headers if you
can.
AFAICT this only needs #include <linux/types.h> and a bunch of forward
declarations.
BR,
Jani.
> +
> +bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915);
> +int
> +intel_hdcp_gsc_initiate_session(struct device *dev, struct hdcp_port_data *data,
> + struct hdcp2_ake_init *ake_data);
> +int
> +intel_hdcp_gsc_verify_receiver_cert_prepare_km(struct device *dev,
> + struct hdcp_port_data *data,
> + struct hdcp2_ake_send_cert *rx_cert,
> + bool *km_stored,
> + struct hdcp2_ake_no_stored_km
> + *ek_pub_km,
> + size_t *msg_sz);
> +int
> +intel_hdcp_gsc_verify_hprime(struct device *dev, struct hdcp_port_data *data,
> + struct hdcp2_ake_send_hprime *rx_hprime);
> +int
> +intel_hdcp_gsc_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
> + struct hdcp2_ake_send_pairing_info *pairing_info);
> +int
> +intel_hdcp_gsc_initiate_locality_check(struct device *dev,
> + struct hdcp_port_data *data,
> + struct hdcp2_lc_init *lc_init_data);
> +int
> +intel_hdcp_gsc_verify_lprime(struct device *dev, struct hdcp_port_data *data,
> + struct hdcp2_lc_send_lprime *rx_lprime);
> +int intel_hdcp_gsc_get_session_key(struct device *dev,
> + struct hdcp_port_data *data,
> + struct hdcp2_ske_send_eks *ske_data);
> +int
> +intel_hdcp_gsc_repeater_check_flow_prepare_ack(struct device *dev,
> + struct hdcp_port_data *data,
> + struct hdcp2_rep_send_receiverid_list
> + *rep_topology,
> + struct hdcp2_rep_send_ack
> + *rep_send_ack);
> +int intel_hdcp_gsc_verify_mprime(struct device *dev,
> + struct hdcp_port_data *data,
> + struct hdcp2_rep_stream_ready *stream_ready);
> +int intel_hdcp_gsc_enable_authentication(struct device *dev,
> + struct hdcp_port_data *data);
> +int
> +intel_hdcp_gsc_close_session(struct device *dev, struct hdcp_port_data *data);
> +
> +#endif /* __INTEL_HDCP_GSC_MESSAGE_H__ */
--
Jani Nikula, Intel
More information about the Intel-gfx
mailing list