public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Dave Gordon <david.s.gordon@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 1/7] drm/i915/guc: rename loader entry points
Date: Fri, 13 May 2016 16:11:00 +0100	[thread overview]
Message-ID: <5735EE84.2090206@linux.intel.com> (raw)
In-Reply-To: <1463150195-28805-2-git-send-email-david.s.gordon@intel.com>


On 13/05/16 15:36, Dave Gordon wrote:
> The GuC initialisation code could do other things apart from loading
> firmware, so here we rename the three primary entry points to remove any
> specific reference to "ucode" (no functional changes, just renaming).
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_dma.c         |  6 +++---
>   drivers/gpu/drm/i915/i915_gem.c         |  2 +-
>   drivers/gpu/drm/i915/intel_guc.h        |  6 +++---
>   drivers/gpu/drm/i915/intel_guc_loader.c | 19 ++++++++++---------
>   4 files changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 547100f..7d93f8f 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -507,7 +507,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
>   	 * working irqs for e.g. gmbus and dp aux transfers. */
>   	intel_modeset_init(dev);
>
> -	intel_guc_ucode_init(dev);
> +	intel_guc_init(dev);
>
>   	ret = i915_gem_init(dev);
>   	if (ret)
> @@ -547,7 +547,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
>   cleanup_gem:
>   	i915_gem_fini(dev);
>   cleanup_irq:
> -	intel_guc_ucode_fini(dev);
> +	intel_guc_fini(dev);
>   	drm_irq_uninstall(dev);
>   	intel_teardown_gmbus(dev);
>   cleanup_csr:
> @@ -1528,7 +1528,7 @@ int i915_driver_unload(struct drm_device *dev)
>   	/* Flush any outstanding unpin_work. */
>   	flush_workqueue(dev_priv->wq);
>
> -	intel_guc_ucode_fini(dev);
> +	intel_guc_fini(dev);
>   	i915_gem_fini(dev);
>   	intel_fbc_cleanup_cfb(dev_priv);
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a3d826b..43e45b7 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4867,7 +4867,7 @@ int i915_gem_init_engines(struct drm_device *dev)
>
>   	/* We can't enable contexts until all firmware is loaded */
>   	if (HAS_GUC_UCODE(dev)) {
> -		ret = intel_guc_ucode_load(dev);
> +		ret = intel_guc_setup(dev);
>   		if (ret) {
>   			DRM_ERROR("Failed to initialize GuC, error %d\n", ret);
>   			ret = -EIO;
> diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
> index 9d79c4c..3984136 100644
> --- a/drivers/gpu/drm/i915/intel_guc.h
> +++ b/drivers/gpu/drm/i915/intel_guc.h
> @@ -138,9 +138,9 @@ struct intel_guc {
>   };
>
>   /* intel_guc_loader.c */
> -extern void intel_guc_ucode_init(struct drm_device *dev);
> -extern int intel_guc_ucode_load(struct drm_device *dev);
> -extern void intel_guc_ucode_fini(struct drm_device *dev);
> +extern void intel_guc_init(struct drm_device *dev);
> +extern int intel_guc_setup(struct drm_device *dev);
> +extern void intel_guc_fini(struct drm_device *dev);
>   extern const char *intel_guc_fw_status_repr(enum intel_guc_fw_status status);
>   extern int intel_guc_suspend(struct drm_device *dev);
>   extern int intel_guc_resume(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 23345e1..b14a3a3 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -375,18 +375,19 @@ static int i915_reset_guc(struct drm_i915_private *dev_priv)
>   }
>
>   /**
> - * intel_guc_ucode_load() - load GuC uCode into the device
> + * intel_guc_setup() - finish preparing the GuC for activity
>    * @dev:	drm device
>    *
>    * Called from gem_init_hw() during driver loading and also after a GPU reset.
>    *
> + * The main action required here it to load the GuC uCode into the device.
>    * The firmware image should have already been fetched into memory by the
> - * earlier call to intel_guc_ucode_init(), so here we need only check that
> - * is succeeded, and then transfer the image to the h/w.
> + * earlier call to intel_guc_init(), so here we need only check that worked,
> + * and then transfer the image to the h/w.
>    *
>    * Return:	non-zero code on error
>    */
> -int intel_guc_ucode_load(struct drm_device *dev)
> +int intel_guc_setup(struct drm_device *dev)
>   {
>   	struct drm_i915_private *dev_priv = dev->dev_private;
>   	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
> @@ -620,15 +621,15 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)
>   }
>
>   /**
> - * intel_guc_ucode_init() - define parameters and fetch firmware
> + * intel_guc_init() - define parameters and fetch firmware
>    * @dev:	drm device
>    *
>    * Called early during driver load, but after GEM is initialised.
>    *
>    * The firmware will be transferred to the GuC's memory later,
> - * when intel_guc_ucode_load() is called.
> + * when intel_guc_setup() is called.
>    */
> -void intel_guc_ucode_init(struct drm_device *dev)
> +void intel_guc_init(struct drm_device *dev)
>   {
>   	struct drm_i915_private *dev_priv = dev->dev_private;
>   	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
> @@ -676,10 +677,10 @@ void intel_guc_ucode_init(struct drm_device *dev)
>   }
>
>   /**
> - * intel_guc_ucode_fini() - clean up all allocated resources
> + * intel_guc_fini() - clean up all allocated resources
>    * @dev:	drm device
>    */
> -void intel_guc_ucode_fini(struct drm_device *dev)
> +void intel_guc_fini(struct drm_device *dev)
>   {
>   	struct drm_i915_private *dev_priv = dev->dev_private;
>   	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

  reply	other threads:[~2016-05-13 15:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 14:36 [PATCH v4 0/7] Enable GuC submission Dave Gordon
2016-05-13 14:36 ` [PATCH v4 1/7] drm/i915/guc: rename loader entry points Dave Gordon
2016-05-13 15:11   ` Tvrtko Ursulin [this message]
2016-05-13 14:36 ` [PATCH v4 2/7] drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED Dave Gordon
2016-05-13 15:34   ` Tvrtko Ursulin
2016-05-13 14:36 ` [PATCH v4 3/7] drm/i915/guc: add enable_guc_loading parameter Dave Gordon
2016-05-13 15:31   ` Tvrtko Ursulin
2016-05-16 19:07     ` Dave Gordon
2016-05-16 19:12     ` [PATCH v5 " Dave Gordon
2016-05-17  9:08       ` Tvrtko Ursulin
2016-05-20 11:40         ` Fiedorowicz, Lukasz
2016-05-20 10:42       ` [PATCH v6 " Tvrtko Ursulin
2016-05-20 14:04         ` Fiedorowicz, Lukasz
2016-05-23 13:17         ` Nick Hoath
2016-05-13 14:36 ` [PATCH v4 4/7] drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space, submit}() Dave Gordon
2016-05-13 14:36 ` [PATCH v4 5/7] drm/i915/guc: don't spinwait if the GuC's workqueue is full Dave Gordon
2016-05-13 15:32   ` Tvrtko Ursulin
2016-05-13 14:36 ` [PATCH v4 6/7] drm/i915/guc: rework guc_add_workqueue_item() Dave Gordon
2016-05-13 14:36 ` [PATCH v4 7/7] drm/i915/guc: change default to using GuC submission if possible Dave Gordon
2016-05-14  8:32   ` Chris Wilson
2016-05-13 16:34 ` ✗ Ro.CI.BAT: failure for Enable GuC submission Patchwork
2016-05-17  5:24 ` ✗ Ro.CI.BAT: failure for Enable GuC submission (rev2) Patchwork
2016-05-20 11:15 ` ✗ Ro.CI.BAT: failure for Enable GuC submission (rev3) Patchwork
2016-05-23 13:24   ` Tvrtko Ursulin

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=5735EE84.2090206@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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