[Intel-gfx] [PATCH 1/4] drm/i915: Consolidate unclaimed reg detection

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 9 07:47:34 PST 2015


On Wed, Dec 09, 2015 at 05:01:38PM +0200, Mika Kuoppala wrote:
> Access the unclaimed reg detection register through
> one helper which also does cleanup. Note that we now access
> the register only if the platform has the actual non claimed access bit.
> This prevents needlessly reading the register with older gens when
> debug_mmio > 0.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Paulo Zanoni <przanoni at gmail.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 34 ++++++++++++++++++++++------------
>  1 file changed, 22 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index c2358ba..9d672f7 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -334,13 +334,30 @@ static void intel_uncore_ellc_detect(struct drm_device *dev)
>  	}
>  }
>  
> +static bool
> +unclaimed_reg_access(struct drm_i915_private *dev_priv)

check_unclaimed_mmio() otherwise the verb here is "access" and the
function says "access this register in an unclaimed manner".
Or perhaps detect_unclaimed_mmio() would be closer to surrounding usage.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list