All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Damien Lespiau <damien.lespiau@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] intel_reg_dumper: Dump FDI_RX_DEBUG registers
Date: Thu, 23 Aug 2012 16:14:36 -0700	[thread overview]
Message-ID: <04385254afd268700eccb39fa6a05669@bwidawsk.net> (raw)
In-Reply-To: <1345727045-4168-2-git-send-email-damien.lespiau@gmail.com>

On 2012-08-23 06:04, Damien Lespiau wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
>
> This reports which lanes are locked.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@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

  reply	other threads:[~2012-08-23 23:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 13:04 [PATCH 1/3] intel_reg_dumper: Fix pipe name in comment Damien Lespiau
2012-08-23 13:04 ` [PATCH 2/3] intel_reg_dumper: Dump FDI_RX_DEBUG registers Damien Lespiau
2012-08-23 23:14   ` Ben Widawsky [this message]
2012-08-29 12:50     ` Lespiau, Damien
2012-08-29 15:49       ` Ben Widawsky
2012-08-23 13:04 ` [PATCH 3/3] intel_reg_dumper: Dump FDI_RX_DEBUG2 registers Damien Lespiau
2012-08-23 23:26   ` Ben Widawsky

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=04385254afd268700eccb39fa6a05669@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=damien.lespiau@gmail.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.