All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Move common message filling function to its own file
Date: Wed, 20 Sep 2023 12:13:30 +0300	[thread overview]
Message-ID: <87o7hxryv9.fsf@intel.com> (raw)
In-Reply-To: <20230920085014.246564-1-suraj.kandpal@intel.com>

On Wed, 20 Sep 2023, Suraj Kandpal <suraj.kandpal@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

  reply	other threads:[~2023-09-20  9:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20  6:36 [Intel-gfx] [PATCH 0/2] Refactor i915 HDCP for XE Suraj Kandpal
2023-09-20  6:36 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Move checks for gsc health status Suraj Kandpal
2023-10-09  9:06   ` Shankar, Uma
2023-09-20  6:36 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Move common message filling function to its own file Suraj Kandpal
2023-09-20  8:46   ` kernel test robot
2023-09-20  8:46     ` kernel test robot
2023-09-20  8:50   ` Suraj Kandpal
2023-09-20  9:13     ` Jani Nikula [this message]
2023-09-20  9:29       ` Kandpal, Suraj
2023-09-20 10:38     ` [Intel-gfx] [PATCH v3 " Suraj Kandpal
2023-09-20 12:09       ` Jani Nikula
2023-09-20 15:57         ` Kandpal, Suraj
2023-09-21  5:38       ` [Intel-gfx] [PATCH v4 " Suraj Kandpal
2023-10-09  9:14         ` Shankar, Uma
2023-09-20  9:30   ` [Intel-gfx] [PATCH " kernel test robot
2023-09-20  9:30     ` kernel test robot
2023-09-21 15:32   ` kernel test robot
2023-09-21 15:32     ` kernel test robot
2023-09-20  7:05 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Refactor i915 HDCP for XE Patchwork
2023-09-20  9:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor i915 HDCP for XE (rev2) Patchwork
2023-09-20  9:28 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-20  9:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-20 13:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor i915 HDCP for XE (rev3) Patchwork
2023-09-20 13:02 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-20 13:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-20 18:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-21  7:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor i915 HDCP for XE (rev4) Patchwork
2023-09-21  7:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-21  7:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7hxryv9.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=suraj.kandpal@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.