public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Peter Antoine <peter.antoine@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 3/6] drm/i915/huc: Add HuC fw loading support
Date: Fri, 29 Jul 2016 13:35:59 +0100	[thread overview]
Message-ID: <7146baed-977d-98b1-4cd9-fb7ca99b29ef@intel.com> (raw)
In-Reply-To: <1467815071-35665-3-git-send-email-peter.antoine@intel.com>

On 06/07/16 15:24, Peter Antoine wrote:
> The HuC loading process is similar to GuC. The intel_uc_fw_fetch()
> is used for both cases.
>
> HuC loading needs to be before GuC loading. The WOPCM setting must
> be done early before loading any of them.
>
> v2: rebased on-top of drm-intel-nightly.
>     removed if(HAS_GUC()) before the guc call. (D.Gordon)
>     update huc_version number of format.
> v3: rebased to drm-intel-nightly, changed the file name format to
>     match the one in the huc package.
>     Changed dev->dev_provate to to_i915()
>
> Signed-off-by: Alex Dai <yu.dai@intel.com>
> Signed-off-by: Peter Antoine <peter.antoine@intel.com>
> ---
>  drivers/gpu/drm/i915/Makefile           |   1 +
>  drivers/gpu/drm/i915/i915_drv.c         |   3 +
>  drivers/gpu/drm/i915/i915_drv.h         |   3 +
>  drivers/gpu/drm/i915/i915_guc_reg.h     |   3 +
>  drivers/gpu/drm/i915/intel_guc.h        |   1 +
>  drivers/gpu/drm/i915/intel_guc_loader.c |  26 ++--
>  drivers/gpu/drm/i915/intel_huc.h        |  44 ++++++
>  drivers/gpu/drm/i915/intel_huc_loader.c | 267 ++++++++++++++++++++++++++++++++
>  8 files changed, 336 insertions(+), 12 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/intel_huc.h
>  create mode 100644 drivers/gpu/drm/i915/intel_huc_loader.c

I found another problem, which at root is because this was *copied* from 
the GuC loading code some time ago, rather than being implemented in a 
single generic function. The GuC code has been changed since it was 
cloned, but of course the corresponding updates are missing from the HuC 
version.

[snip]

> +
> +	/* Start the DMA */
> +	I915_WRITE(DMA_CTRL, _MASKED_BIT_ENABLE(HUC_UKERNEL | START_DMA));
> +
> +	/* Wait for DMA to finish */
> +	ret = wait_for_atomic((I915_READ(DMA_CTRL) & START_DMA) == 0, 50);

Can't use wait_for_atomic() here. The GuC version now reads:

         /*
          * Wait for the DMA to complete & the GuC to start up.
          * NB: Docs recommend not using the interrupt for completion.
          * Measurements indicate this should take no more than 20ms,
	 * so a timeout here indicates that the GuC has is unusable.
          * (Higher levels of the driver will attempt to fall back to
          * execlist mode if this happens.)
          */
         ret = wait_for(guc_ucode_response(dev_priv, &status), 100);

.Dave.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-07-29 12:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 14:24 [PATCH v3 1/6] drm/i915/guc: Make the GuC fw loading helper functions general Peter Antoine
2016-07-06 14:24 ` [PATCH v3 2/6] drm/i915/huc: Unified css_header struct for GuC and HuC Peter Antoine
2016-07-06 20:41   ` Vivi, Rodrigo
2016-07-07 10:09     ` Peter Antoine
2016-07-06 14:24 ` [PATCH v3 3/6] drm/i915/huc: Add HuC fw loading support Peter Antoine
2016-07-29 11:29   ` Dave Gordon
2016-07-29 12:35   ` Dave Gordon [this message]
2016-07-06 14:24 ` [PATCH v3 4/6] drm/i915/huc: Add debugfs for HuC loading status check Peter Antoine
2016-07-06 14:24 ` [PATCH v3 5/6] drm/i915/huc: Support HuC authentication Peter Antoine
2016-07-29 11:33   ` Dave Gordon
2016-07-29 12:39     ` Dave Gordon
2016-07-06 14:24 ` [PATCH v3 6/6] drm/i915/huc: Add BXT HuC Loading Support Peter Antoine
2016-07-06 20:52   ` Vivi, Rodrigo
2016-07-13  8:02     ` Xiang, Haihao
2016-07-06 14:53 ` ✗ Ro.CI.BAT: warning for series starting with [v3,1/6] drm/i915/guc: Make the GuC fw loading helper functions general Patchwork
2016-07-29 11:18 ` [PATCH v3 1/6] " Dave Gordon
2016-08-02  8:27   ` Antoine, Peter
2016-07-29 11:20 ` ✗ Ro.CI.BAT: failure for series starting with [v3,1/6] drm/i915/guc: Make the GuC fw loading helper functions general (rev2) Patchwork
2016-08-11 10:49 ` [PATCH v3 1/6] drm/i915/guc: Make the GuC fw loading helper functions general Dave Gordon
2016-08-11 10:54   ` Dave Gordon

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=7146baed-977d-98b1-4cd9-fb7ca99b29ef@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=peter.antoine@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