All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 05/10] drm/i915: make find_fw_domain work on intel_uncore
Date: Fri, 15 Mar 2019 15:57:01 -0700	[thread overview]
Message-ID: <d9e76f30b2e5420c8d87a6898dfa3e01bbf1924b.camel@intel.com> (raw)
In-Reply-To: <20190313231319.711-6-daniele.ceraolospurio@intel.com>

Em qua, 2019-03-13 às 16:13 -0700, Daniele Ceraolo Spurio escreveu:
> Remove unneeded usage of dev_priv from 1 extra function.
> 

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index dd81c2655e2d..afbbefc32227 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -833,13 +833,13 @@ static int fw_range_cmp(u32 offset, const struct intel_forcewake_range *entry)
>  })
>  
>  static enum forcewake_domains
> -find_fw_domain(struct drm_i915_private *dev_priv, u32 offset)
> +find_fw_domain(struct intel_uncore *uncore, u32 offset)
>  {
>  	const struct intel_forcewake_range *entry;
>  
>  	entry = BSEARCH(offset,
> -			dev_priv->uncore.fw_domains_table,
> -			dev_priv->uncore.fw_domains_table_entries,
> +			uncore->fw_domains_table,
> +			uncore->fw_domains_table_entries,
>  			fw_range_cmp);
>  
>  	if (!entry)
> @@ -851,11 +851,11 @@ find_fw_domain(struct drm_i915_private *dev_priv, u32 offset)
>  	 * translate it here to the list of available domains.
>  	 */
>  	if (entry->domains == FORCEWAKE_ALL)
> -		return dev_priv->uncore.fw_domains;
> +		return uncore->fw_domains;
>  
> -	WARN(entry->domains & ~dev_priv->uncore.fw_domains,
> +	WARN(entry->domains & ~uncore->fw_domains,
>  	     "Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n",
> -	     entry->domains & ~dev_priv->uncore.fw_domains, offset);
> +	     entry->domains & ~uncore->fw_domains, offset);
>  
>  	return entry->domains;
>  }
> @@ -883,7 +883,7 @@ static const struct intel_forcewake_range __vlv_fw_ranges[] = {
>  ({ \
>  	enum forcewake_domains __fwd = 0; \
>  	if (NEEDS_FORCE_WAKE((offset))) \
> -		__fwd = find_fw_domain(dev_priv, offset); \
> +		__fwd = find_fw_domain(&dev_priv->uncore, offset); \
>  	__fwd; \
>  })
>  
> @@ -891,7 +891,7 @@ static const struct intel_forcewake_range __vlv_fw_ranges[] = {
>  ({ \
>  	enum forcewake_domains __fwd = 0; \
>  	if (GEN11_NEEDS_FORCE_WAKE((offset))) \
> -		__fwd = find_fw_domain(dev_priv, offset); \
> +		__fwd = find_fw_domain(&dev_priv->uncore, offset); \
>  	__fwd; \
>  })
>  
> @@ -977,7 +977,7 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
>  ({ \
>  	enum forcewake_domains __fwd = 0; \
>  	if (NEEDS_FORCE_WAKE((offset)) && !is_gen8_shadowed(offset)) \
> -		__fwd = find_fw_domain(dev_priv, offset); \
> +		__fwd = find_fw_domain(&dev_priv->uncore, offset); \
>  	__fwd; \
>  })
>  
> @@ -985,7 +985,7 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
>  ({ \
>  	enum forcewake_domains __fwd = 0; \
>  	if (GEN11_NEEDS_FORCE_WAKE((offset)) && !is_gen11_shadowed(offset)) \
> -		__fwd = find_fw_domain(dev_priv, offset); \
> +		__fwd = find_fw_domain(&dev_priv->uncore, offset); \
>  	__fwd; \
>  })
>  

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

  reply	other threads:[~2019-03-15 22:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 23:13 [RFC 00/10] Compartmentalize uncore code Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 01/10] drm/i915: do not pass dev_priv to low-level forcewake functions Daniele Ceraolo Spurio
2019-03-15 20:07   ` Paulo Zanoni
2019-03-15 23:41   ` Chris Wilson
2019-03-13 23:13 ` [RFC 02/10] drm/i915: use intel_uncore in fw get/put internal paths Daniele Ceraolo Spurio
2019-03-15 21:00   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 03/10] drm/i915: use intel_uncore for all forcewake get/put Daniele Ceraolo Spurio
2019-03-15 21:41   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 04/10] drm/i915: make more uncore function work on intel_uncore Daniele Ceraolo Spurio
2019-03-15 22:17   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 05/10] drm/i915: make find_fw_domain " Daniele Ceraolo Spurio
2019-03-15 22:57   ` Paulo Zanoni [this message]
2019-03-13 23:13 ` [RFC 06/10] drm/i915: reduce the dev_priv->uncore dance in uncore.c Daniele Ceraolo Spurio
2019-03-15 23:07   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 07/10] drm/i915: move regs pointer inside the uncore structure Daniele Ceraolo Spurio
2019-03-15 20:50   ` Chris Wilson
2019-03-18 18:08     ` Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 08/10] drm/i915: make raw access function work on uncore Daniele Ceraolo Spurio
2019-03-15 23:33   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 09/10] drm/i915: add uncore flags Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 10/10] drm/i915: switch uncore mmio funcs to use intel_uncore Daniele Ceraolo Spurio
2019-03-14  4:09 ` ✗ Fi.CI.BAT: failure for Compartmentalize uncore code 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=d9e76f30b2e5420c8d87a6898dfa3e01bbf1924b.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=daniele.ceraolospurio@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 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.