All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Tomas Winkler <tomas.winkler@intel.com>,
	Alan Previn <alan.previn.teres.alexis@intel.com>,
	Vitaly Lubart <vitaly.lubart@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v4 05/15] mei: pxp: add command streamer API to the PXP driver
Date: Fri, 9 Sep 2022 08:14:01 +0200	[thread overview]
Message-ID: <YxrZqW2l7cNF5OTI@kroah.com> (raw)
In-Reply-To: <20220909001612.728451-6-daniele.ceraolospurio@intel.com>

On Thu, Sep 08, 2022 at 05:16:02PM -0700, Daniele Ceraolo Spurio wrote:
> +static ssize_t mei_pxp_gsc_command(struct device *dev, u8 client_id, u32 fence_id,
> +				   struct scatterlist *sg_in, size_t total_in_len,
> +				   struct scatterlist *sg_out)
> +{
> +	struct mei_cl_device *cldev;
> +
> +	if (!dev || !sg_in || !sg_out)
> +		return -EINVAL;

How can these ever be NULL?  Doesn't the core control this, so why would
that happen?

Don't check for things that can never happen.

> +
> +	cldev = to_mei_cl_device(dev);
> +
> +	return mei_cldev_send_gsc_command(cldev, client_id, fence_id, sg_in, total_in_len, sg_out);
> +}
> +
>  static const struct i915_pxp_component_ops mei_pxp_ops = {
>  	.owner = THIS_MODULE,
>  	.send = mei_pxp_send_message,
>  	.recv = mei_pxp_receive_message,
> +	.gsc_command = mei_pxp_gsc_command,
>  };
>  
>  static int mei_component_master_bind(struct device *dev)
> diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h
> index af593ec64469..a702b6ec17f7 100644
> --- a/include/drm/i915_pxp_tee_interface.h
> +++ b/include/drm/i915_pxp_tee_interface.h
> @@ -8,6 +8,7 @@
>  
>  #include <linux/mutex.h>
>  #include <linux/device.h>
> +struct scatterlist;
>  
>  /**
>   * struct i915_pxp_component_ops - ops for PXP services.
> @@ -23,6 +24,10 @@ struct i915_pxp_component_ops {
>  
>  	int (*send)(struct device *dev, const void *message, size_t size);
>  	int (*recv)(struct device *dev, void *buffer, size_t size);
> +	ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id,
> +			       struct scatterlist *sg_in, size_t total_in_len,
> +			       struct scatterlist *sg_out);

No documentation for this new callback?

The build should give you are warning :(


WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Tomas Winkler <tomas.winkler@intel.com>,
	Alan Previn <alan.previn.teres.alexis@intel.com>,
	Vitaly Lubart <vitaly.lubart@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 05/15] mei: pxp: add command streamer API to the PXP driver
Date: Fri, 9 Sep 2022 08:14:01 +0200	[thread overview]
Message-ID: <YxrZqW2l7cNF5OTI@kroah.com> (raw)
In-Reply-To: <20220909001612.728451-6-daniele.ceraolospurio@intel.com>

On Thu, Sep 08, 2022 at 05:16:02PM -0700, Daniele Ceraolo Spurio wrote:
> +static ssize_t mei_pxp_gsc_command(struct device *dev, u8 client_id, u32 fence_id,
> +				   struct scatterlist *sg_in, size_t total_in_len,
> +				   struct scatterlist *sg_out)
> +{
> +	struct mei_cl_device *cldev;
> +
> +	if (!dev || !sg_in || !sg_out)
> +		return -EINVAL;

How can these ever be NULL?  Doesn't the core control this, so why would
that happen?

Don't check for things that can never happen.

> +
> +	cldev = to_mei_cl_device(dev);
> +
> +	return mei_cldev_send_gsc_command(cldev, client_id, fence_id, sg_in, total_in_len, sg_out);
> +}
> +
>  static const struct i915_pxp_component_ops mei_pxp_ops = {
>  	.owner = THIS_MODULE,
>  	.send = mei_pxp_send_message,
>  	.recv = mei_pxp_receive_message,
> +	.gsc_command = mei_pxp_gsc_command,
>  };
>  
>  static int mei_component_master_bind(struct device *dev)
> diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h
> index af593ec64469..a702b6ec17f7 100644
> --- a/include/drm/i915_pxp_tee_interface.h
> +++ b/include/drm/i915_pxp_tee_interface.h
> @@ -8,6 +8,7 @@
>  
>  #include <linux/mutex.h>
>  #include <linux/device.h>
> +struct scatterlist;
>  
>  /**
>   * struct i915_pxp_component_ops - ops for PXP services.
> @@ -23,6 +24,10 @@ struct i915_pxp_component_ops {
>  
>  	int (*send)(struct device *dev, const void *message, size_t size);
>  	int (*recv)(struct device *dev, void *buffer, size_t size);
> +	ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id,
> +			       struct scatterlist *sg_in, size_t total_in_len,
> +			       struct scatterlist *sg_out);

No documentation for this new callback?

The build should give you are warning :(


  reply	other threads:[~2022-09-09  6:14 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09  0:15 [Intel-gfx] [PATCH v4 00/15] drm/i915: HuC loading for DG2 Daniele Ceraolo Spurio
2022-09-09  0:15 ` Daniele Ceraolo Spurio
2022-09-09  0:15 ` [Intel-gfx] [PATCH v4 01/15] mei: add support to GSC extended header Daniele Ceraolo Spurio
2022-09-09  0:15   ` Daniele Ceraolo Spurio
2022-09-09  6:11   ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09  6:11     ` Greg Kroah-Hartman
2022-09-09  6:29     ` [Intel-gfx] " Winkler, Tomas
2022-09-09  6:29       ` Winkler, Tomas
2022-09-09  0:15 ` [Intel-gfx] [PATCH v4 02/15] mei: bus: enable sending gsc commands Daniele Ceraolo Spurio
2022-09-09  0:15   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 03/15] mei: adjust extended header kdocs Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  6:12   ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09  6:12     ` Greg Kroah-Hartman
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 04/15] mei: bus: extend bus API to support command streamer API Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 05/15] mei: pxp: add command streamer API to the PXP driver Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  6:14   ` Greg Kroah-Hartman [this message]
2022-09-09  6:14     ` Greg Kroah-Hartman
2022-09-09  6:38     ` [Intel-gfx] " Winkler, Tomas
2022-09-09  6:38       ` Winkler, Tomas
2022-09-09  6:42       ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09  6:42         ` Greg Kroah-Hartman
2022-09-12  9:59         ` [Intel-gfx] " Winkler, Tomas
2022-09-12  9:59           ` Winkler, Tomas
2022-09-12 14:25           ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-12 14:25             ` Greg Kroah-Hartman
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 06/15] mei: pxp: support matching with a gfx discrete card Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  6:16   ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09  6:16     ` Greg Kroah-Hartman
2022-09-09  6:51     ` [Intel-gfx] " Winkler, Tomas
2022-09-09  6:51       ` Winkler, Tomas
2022-09-09  6:59       ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09  6:59         ` Greg Kroah-Hartman
2022-09-09  9:21         ` [Intel-gfx] " Winkler, Tomas
2022-09-09  9:21           ` Winkler, Tomas
2022-09-09 10:19           ` [Intel-gfx] " Greg Kroah-Hartman
2022-09-09 10:19             ` Greg Kroah-Hartman
2022-09-12 10:05             ` [Intel-gfx] " Winkler, Tomas
2022-09-12 10:05               ` Winkler, Tomas
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 07/15] drm/i915/pxp: load the pxp module when we have a gsc-loaded huc Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 08/15] drm/i915/pxp: implement function for sending tee stream command Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 09/15] drm/i915/pxp: add huc authentication and loading command Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 10/15] drm/i915/dg2: setup HuC loading via GSC Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09 20:54   ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-09-09 20:54     ` Teres Alexis, Alan Previn
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 11/15] drm/i915/huc: track delayed HuC load with a fence Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09 21:10   ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-09-09 21:10     ` Teres Alexis, Alan Previn
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 12/15] drm/i915/huc: stall media submission until HuC is loaded Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09 21:20   ` [Intel-gfx] " Ye, Tony
2022-09-09 21:20     ` Ye, Tony
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 13/15] drm/i915/huc: better define HuC status getparam possible return values Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 14/15] drm/i915/huc: define gsc-compatible HuC fw for DG2 Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09 21:20   ` [Intel-gfx] " Ye, Tony
2022-09-09 21:20     ` Ye, Tony
2022-09-10  0:18   ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-09-10  0:18     ` Teres Alexis, Alan Previn
2022-09-09  0:16 ` [Intel-gfx] [PATCH v4 15/15] HAX: drm/i915: force INTEL_MEI_GSC and INTEL_MEI_PXP on for CI Daniele Ceraolo Spurio
2022-09-09  0:16   ` Daniele Ceraolo Spurio
2022-09-09  0:22   ` [Intel-gfx] " Ceraolo Spurio, Daniele
2022-09-09  0:22     ` Ceraolo Spurio, Daniele
2022-09-09  0:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: HuC loading for DG2 (rev3) Patchwork
2022-09-09  0:33 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-09  6:01 ` [Intel-gfx] [PATCH v4 00/15] drm/i915: HuC loading for DG2 Winkler, Tomas
2022-09-09  6:01   ` Winkler, Tomas
2022-09-09 18:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: HuC loading for DG2 (rev4) Patchwork
2022-09-09 18:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " 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=YxrZqW2l7cNF5OTI@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tomas.winkler@intel.com \
    --cc=vitaly.lubart@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.