diff options
author | Dafydd Harries <daf@rhydd.org> | 2007-09-13 03:25:03 +0100 |
---|---|---|
committer | Dafydd Harries <daf@rhydd.org> | 2007-09-13 03:25:03 +0100 |
commit | cf9952033a2cab0fd1d8cb453c4d5fdb6f687810 (patch) | |
tree | 93ed7b8d83e9515cf2d4d0094511d570e08ed9c4 | |
parent | f164e21549576b62e0e3423eb6d9e8a47d1dccf4 (diff) |
make LVTMA power management constants match spec better
-rw-r--r-- | avivotool/avivotool.c | 12 | ||||
-rw-r--r-- | include/radeon_reg.h | 18 | ||||
-rw-r--r-- | xorg/avivo_output.c | 11 |
3 files changed, 30 insertions, 11 deletions
diff --git a/avivotool/avivotool.c b/avivotool/avivotool.c index f12c1e3..cb86211 100644 --- a/avivotool/avivotool.c +++ b/avivotool/avivotool.c @@ -548,10 +548,10 @@ void radeon_output_set(char *output, char *status) } else if (strcmp(output, "lvds") == 0) { if (on) - SET_REG(AVIVO_LVDS_CNTL, GET_REG(AVIVO_LVDS_CNTL) | AVIVO_LVDS_EN); + SET_REG(AVIVO_LVTMA_PWRSEQ_CNTL, GET_REG(AVIVO_LVTMA_PWRSEQ_CNTL) | AVIVO_LVTMA_PWRSEQ_EN); else - SET_REG(AVIVO_LVDS_CNTL, GET_REG(AVIVO_LVDS_CNTL) & - ~(AVIVO_LVDS_EN)); + SET_REG(AVIVO_LVTMA_PWRSEQ_CNTL, GET_REG(AVIVO_LVTMA_PWRSEQ_CNTL) & + ~(AVIVO_LVTMA_PWRSEQ_EN)); } else if (strcmp(output, "cur1") == 0) { if (on) { @@ -802,7 +802,7 @@ static struct { REGLIST(AVIVO_LVTMA_DATA_SYNCHRONIZATION), REGLIST(AVIVO_LVTMA_TRANSMITTER_CONTROL), REGLIST(AVIVO_TMDS_STATUS), - REGLIST(AVIVO_LVDS_CNTL), + REGLIST(AVIVO_LVTMA_PWRSEQ_CNTL), REGLIST(AVIVO_LVDS_BACKLIGHT_CNTL), REGLIST(AVIVO_CURSOR1_CNTL), REGLIST(AVIVO_CURSOR1_POSITION), @@ -902,7 +902,7 @@ void radeon_cmd_regs(const char *type) show_tmds1 = 1; if (GET_REG(AVIVO_LVTMA_CNTL) & AVIVO_TMDSA_CNTL_ENABLE) show_tmds2 = 1; - if (GET_REG(AVIVO_LVDS_EN) & AVIVO_LVDS_EN) + if (GET_REG(AVIVO_LVTMA_PWRSEQ_EN) & AVIVO_LVTMA_PWRSEQ_EN) show_lvds = 1; if (GET_REG(AVIVO_CURSOR1_CNTL) & AVIVO_CURSOR_EN) show_cur1 = 1; @@ -1203,7 +1203,7 @@ void radeon_cmd_regs(const char *type) if (show_lvds) { printf("\nLVDS:\n"); - SHOW_REG_BITS(AVIVO_LVDS_CNTL, + SHOW_REG_BITS(AVIVO_LVTMA_PWRSEQ_CNTL, 0, 0, "Enable", 4, 4, "Enable #2", 0, 0, NULL); diff --git a/include/radeon_reg.h b/include/radeon_reg.h index 44b6377..7ad466f 100644 --- a/include/radeon_reg.h +++ b/include/radeon_reg.h @@ -3492,9 +3492,21 @@ # define AVIVO_LVTMA_TRANSMITTER_CONTROL_USE_CLK_DATA (1 << 29) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_INPUT_TEST_CLK_SEL (1 << 31) -#define AVIVO_LVDS_CNTL 0x7af0 -# define AVIVO_LVDS_EN ((1 << 4)) -# define AVIVO_LVDS_MYSTERY ((1 << 0) | (1 << 2) | (1 << 3)) +#define AVIVO_LVTMA_PWRSEQ_CNTL 0x7af0 +# define AVIVO_LVTMA_PWRSEQ_EN (1 << 0) +# define AVIVO_LVTMA_PWRSEQ_PLL_ENABLE_MASK (1 << 2) +# define AVIVO_LVTMA_PWRSEQ_PLL_RESET_MASK (1 << 3) +# define AVIVO_LVTMA_PWRSEQ_TARGET_STATE (1 << 4) +# define AVIVO_LVTMA_SYNCEN (1 << 8) +# define AVIVO_LVTMA_SYNCEN_OVRD (1 << 9) +# define AVIVO_LVTMA_SYNCEN_POL (1 << 10) +# define AVIVO_LVTMA_DIGON (1 << 16) +# define AVIVO_LVTMA_DIGON_OVRD (1 << 17) +# define AVIVO_LVTMA_DIGON_POL (1 << 18) +# define AVIVO_LVTMA_BLON (1 << 24) +# define AVIVO_LVTMA_BLON_OVRD (1 << 25) +# define AVIVO_LVTMA_BLON_POL (1 << 26) + #define AVIVO_LVTMA_PWRSEQ_STATE 0x7af4 # define AVIVO_LVTMA_PWRSEQ_STATE_TARGET_STATE_R (1 << 0) # define AVIVO_LVTMA_PWRSEQ_STATE_DIGON (1 << 1) diff --git a/xorg/avivo_output.c b/xorg/avivo_output.c index ff8161a..d7249f4 100644 --- a/xorg/avivo_output.c +++ b/xorg/avivo_output.c @@ -242,7 +242,11 @@ avivo_output_lvds_dpms(xf86OutputPtr output, int mode) switch(mode) { case DPMSModeOn: xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "ENABLE LVTMA\n"); - OUTREG(AVIVO_LVDS_CNTL, AVIVO_LVDS_EN | AVIVO_LVDS_MYSTERY); + OUTREG(AVIVO_LVTMA_PWRSEQ_CNTL, + AVIVO_LVTMA_PWRSEQ_EN | + AVIVO_LVTMA_PWRSEQ_PLL_ENABLE_MASK | + AVIVO_LVTMA_PWRSEQ_PLL_RESET_MASK | + AVIVO_LVTMA_PWRSEQ_TARGET_STATE); OUTREG(AVIVO_LVTMA_TRANSMITTER_ENABLE, (AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKC0EN | AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD00EN | AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD01EN | @@ -256,7 +260,10 @@ avivo_output_lvds_dpms(xf86OutputPtr output, int mode) case DPMSModeSuspend: case DPMSModeOff: xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DISABLE LVTMA\n"); - OUTREG(AVIVO_LVDS_CNTL, AVIVO_LVDS_MYSTERY); + OUTREG(AVIVO_LVTMA_PWRSEQ_CNTL, + AVIVO_LVTMA_PWRSEQ_EN | + AVIVO_LVTMA_PWRSEQ_PLL_ENABLE_MASK | + AVIVO_LVTMA_PWRSEQ_PLL_RESET_MASK); do { tmp = INREG(AVIVO_LVTMA_PWRSEQ_STATE); usleep(100); |