public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v7 1/2] drm/i915: Reorganize HuC authentication
Date: Fri, 22 Sep 2017 14:39:23 +0300	[thread overview]
Message-ID: <1506080363.6232.76.camel@linux.intel.com> (raw)
In-Reply-To: <1506074867-32714-2-git-send-email-sagar.a.kamble@intel.com>

On Fri, 2017-09-22 at 15:37 +0530, Sagar Arun Kamble wrote:
> Prepared intel_auth_huc to separate HuC specific functionality
> from GuC send action. Created new header intel_huc.h to group
> HuC specific declarations.
> 
> v2: Changed argument preparation for AUTHENTICATE_HUC.
> s/intel_auth_huc/intel_huc_auth. Deferred creation of intel_huc.h
> to later patch.
> 
> v3: Rebase as intel_guc.h is removed. Added param description to
> intel_huc_auth. (Michal)
> 
> v4: Rebase as intel_guc.h is added again. :)
> 
> v5: Rebase w.r.t removal of GuC code restructuring.
> 
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>

<SNIP>

> @@ -225,19 +225,16 @@ void intel_huc_init_hw(struct intel_huc *huc)
>  }
>  
>  /**
> - * intel_guc_auth_huc() - authenticate ucode
> - * @dev_priv: the drm_i915_device
> - *
> - * Triggers a HuC fw authentication request to the GuC via intel_guc_action_
> - * authenticate_huc interface.

This is still an exported function from this file, so should have
kerneldoc comment. Especially now that we have two very similar
exported functions, it would be beneficial to crosslink them in the
resulting documentation that'll look like:

https://01.org/linuxgraphics/gfx-docs/drm/gpu/i915.html#c.intel_guc_init_hw

So proper sentences and capitalisation is much preferred.

I'm also noticing that we're not properly linking all portions of the
code to be included in docs, I'll send a fix for that.

> + * intel_huc_auth() - authenticate ucode
> + * @huc: intel_huc structure
>   */
> -void intel_guc_auth_huc(struct drm_i915_private *dev_priv)
> +void intel_huc_auth(struct intel_huc *huc)
>  {
> +	struct drm_i915_private *dev_priv = huc_to_i915(huc);
>  	struct intel_guc *guc = &dev_priv->guc;

As there's only one more of instance of 'dev_priv' in this func so just
rename it to 'i915' while touching the func. GuC is really close to the
GEM so similar style is good.

> @@ -250,11 +247,8 @@ void intel_guc_auth_huc(struct drm_i915_private *dev_priv)
>  		return;
>  	}
>  
> -	/* Specify auth action and where public signature is. */
> -	data[0] = INTEL_GUC_ACTION_AUTHENTICATE_HUC;
> -	data[1] = guc_ggtt_offset(vma) + huc->fw.rsa_offset;
> -
> -	ret = intel_guc_send(guc, data, ARRAY_SIZE(data));
> +	offset = guc_ggtt_offset(vma) + huc->fw.rsa_offset;
> +	ret = intel_guc_auth_huc(guc, offset);

With the code cleanup, the offset variable seems unnecessary to me,
just do:

	ret = intel_guc_auth_huc(guc,
				 guc_ggtt_offset(vma) + huc->fw.rsa_offset);

Other than that, LGTM.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-09-22 11:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 10:07 [PATCH v7 0/2] Reorganized HuC auth and GuC v9+ Logging change Sagar Arun Kamble
2017-09-22 10:07 ` [PATCH v7 1/2] drm/i915: Reorganize HuC authentication Sagar Arun Kamble
2017-09-22 11:39   ` Joonas Lahtinen [this message]
2017-09-22 15:02     ` [PATCH v8 1/1] drm/i915/huc: " Sagar Arun Kamble
2017-09-22 10:07 ` [PATCH v7 2/2] drm/i915/guc: Enable default/critical logging in GuC by default from GuC v9 Sagar Arun Kamble
2017-09-22 10:24   ` Michal Wajdeczko
2017-09-22 14:27     ` Sagar Arun Kamble
2017-09-22 12:04   ` Joonas Lahtinen
2017-09-22 14:46     ` Sagar Arun Kamble
2017-09-25 10:01       ` Joonas Lahtinen
2017-09-26  6:59         ` Sagar Arun Kamble
2017-09-22 11:47 ` ✗ Fi.CI.BAT: warning for Reorganized HuC auth and GuC v9+ Logging change 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=1506080363.6232.76.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox