diff options
author | Matthew Garrett <mjg59@srcf.ucam.org> | 2007-09-13 02:51:15 +0100 |
---|---|---|
committer | Matthew Garrett <mjg59@srcf.ucam.org> | 2007-09-13 02:51:15 +0100 |
commit | f164e21549576b62e0e3423eb6d9e8a47d1dccf4 (patch) | |
tree | d43dd8f3f0256e226ccf327a1660628753b9ca71 | |
parent | 9d8ffbc5372bea4e1d139a32ac6f7c7fb1aad869 (diff) | |
parent | 5757df29e6e427a6131fd7e96dab91f54e36e6c2 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/avivo/xf86-video-avivo
-rw-r--r-- | avivotool/avivotool.c | 16 | ||||
-rw-r--r-- | include/avivo.h | 6 | ||||
-rw-r--r-- | include/radeon_reg.h | 9 | ||||
-rw-r--r-- | xorg/avivo_common.c | 1 | ||||
-rw-r--r-- | xorg/avivo_crtc.c | 4 | ||||
-rw-r--r-- | xorg/avivo_cursor.c | 1 | ||||
-rw-r--r-- | xorg/avivo_output.c | 5 | ||||
-rw-r--r-- | xorg/avivo_state.c | 10 |
8 files changed, 21 insertions, 31 deletions
diff --git a/avivotool/avivotool.c b/avivotool/avivotool.c index 7ca60dc..f12c1e3 100644 --- a/avivotool/avivotool.c +++ b/avivotool/avivotool.c @@ -538,9 +538,7 @@ void radeon_output_set(char *output, char *status) SET_REG(AVIVO_CRTC1_V_SYNC_WID, (3 << 16)); SET_REG(AVIVO_CRTC1_V_SYNC_POL, 0x00000000); SET_REG(AVIVO_CRTC1_FB_FORMAT, AVIVO_CRTC_FORMAT_ARGB32); - SET_REG(AVIVO_CRTC1_MODE, 0x00000000); - SET_REG(0x000060c0, 0x00000000); - SET_REG(AVIVO_CRTC1_CNTL, 0x00010101); + SET_REG(AVIVO_CRTC1_CNTL, AVIVO_CRTC_EN); SET_REG(AVIVO_CRTC1_SCAN_ENABLE, AVIVO_CRTC_SCAN_EN); } else { @@ -757,7 +755,7 @@ static struct { REGLIST(AVIVO_CRTC1_V_SYNC_WID), REGLIST(AVIVO_CRTC1_V_SYNC_POL), REGLIST(AVIVO_CRTC1_CNTL), - REGLIST(AVIVO_CRTC1_MODE), + REGLIST(AVIVO_CRTC1_BLANK_STATUS), REGLIST(AVIVO_CRTC1_SCAN_ENABLE), REGLIST(AVIVO_CRTC1_FB_FORMAT), REGLIST(AVIVO_CRTC1_FB_LOCATION), @@ -778,7 +776,7 @@ static struct { REGLIST(AVIVO_CRTC2_V_SYNC_WID), REGLIST(AVIVO_CRTC2_V_SYNC_POL), REGLIST(AVIVO_CRTC2_CNTL), - REGLIST(AVIVO_CRTC2_MODE), + REGLIST(AVIVO_CRTC2_BLANK_STATUS), REGLIST(AVIVO_CRTC2_SCAN_ENABLE), REGLIST(AVIVO_CRTC2_FB_FORMAT), REGLIST(AVIVO_CRTC2_FB_LOCATION), @@ -1037,8 +1035,8 @@ void radeon_cmd_regs(const char *type) 8, 8, "Mystery bit #1", 16, 16, "Mystery bit #2", 0, 0, NULL); - SHOW_REG_BITS(AVIVO_CRTC1_MODE, - 8, 8, "Text mode", + SHOW_REG_BITS(AVIVO_CRTC1_BLANK_STATUS, + 8, 8, "Blank status", 0, 0, NULL); SHOW_REG_DECIMAL(AVIVO_CRTC1_H_TOTAL); SHOW_REG_BITS(AVIVO_CRTC1_H_BLANK, @@ -1099,8 +1097,8 @@ void radeon_cmd_regs(const char *type) 8, 8, "Mystery bit #1", 16, 16, "Mystery bit #2", 0, 0, NULL); - SHOW_REG_BITS(AVIVO_CRTC2_MODE, - 8, 8, "Text mode", + SHOW_REG_BITS(AVIVO_CRTC2_BLANK_STATUS, + 8, 8, "Blank status", 0, 0, NULL); SHOW_REG_DECIMAL(AVIVO_CRTC2_H_TOTAL); SHOW_REG_BITS(AVIVO_CRTC2_H_BLANK, diff --git a/include/avivo.h b/include/avivo.h index 92d2982..b2ab816 100644 --- a/include/avivo.h +++ b/include/avivo.h @@ -109,8 +109,8 @@ struct avivo_state int crtc1_v_sync_wid; int crtc1_v_sync_pol; int crtc1_cntl; - int crtc1_mode; - int crtc1_60c0_mystery; + int crtc1_blank_status; + int crtc1_stereo_status; int crtc1_scan_enable; int crtc1_fb_format; int crtc1_fb_location; @@ -142,7 +142,7 @@ struct avivo_state int crtc2_v_sync_wid; int crtc2_v_sync_pol; int crtc2_cntl; - int crtc2_mode; + int crtc2_blank_status; int crtc2_scan_enable; int crtc2_fb_format; int crtc2_fb_location; diff --git a/include/radeon_reg.h b/include/radeon_reg.h index 239496c..44b6377 100644 --- a/include/radeon_reg.h +++ b/include/radeon_reg.h @@ -84,7 +84,7 @@ # define RADEON_AGP_APER_SIZE_8MB (0x3e << 0) # define RADEON_AGP_APER_SIZE_4MB (0x3f << 0) # define RADEON_AGP_APER_SIZE_MASK (0x3f << 0) -#define RADEON_STATUS_PCI_CONFIG 0x06 +#define RADEON_STATUS_BLANK_CONFIG 0x06 # define RADEON_CAP_LIST 0x100000 #define RADEON_CAPABILITIES_PTR_PCI_CONFIG 0x34 /* offset in PCI config*/ # define RADEON_CAP_PTR_MASK 0xfc /* mask off reserved bits of CAP_PTR */ @@ -3245,9 +3245,8 @@ #define AVIVO_CRTC1_V_SYNC_POL 0x602c #define AVIVO_CRTC1_CNTL 0x6080 # define AVIVO_CRTC_EN (1 << 0) -#define AVIVO_CRTC1_MODE 0x6084 -# define AVIVO_CRTC_MODE_TEXT (1 << 8) -#define AVIVO_CRTC1_60c0_MYSTERY 0x60c0 +#define AVIVO_CRTC1_BLANK_STATUS 0x6084 +#define AVIVO_CRTC1_STEREO_STATUS 0x60c0 /* These all appear to control the scanout from the framebuffer. * Flicking SCAN_ENABLE low results in a black screen -- aside from @@ -3313,7 +3312,7 @@ #define AVIVO_CRTC2_V_SYNC_WID 0x6828 #define AVIVO_CRTC2_V_SYNC_POL 0x682c #define AVIVO_CRTC2_CNTL 0x6880 -#define AVIVO_CRTC2_MODE 0x6884 +#define AVIVO_CRTC2_BLANK_STATUS 0x6884 #define AVIVO_CRTC2_SCAN_ENABLE 0x6900 #define AVIVO_CRTC2_FB_FORMAT 0x6904 diff --git a/xorg/avivo_common.c b/xorg/avivo_common.c index ee7e484..acefc4f 100644 --- a/xorg/avivo_common.c +++ b/xorg/avivo_common.c @@ -84,7 +84,6 @@ avivo_get_info(ScrnInfoPtr screen_info) if (!screen_info->driverPrivate) { screen_info->driverPrivate = xcalloc(sizeof(struct avivo_info), 1); - memset(screen_info->driverPrivate, 0, sizeof(struct avivo_info)); } avivo = screen_info->driverPrivate; diff --git a/xorg/avivo_crtc.c b/xorg/avivo_crtc.c index 0371987..0e92892 100644 --- a/xorg/avivo_crtc.c +++ b/xorg/avivo_crtc.c @@ -53,7 +53,7 @@ avivo_crtc_enable(xf86CrtcPtr crtc, int enable) if (enable) { scan_enable = AVIVO_CRTC_SCAN_EN; - cntl = 0x00010101; + cntl = AVIVO_CRTC_EN; } else { scan_enable = 0; cntl = 0; @@ -254,8 +254,6 @@ avivo_crtc_mode_set(xf86CrtcPtr crtc, avivo_crtc->fb_format); OUTREG(AVIVO_CRTC1_FB_END + avivo_crtc->crtc_offset, fb_location + avivo_crtc->fb_length); - OUTREG(AVIVO_CRTC1_MODE + avivo_crtc->crtc_offset, 0); - OUTREG(AVIVO_CRTC1_60c0_MYSTERY + avivo_crtc->crtc_offset, 0); /* avivo can only shift offset by 4 pixel in x if you program somethings * not multiple of 4 you gonna drive the GPU crazy and likely won't * be able to restore it without cold reboot (vbe post not enough) diff --git a/xorg/avivo_cursor.c b/xorg/avivo_cursor.c index 735bdef..152238c 100644 --- a/xorg/avivo_cursor.c +++ b/xorg/avivo_cursor.c @@ -154,7 +154,6 @@ avivo_cursor_set_colors(ScrnInfoPtr screen_info, int bg, int fg) void avivo_cursor_init(ScreenPtr screen) { - ScrnInfoPtr screen_info = xf86Screens[screen->myNum]; xf86CursorInfoPtr cursor; cursor = xcalloc(1, sizeof(*cursor)); diff --git a/xorg/avivo_output.c b/xorg/avivo_output.c index a78faa8..ff8161a 100644 --- a/xorg/avivo_output.c +++ b/xorg/avivo_output.c @@ -141,8 +141,7 @@ avivo_output_tmds2_setup(xf86OutputPtr output) AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD11EN | AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD12EN)); - /* FIXME: This is wrong, surely? Or are we assuming that the TMDS is set up properly? */ - OUTREG(AVIVO_LVTMA_CNTL, (INREG(AVIVO_TMDSA_CNTL) | AVIVO_LVTMA_CNTL_ENABLE)); + OUTREG(AVIVO_LVTMA_CNTL, (INREG(AVIVO_LVTMA_CNTL) | AVIVO_LVTMA_CNTL_ENABLE)); OUTREG(AVIVO_LVTMA_DCBALANCER_CONTROL, AVIVO_LVTMA_DCBALANCER_CONTROL_EN); /* FIXME: Bonghits? Make really sure we reenable the PLLs*/ @@ -493,7 +492,7 @@ Bool avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, int number, unsigned long ddc_reg) { - xf86OutputPtr output; + xf86OutputPtr output = {0,}; struct avivo_output_private *avivo_output; int name_size; diff --git a/xorg/avivo_state.c b/xorg/avivo_state.c index ef0ba95..3dff5e1 100644 --- a/xorg/avivo_state.c +++ b/xorg/avivo_state.c @@ -114,8 +114,6 @@ avivo_restore_state(ScrnInfoPtr screen_info) #endif OUTREG(AVIVO_CRTC1_V_SYNC_POL, state->crtc1_v_sync_pol); OUTREG(AVIVO_CRTC1_CNTL, state->crtc1_cntl); - OUTREG(AVIVO_CRTC1_MODE, state->crtc1_mode); - OUTREG(AVIVO_CRTC1_60c0_MYSTERY, state->crtc1_60c0_mystery); OUTREG(AVIVO_CRTC1_SCAN_ENABLE, state->crtc1_scan_enable); OUTREG(AVIVO_CRTC1_FB_FORMAT, state->crtc1_fb_format); OUTREG(AVIVO_CRTC1_FB_LOCATION, state->crtc1_fb_location); @@ -149,7 +147,7 @@ avivo_restore_state(ScrnInfoPtr screen_info) OUTREG(AVIVO_CRTC2_V_SYNC_WID, state->crtc2_v_sync_wid); OUTREG(AVIVO_CRTC2_V_SYNC_POL, state->crtc2_v_sync_pol); OUTREG(AVIVO_CRTC2_CNTL, state->crtc2_cntl); - OUTREG(AVIVO_CRTC2_MODE, state->crtc2_mode); + OUTREG(AVIVO_CRTC2_BLANK_STATUS, state->crtc2_blank_status); OUTREG(AVIVO_CRTC2_SCAN_ENABLE, state->crtc2_scan_enable); OUTREG(AVIVO_CRTC2_FB_FORMAT, state->crtc2_fb_format); OUTREG(AVIVO_CRTC2_FB_LOCATION, state->crtc2_fb_location); @@ -232,8 +230,8 @@ avivo_save_state(ScrnInfoPtr screen_info) state->crtc1_v_sync_wid = INREG(AVIVO_CRTC1_V_SYNC_WID); state->crtc1_v_sync_pol = INREG(AVIVO_CRTC1_V_SYNC_POL); state->crtc1_cntl = INREG(AVIVO_CRTC1_CNTL); - state->crtc1_mode = INREG(AVIVO_CRTC1_MODE); - state->crtc1_60c0_mystery = INREG(AVIVO_CRTC1_60c0_MYSTERY); + state->crtc1_blank_status = INREG(AVIVO_CRTC1_BLANK_STATUS); + state->crtc1_stereo_status = INREG(AVIVO_CRTC1_STEREO_STATUS); state->crtc1_scan_enable = INREG(AVIVO_CRTC1_SCAN_ENABLE); state->crtc1_fb_format = INREG(AVIVO_CRTC1_FB_FORMAT); state->crtc1_fb_location = INREG(AVIVO_CRTC1_FB_LOCATION); @@ -266,7 +264,7 @@ avivo_save_state(ScrnInfoPtr screen_info) state->crtc2_v_sync_wid = INREG(AVIVO_CRTC2_V_SYNC_WID); state->crtc2_v_sync_pol = INREG(AVIVO_CRTC2_V_SYNC_POL); state->crtc2_cntl = INREG(AVIVO_CRTC2_CNTL); - state->crtc2_mode = INREG(AVIVO_CRTC2_MODE); + state->crtc2_blank_status = INREG(AVIVO_CRTC2_BLANK_STATUS); state->crtc2_scan_enable = INREG(AVIVO_CRTC2_SCAN_ENABLE); state->crtc2_fb_format = INREG(AVIVO_CRTC2_FB_FORMAT); state->crtc2_fb_location = INREG(AVIVO_CRTC2_FB_LOCATION); |