From: Sagar Arun Kamble <sagar.a.kamble@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/i915: Make intel_guc_wopcm_size() inline
Date: Wed, 27 Sep 2017 20:14:33 +0530 [thread overview]
Message-ID: <596fa1ec-44c5-1eeb-9244-bdeee4721a82@intel.com> (raw)
In-Reply-To: <20170927112252.27660-2-michal.wajdeczko@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 3363 bytes --]
On 9/27/2017 4:52 PM, Michal Wajdeczko wrote:
> While here fix param and var types to match new naming rules.
>
> v2: update names and commit message (Sagar)
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
> drivers/gpu/drm/i915/intel_guc_loader.c | 11 -----------
> drivers/gpu/drm/i915/intel_uc.c | 4 ++--
> drivers/gpu/drm/i915/intel_uc.h | 13 ++++++++++++-
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index c9e25be..387d105a 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -250,17 +250,6 @@ 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 wopcm_size = GUC_WOPCM_TOP;
> -
> - /* On BXT, the top of WOPCM is reserved for RC6 context */
> - if (IS_GEN9_LP(dev_priv))
> - wopcm_size -= BXT_GUC_WOPCM_RC6_RESERVED;
> -
> - return wopcm_size;
> -}
> -
> /*
> * Load the GuC firmware blob into the MinuteIA.
> */
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 2774778..1ef2de6 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;
> }
> @@ -374,7 +374,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 296c52d..f43bb43 100644
> --- a/drivers/gpu/drm/i915/intel_uc.h
> +++ b/drivers/gpu/drm/i915/intel_uc.h
> @@ -63,6 +63,18 @@ static inline void intel_guc_notify(struct intel_guc *guc)
> guc->notify(guc);
> }
>
> +static inline u32 intel_guc_wopcm_size(struct intel_guc *guc)
> +{
> + struct drm_i915_private *i915 = guc_to_i915(guc);
> + u32 wopcm_size = GUC_WOPCM_TOP;
> +
> + /* On BXT, the top of WOPCM is reserved for RC6 context */
> + if (IS_GEN9_LP(i915))
> + wopcm_size -= BXT_GUC_WOPCM_RC6_RESERVED;
> +
> + return wopcm_size;
> +}
> +
> static inline u32 guc_ggtt_offset(struct i915_vma *vma)
> {
> u32 offset = i915_ggtt_offset(vma);
> @@ -90,7 +102,6 @@ int intel_guc_select_fw(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);
>
> /* i915_guc_submission.c */
> int i915_guc_submission_init(struct drm_i915_private *dev_priv);
[-- Attachment #1.2: Type: text/html, Size: 3988 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-27 14:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 11:22 [PATCH v2 1/2] drm/i915/uc: Move uC related types into dedicated header Michal Wajdeczko
2017-09-27 11:22 ` [PATCH v2 2/2] drm/i915: Make intel_guc_wopcm_size() inline Michal Wajdeczko
2017-09-27 14:44 ` Sagar Arun Kamble [this message]
2017-09-29 9:12 ` Joonas Lahtinen
2017-09-27 11:36 ` [PATCH v2 1/2] drm/i915/uc: Move uC related types into dedicated header Joonas Lahtinen
2017-09-29 10:37 ` Joonas Lahtinen
2017-09-29 12:48 ` Michal Wajdeczko
2017-09-27 11:45 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] " Patchwork
2017-09-27 14:51 ` [PATCH v2 1/2] " Sagar Arun Kamble
2017-09-27 14:59 ` ✓ Fi.CI.IGT: success for series starting with [v2,1/2] " 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=596fa1ec-44c5-1eeb-9244-bdeee4721a82@intel.com \
--to=sagar.a.kamble@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.wajdeczko@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