All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	kernel test robot <lkp@intel.com>,
	John Harrison <John.C.Harrison@Intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: drop guc_communication_enabled
Date: Wed, 25 Aug 2021 11:21:43 -0700	[thread overview]
Message-ID: <20210825182143.GA27208@jons-linux-dev-box> (raw)
In-Reply-To: <20210823163137.19770-1-daniele.ceraolospurio@intel.com>

On Mon, Aug 23, 2021 at 09:31:37AM -0700, Daniele Ceraolo Spurio wrote:
> The function is only used from within GEM_BUG_ON(), which is causing
> warnings with Wunneeded-internal-declaration in some builds. Since the
> function is a simple wrapper around a CT function, we can just call the
> CT function directly instead.
> 
> Fixes: 1fb12c587152 ("drm/i915/guc: skip disabling CTBs before sanitizing the GuC")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index b104fb7607eb..86c318516e14 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -172,11 +172,6 @@ void intel_uc_driver_remove(struct intel_uc *uc)
>  	__uc_free_load_err_log(uc);
>  }
>  
> -static inline bool guc_communication_enabled(struct intel_guc *guc)
> -{
> -	return intel_guc_ct_enabled(&guc->ct);
> -}
> -
>  /*
>   * Events triggered while CT buffers are disabled are logged in the SCRATCH_15
>   * register using the same bits used in the CT message payload. Since our
> @@ -210,7 +205,7 @@ static void guc_get_mmio_msg(struct intel_guc *guc)
>  static void guc_handle_mmio_msg(struct intel_guc *guc)
>  {
>  	/* we need communication to be enabled to reply to GuC */
> -	GEM_BUG_ON(!guc_communication_enabled(guc));
> +	GEM_BUG_ON(!intel_guc_ct_enabled(&guc->ct));
>  
>  	spin_lock_irq(&guc->irq_lock);
>  	if (guc->mmio_msg) {
> @@ -226,7 +221,7 @@ static int guc_enable_communication(struct intel_guc *guc)
>  	struct drm_i915_private *i915 = gt->i915;
>  	int ret;
>  
> -	GEM_BUG_ON(guc_communication_enabled(guc));
> +	GEM_BUG_ON(intel_guc_ct_enabled(&guc->ct));
>  
>  	ret = i915_inject_probe_error(i915, -ENXIO);
>  	if (ret)
> @@ -662,7 +657,7 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication)
>  		return 0;
>  
>  	/* Make sure we enable communication if and only if it's disabled */
> -	GEM_BUG_ON(enable_communication == guc_communication_enabled(guc));
> +	GEM_BUG_ON(enable_communication == intel_guc_ct_enabled(&guc->ct));
>  
>  	if (enable_communication)
>  		guc_enable_communication(guc);
> -- 
> 2.33.0
> 

      parent reply	other threads:[~2021-08-25 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 16:31 [Intel-gfx] [PATCH] drm/i915/guc: drop guc_communication_enabled Daniele Ceraolo Spurio
2021-08-23 18:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-08-23 20:32 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-08-25 18:21 ` Matthew Brost [this message]

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=20210825182143.GA27208@jons-linux-dev-box \
    --to=matthew.brost@intel.com \
    --cc=John.C.Harrison@Intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lkp@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.