All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org,
	Sagar Arun Kamble <sagar.a.kamble@intel.com>
Subject: Re: [PATCH 01/14] drm/i915/guc: Pass intel_guc struct as parameter to intel_guc_wopcm_size
Date: Tue, 19 Sep 2017 22:17:20 +0200	[thread overview]
Message-ID: <op.y6txa6toxaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <1505842071-12787-2-git-send-email-sagar.a.kamble@intel.com>

On Tue, 19 Sep 2017 19:27:38 +0200, Sagar Arun Kamble  
<sagar.a.kamble@intel.com> wrote:

> Pass intel_guc struct as parameter to intel_guc_wopcm_size instead of
> drm_i915_private. intel_guc_suspend/resume parameters are not updated in
> this patch as those functions are updated in the upcoming patches.
>

hmm, missing answer to the "why" question.

> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_loader.c | 3 ++-
>  drivers/gpu/drm/i915/intel_uc.c         | 4 ++--
>  drivers/gpu/drm/i915/intel_uc.h         | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c  
> b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 8b0ae7f..6ee7c16 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -250,8 +250,9 @@ static int guc_ucode_xfer_dma(struct  
> drm_i915_private *dev_priv,
>  	return ret;
>  }
> -u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv)
> +u32 intel_guc_wopcm_size(struct intel_guc *guc)

Maybe better option would be to convert this function into inline
as it is used only in uc.c file.

Michal

>  {
> +	struct drm_i915_private *dev_priv = guc_to_i915(guc);
>  	u32 wopcm_size = GUC_WOPCM_TOP;
> 	/* On BXT, the top of WOPCM is reserved for RC6 context */
> diff --git a/drivers/gpu/drm/i915/intel_uc.c  
> b/drivers/gpu/drm/i915/intel_uc.c
> index 0178ba4..b91f848 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -188,7 +188,7 @@ static void fetch_uc_fw(struct drm_i915_private  
> *dev_priv,
>  		size = uc_fw->header_size + uc_fw->ucode_size;
> 		/* Top 32k of WOPCM is reserved (8K stack + 24k RC6 context). */
> -		if (size > intel_guc_wopcm_size(dev_priv)) {
> +		if (size > intel_guc_wopcm_size(&dev_priv->guc)) {
>  			DRM_ERROR("Firmware is too large to fit in WOPCM\n");
>  			goto fail;
>  		}
> @@ -353,7 +353,7 @@ int intel_uc_init_hw(struct drm_i915_private  
> *dev_priv)
>  	}
> 	/* init WOPCM */
> -	I915_WRITE(GUC_WOPCM_SIZE, intel_guc_wopcm_size(dev_priv));
> +	I915_WRITE(GUC_WOPCM_SIZE, intel_guc_wopcm_size(guc));
>  	I915_WRITE(DMA_GUC_WOPCM_OFFSET,
>  		   GUC_WOPCM_OFFSET_VALUE | HUC_LOADING_AGENT_GUC);
> diff --git a/drivers/gpu/drm/i915/intel_uc.h  
> b/drivers/gpu/drm/i915/intel_uc.h
> index 7703c9a..8560a7e 100644
> --- a/drivers/gpu/drm/i915/intel_uc.h
> +++ b/drivers/gpu/drm/i915/intel_uc.h
> @@ -227,7 +227,7 @@ static inline void intel_guc_notify(struct intel_guc  
> *guc)
>  int intel_guc_init_hw(struct intel_guc *guc);
>  int intel_guc_suspend(struct drm_i915_private *dev_priv);
>  int intel_guc_resume(struct drm_i915_private *dev_priv);
> -u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv);
> +u32 intel_guc_wopcm_size(struct intel_guc *guc);
> /* i915_guc_submission.c */
>  int i915_guc_submission_init(struct drm_i915_private *dev_priv);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-09-19 20:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 17:27 [PATCH 00/14] GuC code restructuring and fixes Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 01/14] drm/i915/guc: Pass intel_guc struct as parameter to intel_guc_wopcm_size Sagar Arun Kamble
2017-09-19 20:17   ` Michal Wajdeczko [this message]
2017-09-20 11:13     ` Kamble, Sagar A
2017-09-19 17:27 ` [PATCH 02/14] drm/i915: Create intel_uc_init_mmio to initialize MMIO interface prior to uc init Sagar Arun Kamble
2017-09-19 20:28   ` Michal Wajdeczko
2017-09-20 10:45     ` Kamble, Sagar A
2017-09-19 17:27 ` [PATCH 03/14] drm/i915/guc: Create intel_guc_init_early Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 04/14] drm/i915: Create intel_guc.h, intel_huc.h and intel_uc_common.h Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 05/14] drm/i915/guc: Move GuC specific functionality from intel_uc.c to intel_guc.c Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 06/14] drm/i915: Create uc runtime and system suspend/resume helpers Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 07/14] drm/i915/guc: Update prototype/name of GuC suspend/resume fns and move to intel_guc.c Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 08/14] drm/i915/guc: Update GuC ggtt.invalidate/interrupts/communication across RPM suspend/resume Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 09/14] drm/i915/guc: Update suspend functionality in intel_uc_suspend path Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 10/14] drm/i915/guc: Reuse GuC suspend functionality in reset path Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 11/14] drm/i915/guc: Fix GuC cleanup in unload path Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 12/14] drm/i915/guc: Remove i915_guc_log_unregister Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 13/14] drm/i915/guc: Enable default/critical logging in GuC by default from GuC v9 Sagar Arun Kamble
2017-09-19 17:27 ` [PATCH 14/14] drm/i915: Reorganize HuC authentication Sagar Arun Kamble
2017-09-19 20:15 ` [PATCH 00/14] GuC code restructuring and fixes Michal Wajdeczko
2017-09-20 10:42   ` Kamble, Sagar A
2017-09-19 20:26 ` ✓ Fi.CI.BAT: success for GuC code restructuring and fixes (rev3) Patchwork
2017-09-20  0:11 ` ✗ Fi.CI.IGT: warning " 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=op.y6txa6toxaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@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 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.