Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/6] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
Date: Mon, 31 Dec 2018 12:56:30 +0000	[thread overview]
Message-ID: <a4895160-1f16-8965-2b94-e3e63e1f9d39@linux.intel.com> (raw)
In-Reply-To: <8e02dcf1b85462d17e96fb183440dd90261b7411.1545920737.git.jani.nikula@intel.com>


On 27/12/2018 14:33, Jani Nikula wrote:
> Reveals the build fail fixed in the last hunk. Also prep work.
> 
> v2: name it i915 instead of dev_priv (Michal)
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.h    |  6 +++---
>   drivers/gpu/drm/i915/intel_uc.c    | 12 ++++++------
>   drivers/gpu/drm/i915/intel_uc.h    |  6 +++---
>   drivers/gpu/drm/i915/intel_wopcm.c |  2 +-
>   4 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index d44255a8655e..c60cf17e50a0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2490,9 +2490,9 @@ intel_info(const struct drm_i915_private *dev_priv)
>   #define HAS_HUC_UCODE(dev_priv)	(HAS_GUC(dev_priv))
>   
>   /* Having a GuC is not the same as using a GuC */
> -#define USES_GUC(dev_priv)		intel_uc_is_using_guc()
> -#define USES_GUC_SUBMISSION(dev_priv)	intel_uc_is_using_guc_submission()
> -#define USES_HUC(dev_priv)		intel_uc_is_using_huc()
> +#define USES_GUC(dev_priv)		intel_uc_is_using_guc(dev_priv)
> +#define USES_GUC_SUBMISSION(dev_priv)	intel_uc_is_using_guc_submission(dev_priv)
> +#define USES_HUC(dev_priv)		intel_uc_is_using_huc(dev_priv)
>   
>   #define HAS_POOLED_EU(dev_priv)	((dev_priv)->info.has_pooled_eu)
>   
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 447b1de77cc7..731b82afe636 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -71,7 +71,7 @@ static int __get_default_guc_log_level(struct drm_i915_private *i915)
>   {
>   	int guc_log_level;
>   
> -	if (!HAS_GUC(i915) || !intel_uc_is_using_guc())
> +	if (!HAS_GUC(i915) || !intel_uc_is_using_guc(i915))
>   		guc_log_level = GUC_LOG_LEVEL_DISABLED;
>   	else if (IS_ENABLED(CONFIG_DRM_I915_DEBUG) ||
>   		 IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> @@ -112,11 +112,11 @@ static void sanitize_options_early(struct drm_i915_private *i915)
>   
>   	DRM_DEBUG_DRIVER("enable_guc=%d (submission:%s huc:%s)\n",
>   			 i915_modparams.enable_guc,
> -			 yesno(intel_uc_is_using_guc_submission()),
> -			 yesno(intel_uc_is_using_huc()));
> +			 yesno(intel_uc_is_using_guc_submission(i915)),
> +			 yesno(intel_uc_is_using_huc(i915)));
>   
>   	/* Verify GuC firmware availability */
> -	if (intel_uc_is_using_guc() && !intel_uc_fw_is_selected(guc_fw)) {
> +	if (intel_uc_is_using_guc(i915) && !intel_uc_fw_is_selected(guc_fw)) {
>   		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
>   			 "enable_guc", i915_modparams.enable_guc,
>   			 !HAS_GUC(i915) ? "no GuC hardware" :
> @@ -124,7 +124,7 @@ static void sanitize_options_early(struct drm_i915_private *i915)
>   	}
>   
>   	/* Verify HuC firmware availability */
> -	if (intel_uc_is_using_huc() && !intel_uc_fw_is_selected(huc_fw)) {
> +	if (intel_uc_is_using_huc(i915) && !intel_uc_fw_is_selected(huc_fw)) {
>   		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
>   			 "enable_guc", i915_modparams.enable_guc,
>   			 !HAS_HUC(i915) ? "no HuC hardware" :
> @@ -136,7 +136,7 @@ static void sanitize_options_early(struct drm_i915_private *i915)
>   		i915_modparams.guc_log_level =
>   			__get_default_guc_log_level(i915);
>   
> -	if (i915_modparams.guc_log_level > 0 && !intel_uc_is_using_guc()) {
> +	if (i915_modparams.guc_log_level > 0 && !intel_uc_is_using_guc(i915)) {
>   		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
>   			 "guc_log_level", i915_modparams.guc_log_level,
>   			 !HAS_GUC(i915) ? "no GuC hardware" :
> diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
> index 25d73ada74ae..870faf9011b9 100644
> --- a/drivers/gpu/drm/i915/intel_uc.h
> +++ b/drivers/gpu/drm/i915/intel_uc.h
> @@ -41,19 +41,19 @@ void intel_uc_fini(struct drm_i915_private *dev_priv);
>   int intel_uc_suspend(struct drm_i915_private *dev_priv);
>   int intel_uc_resume(struct drm_i915_private *dev_priv);
>   
> -static inline bool intel_uc_is_using_guc(void)
> +static inline bool intel_uc_is_using_guc(struct drm_i915_private *i915)
>   {
>   	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>   	return i915_modparams.enable_guc > 0;
>   }
>   
> -static inline bool intel_uc_is_using_guc_submission(void)
> +static inline bool intel_uc_is_using_guc_submission(struct drm_i915_private *i915)
>   {
>   	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>   	return i915_modparams.enable_guc & ENABLE_GUC_SUBMISSION;
>   }
>   
> -static inline bool intel_uc_is_using_huc(void)
> +static inline bool intel_uc_is_using_huc(struct drm_i915_private *i915)
>   {
>   	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>   	return i915_modparams.enable_guc & ENABLE_GUC_LOAD_HUC;
> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
> index 630c887682e8..f82a415ea2ba 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -163,7 +163,7 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)
>   	u32 guc_wopcm_rsvd;
>   	int err;
>   
> -	if (!USES_GUC(dev_priv))
> +	if (!USES_GUC(i915))

Sadly even in this short file there is no consistency. 
(intel_wopcm_init_hw uses dev_priv.)

>   		return 0;
>   
>   	GEM_BUG_ON(!wopcm->size);
> 

Anyways,

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:[~2018-12-31 12:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 14:33 [PATCH 0/6] drm/i915: modparam rework prep work Jani Nikula
2018-12-27 14:33 ` [PATCH 1/6] drm/i915: add a helper to make a copy of i915_params Jani Nikula
2018-12-27 14:33 ` [PATCH 2/6] drm/i915: add a helper to free the members " Jani Nikula
2018-12-31 12:51   ` Tvrtko Ursulin
2018-12-27 14:33 ` [PATCH 3/6] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions Jani Nikula
2018-12-31 12:56   ` Tvrtko Ursulin [this message]
2018-12-27 14:33 ` [PATCH 4/6] drm/i915/params: set i915.enable_hangcheck permissions to 0600 Jani Nikula
2018-12-31 13:01   ` Tvrtko Ursulin
2018-12-31 13:31     ` Jani Nikula
2018-12-27 14:33 ` [PATCH 5/6] drm/i915: move load failure injection to selftests Jani Nikula
2018-12-31 13:13   ` Tvrtko Ursulin
2018-12-31 13:18     ` Chris Wilson
2018-12-31 15:12       ` Jani Nikula
2018-12-31 15:16         ` Chris Wilson
2018-12-27 14:33 ` [PATCH 6/6] drm/i915/params: document I915_PARAMS_FOR_EACH() Jani Nikula
2018-12-31 13:05   ` Tvrtko Ursulin
2018-12-31 13:24     ` Jani Nikula
2018-12-31 15:07       ` Tvrtko Ursulin
2018-12-31 15:16         ` Jani Nikula
2018-12-27 14:59 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: modparam rework prep work Patchwork
2018-12-27 15:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-27 15:20 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-12-28  8:59 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: modparam rework prep work (rev2) Patchwork
2018-12-28  9:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-28  9:35 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-28 11:06 ` ✓ Fi.CI.IGT: " 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=a4895160-1f16-8965-2b94-e3e63e1f9d39@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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