[Intel-gfx] [PATCH 2/3] lib: Optionally initialize mmio register access without forcewake

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Aug 28 08:44:50 PDT 2015


On Fri, Aug 28, 2015 at 05:51:46PM +0300, Mika Kuoppala wrote:
> Sometimes it is beneficial to debug the forcewake registers
> themselves or registers that don't need or are interfered by
> forcewake. Add parameter to intel_register_access_init()
> to optionally avoid forcewake dance around register access.
> 
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> ---
>  debugger/debug_rdata.c       |  2 +-
>  debugger/eudb.c              |  2 +-
>  lib/intel_io.h               |  2 +-
>  lib/intel_mmio.c             |  9 +++++++--
>  tests/gem_workarounds.c      |  2 +-
>  tests/pm_lpsp.c              |  2 +-
>  tools/intel_display_poller.c |  2 +-
>  tools/intel_forcewaked.c     |  4 ++--
>  tools/intel_gpu_top.c        |  2 +-
>  tools/intel_infoframes.c     |  2 +-
>  tools/intel_l3_parity.c      |  2 +-
>  tools/intel_panel_fitter.c   |  2 +-
>  tools/intel_perf_counters.c  |  2 +-
>  tools/intel_reg.c            |  6 +++---
>  tools/intel_watermark.c      | 14 +++++++-------
>  tools/quick_dump/chipset.i   |  4 ++--
>  16 files changed, 32 insertions(+), 27 deletions(-)
> 
> diff --git a/debugger/debug_rdata.c b/debugger/debug_rdata.c
> index 61d82d9..2643581 100644
> --- a/debugger/debug_rdata.c
> +++ b/debugger/debug_rdata.c
<snip>  
> @@ -187,7 +188,11 @@ intel_register_access_init(struct pci_device *pci_dev, int safe)
>  	/* Find where the forcewake lock is. Forcewake doesn't exist
>  	 * gen < 6, but the debugfs should do the right things for us.
>  	 */
> -	ret = igt_open_forcewake_handle();
> +	if (nofw)
> +		ret = -1;
> +	else
> +		ret = igt_open_forcewake_handle();

IGT_NO_FORCEWAKE is handled in igt_open_forcewake_handle(). Maybe pull
it out so that all ways to disable forcewake are handled in the same
place?

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list