summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-08-20 14:39:34 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-08-20 14:39:34 -0700
commitba4a4b7887d5c2da21cadfeeed601eaec8515550 (patch)
treee0eca3e24ab5433163f357e880c865df8f949859
parent5eccb5ec7ea78b5800f98decd4216d39b9ebe5ec (diff)
Add more panel debugging info to register dump & vbios reader
-rw-r--r--src/bios_reader/bios_reader.c13
-rw-r--r--src/i810_reg.h6
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_debug.c3
-rw-r--r--src/i830_lvds.c12
5 files changed, 25 insertions, 11 deletions
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index dbcd1503..ba773cc4 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -198,11 +198,22 @@ static void dump_lvds_data(void *data, unsigned char *base)
if (i == panel_type)
marker = '*';
else
- marker = ' ';
+ continue;
printf("%c\tpanel type %02i: %dx%d clock %d\n", marker,
i, lfp_data->fp_timing.x_res, lfp_data->fp_timing.y_res,
_PIXEL_CLOCK(timing_data));
+ printf("\t\tinfo:\n");
+ printf("\t\t LVDS: 0x%08lx\n",
+ (unsigned long)lfp_data->fp_timing.lvds_reg_val);
+ printf("\t\t PP_ON_DELAYS: 0x%08lx\n",
+ (unsigned long)lfp_data->fp_timing.pp_on_reg_val);
+ printf("\t\t PP_OFF_DELAYS: 0x%08lx\n",
+ (unsigned long)lfp_data->fp_timing.pp_off_reg_val);
+ printf("\t\t PP_DIVISOR: 0x%08lx\n",
+ (unsigned long)lfp_data->fp_timing.pp_cycle_reg_val);
+ printf("\t\t PFIT: 0x%08lx\n",
+ (unsigned long)lfp_data->fp_timing.pfit_reg_val);
printf("\t\ttimings: %d %d %d %d %d %d %d %d\n",
_H_ACTIVE(timing_data),
_H_BLANK(timing_data),
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 7739a1cb..a73709ba 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -899,9 +899,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# define POWER_DOWN_ON_RESET (1 << 1)
# define POWER_TARGET_ON (1 << 0)
-#define LVDSPP_ON 0x61208
-#define LVDSPP_OFF 0x6120c
-#define PP_CYCLE 0x61210
+#define PP_ON_DELAYS 0x61208
+#define PP_OFF_DELAYS 0x6120c
+#define PP_DIVISOR 0x61210
#define PFIT_CONTROL 0x61230
# define PFIT_ENABLE (1 << 31)
diff --git a/src/i830.h b/src/i830.h
index 73fb2ad2..ef6d07c7 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -682,7 +682,7 @@ typedef struct _I830Rec {
uint32_t savePP_ON;
uint32_t savePP_OFF;
uint32_t savePP_CONTROL;
- uint32_t savePP_CYCLE;
+ uint32_t savePP_DIVISOR;
uint32_t savePFIT_CONTROL;
uint32_t savePaletteA[256];
uint32_t savePaletteB[256];
diff --git a/src/i830_debug.c b/src/i830_debug.c
index f1205cc6..21afb466 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -521,6 +521,9 @@ static struct i830SnapshotRec {
DEFINEREG2(PP_CONTROL, i830_debug_pp_control),
DEFINEREG2(PP_STATUS, i830_debug_pp_status),
+ DEFINEREG(PP_ON_DELAYS),
+ DEFINEREG(PP_OFF_DELAYS),
+ DEFINEREG(PP_DIVISOR),
DEFINEREG(PFIT_CONTROL),
DEFINEREG(PFIT_PGM_RATIOS),
DEFINEREG(PORT_HOTPLUG_EN),
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 801261a1..0d67d50c 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -449,10 +449,10 @@ i830_lvds_save (xf86OutputPtr output)
if (IS_I965GM(pI830) || IS_GM45(pI830))
pI830->saveBLC_PWM_CTL2 = INREG(BLC_PWM_CTL2);
- pI830->savePP_ON = INREG(LVDSPP_ON);
- pI830->savePP_OFF = INREG(LVDSPP_OFF);
+ pI830->savePP_ON = INREG(PP_ON_DELAYS);
+ pI830->savePP_OFF = INREG(PP_OFF_DELAYS);
pI830->savePP_CONTROL = INREG(PP_CONTROL);
- pI830->savePP_CYCLE = INREG(PP_CYCLE);
+ pI830->savePP_DIVISOR = INREG(PP_DIVISOR);
pI830->saveBLC_PWM_CTL = INREG(BLC_PWM_CTL);
if ((INREG(PP_CONTROL) & POWER_TARGET_ON) && !dev_priv->dpmsoff)
dev_priv->backlight_duty_cycle = dev_priv->get_backlight(output);
@@ -467,9 +467,9 @@ i830_lvds_restore(xf86OutputPtr output)
if (IS_I965GM(pI830) || IS_GM45(pI830))
OUTREG(BLC_PWM_CTL2, pI830->saveBLC_PWM_CTL2);
OUTREG(BLC_PWM_CTL, pI830->saveBLC_PWM_CTL);
- OUTREG(LVDSPP_ON, pI830->savePP_ON);
- OUTREG(LVDSPP_OFF, pI830->savePP_OFF);
- OUTREG(PP_CYCLE, pI830->savePP_CYCLE);
+ OUTREG(PP_ON_DELAYS, pI830->savePP_ON);
+ OUTREG(PP_OFF_DELAYS, pI830->savePP_OFF);
+ OUTREG(PP_DIVISOR, pI830->savePP_DIVISOR);
OUTREG(PP_CONTROL, pI830->savePP_CONTROL);
if (pI830->savePP_CONTROL & POWER_TARGET_ON)
i830SetLVDSPanelPower(output, TRUE);