[Intel-gfx] [PATCH 2/3] intel_reg_dumper: Dump FDI_RX_DEBUG registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-08-23 06:04, Damien Lespiau wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
>
> This reports which lanes are locked.
>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
>  lib/intel_reg.h          |  8 ++++++++
>  tools/intel_reg_dumper.c | 21 +++++++++++++++++++++
>  2 files changed, 29 insertions(+)
>
> diff --git a/lib/intel_reg.h b/lib/intel_reg.h
> index ffded64..0796cb5 100644
> --- a/lib/intel_reg.h
> +++ b/lib/intel_reg.h
> @@ -3381,6 +3381,14 @@ typedef enum {
>  #define FDI_RXC_TUSIZE1		0xf2030
>  #define FDI_RXC_TUSIZE2		0xf2038
>
> +#define FDI_RXA_DEBUG		0xf0020
> +#define FDI_RXB_DEBUG		0xf1020
> +#define FDI_RXC_DEBUG		0xf2020
> +#define  FDI_RX_DEBUG_L3_BIT_LOCKED		(1<<29)
> +#define  FDI_RX_DEBUG_L2_BIT_LOCKED		(1<<28)
> +#define  FDI_RX_DEBUG_L1_BIT_LOCKED		(1<<27)
> +#define  FDI_RX_DEBUG_L0_BIT_LOCKED		(1<<26)
> +
>  /* FDI_RX interrupt register format */
>  #define FDI_RX_INTER_LANE_ALIGN		(1<<10)
>  #define FDI_RX_SYMBOL_LOCK		(1<<9) /* train 2 */

My only gripe with this patch is in the naming. Can you please use 
something find-able in the BSPEC, like: FDI_RX_DEBUG_B instead of 
FDI_RXB_DEBUG

> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
> index f6392e2..7f6eaaa 100644
> --- a/tools/intel_reg_dumper.c
> +++ b/tools/intel_reg_dumper.c
> @@ -1310,6 +1310,23 @@ DEBUGSTRING(ironlake_debug_fdi_rx_misc)
>  	snprintf(result, len, "FDI Delay %d", val & ((1 << 13) - 1));
>  }
>
> +DEBUGSTRING(ironlake_debug_fdi_rx_debug)
> +{
> +	int l0_locked = val & FDI_RX_DEBUG_L0_BIT_LOCKED;
> +	int l1_locked = val & FDI_RX_DEBUG_L1_BIT_LOCKED;
> +	int l2_locked = val & FDI_RX_DEBUG_L2_BIT_LOCKED;
> +	int l3_locked = val & FDI_RX_DEBUG_L3_BIT_LOCKED;
> +	const char *none = "";
> +
> +	if (l0_locked + l1_locked + l2_locked + l3_locked == 0)
> +		none = "none";
> +
> +	snprintf(result, len, "bit locked lanes: %s%s%s%s%s",
> +		 l0_locked ? "0 " : "", l1_locked ? "1 " : "",
> +		 l2_locked ? "2 " : "", l3_locked ? "3 " : "",
> +		 none);
> +}
> +
>  DEBUGSTRING(ironlake_debug_transconf)
>  {
>  	const char *enable = val & TRANS_ENABLE ? "enable" : "disable";
> @@ -1793,6 +1810,10 @@ static struct reg_debug ironlake_debug_regs[] 
> = {
>  	DEFINEREG(FDI_RXB_IIR),
>  	DEFINEREG(FDI_RXB_IMR),
>
> +	DEFINEREG2(FDI_RXA_DEBUG, ironlake_debug_fdi_rx_debug),
> +	DEFINEREG2(FDI_RXB_DEBUG, ironlake_debug_fdi_rx_debug),
> +	DEFINEREG2(FDI_RXC_DEBUG, ironlake_debug_fdi_rx_debug),
> +
>  	DEFINEREG2(PCH_ADPA, i830_debug_adpa),
>  	DEFINEREG2(HDMIB, ironlake_debug_hdmi),
>  	DEFINEREG2(HDMIC, ironlake_debug_hdmi),

-- 
Ben Widawsky, Intel Open Source Technology Center


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux