[Intel-gfx] [RFC 05/10] drm/i915: make find_fw_domain work on intel_uncore
Paulo Zanoni
paulo.r.zanoni at intel.com
Fri Mar 15 22:57:01 UTC 2019
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 at intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at 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; \
> })
>
More information about the Intel-gfx
mailing list