From: Paulo Zanoni Subject: [PATCH 1/4] reg_dumper: add interlaced and rotation information to PIPECONF Date: Wed, 15 Feb 2012 16:02:27 -0200 Message-ID: <1329328947-25764-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gy0-f177.google.com (mail-gy0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D6379EB7B for ; Wed, 15 Feb 2012 10:02:50 -0800 (PST) Received: by ghbg20 with SMTP id g20so909962ghb.36 for ; Wed, 15 Feb 2012 10:02:50 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org From: Paulo Zanoni Signed-off-by: Paulo Zanoni --- tools/intel_reg_dumper.c | 65 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 62 insertions(+), 3 deletions(-) diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c index be30fa1..8c07bbb 100644 --- a/tools/intel_reg_dumper.c +++ b/tools/intel_reg_dumper.c @@ -141,7 +141,7 @@ DEBUGSTRING(i830_debug_dspcntr) DEBUGSTRING(i830_debug_pipeconf) { const char *enabled = val & PIPEACONF_ENABLE ? "enabled" : "disabled"; - const char *bit30; + const char *bit30, *interlace; if (IS_965(devid)) bit30 = val & I965_PIPECONF_ACTIVE ? "active" : "inactive"; @@ -150,7 +150,43 @@ DEBUGSTRING(i830_debug_pipeconf) val & PIPEACONF_DOUBLE_WIDE ? "double-wide" : "single-wide"; if (HAS_PCH_SPLIT(devid)) { - const char *bpc; + const char *bpc, *rotation; + + switch ((val >> 21) & 7) { + case 0: + interlace = "pf-pd"; + break; + case 1: + interlace = "pf-id"; + break; + case 3: + interlace = "if-id"; + break; + case 4: + interlace = "if-id-dbl"; + break; + case 5: + interlace = "pf-id-dbl"; + break; + default: + interlace = "rsvd"; + break; + } + + switch ((val >> 14) & 3) { + case 0: + rotation = "rotate 0"; + break; + case 1: + rotation = "rotate 90"; + break; + case 2: + rotation = "rotate 180"; + break; + case 3: + rotation = "rotate 270"; + break; + } switch (val & (7 << 5)) { case PIPECONF_8BPP: @@ -169,7 +205,30 @@ DEBUGSTRING(i830_debug_pipeconf) bpc = "invalid bpc"; break; } - snprintf(result, len, "%s, %s, %s", enabled, bit30, bpc); + snprintf(result, len, "%s, %s, %s, %s, %s", enabled, bit30, + interlace, rotation, bpc); + } else if (IS_GEN4(devid)) { + switch ((val >> 21) & 7) { + case 0: + case 1: + case 2: + case 3: + interlace = "progressive"; + break; + case 4: + interlace = "interlaced embedded"; + break; + case 5: + interlace = "interlaced"; + break; + case 6: + interlace = "interlaced sdvo"; + break; + case 7: + interlace = "interlaced legacy"; + break; + } + snprintf(result, len, "%s, %s, %s", enabled, bit30, interlace); } else snprintf(result, len, "%s, %s", enabled, bit30); } -- 1.7.9