diff options
Diffstat (limited to 'src/lx_panel.c')
-rw-r--r-- | src/lx_panel.c | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/src/lx_panel.c b/src/lx_panel.c index 95cf0b3..6b5d4ed 100644 --- a/src/lx_panel.c +++ b/src/lx_panel.c @@ -49,29 +49,29 @@ DisplayModeRec lx_panel_modes[] = { {MODEPREFIX, 31200, 320, 354, 384, 400, 0, 240, 249, 253, 260, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 320x200@75 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 320x200@75 */ {MODEPREFIX, 25175, 640, 656, 744, 800, 0, 480, 490, 492, 525, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 640x480@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 640x480@60 */ {MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 880x600@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 880x600@60 */ {MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1024x768@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1024x768@60 */ {MODEPREFIX, 81600, 1152, 1216, 1336, 1520, 0, 864, 865, 868, 895, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1152x864@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1152x864@60 */ {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1280x1024@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1280x1024@60 */ {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1600x1200@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1600x1200@60 */ {MODEPREFIX, 48960, 1024, 1064, 1168, 1312, 0, 600, 601, 604, 622, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1024x600@60 wide panels */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1024x600@60 wide panels */ }; /* Get the legacy panel size from VSA, and return the associated mode rec */ @@ -81,25 +81,26 @@ LXGetLegacyPanelMode(ScrnInfoPtr pScrni) { unsigned short reg = LX_READ_VG(0x00); unsigned char ret = (reg >> 8) & 0x07; + if ((ret == 1 || ret == 5)) { - reg = LX_READ_VG(0x02); - ret = (reg >> 3) & 0x07; + reg = LX_READ_VG(0x02); + ret = (reg >> 3) & 0x07; - /* FIXME: 7 is reserved in default. We use this value to support - * wide screen resolution 1024x600@80 now for panel. If you want to use - * that resolution, please assign ret to 7 manually here: - * "reg = 7" - * The user can use this entry for other wide screen resolutions. - */ + /* FIXME: 7 is reserved in default. We use this value to support + * wide screen resolution 1024x600@80 now for panel. If you want to use + * that resolution, please assign ret to 7 manually here: + * "reg = 7" + * The user can use this entry for other wide screen resolutions. + */ - if (ret < 8) { - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - " VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n", - lx_panel_modes[ret].HDisplay, lx_panel_modes[ret].VDisplay, - lx_panel_modes[ret].Clock); - return &lx_panel_modes[ret]; - } + if (ret < 8) { + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + " VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n", + lx_panel_modes[ret].HDisplay, + lx_panel_modes[ret].VDisplay, lx_panel_modes[ret].Clock); + return &lx_panel_modes[ret]; + } } @@ -118,17 +119,17 @@ LXGetManualPanelMode(char *modestr) char sname[32]; int ret = sscanf(modestr, "%d %d %d %d %d %d %d %d %d", - &clock, - &hactive, &hsstart, &hsend, &htotal, - &vactive, &vsstart, &vsend, &vtotal); + &clock, + &hactive, &hsstart, &hsend, &htotal, + &vactive, &vsstart, &vsend, &vtotal); if (ret != 9) - return NULL; + return NULL; mode = xnfcalloc(1, sizeof(DisplayModeRec)); if (mode == NULL) - return NULL; + return NULL; sprintf(sname, "%dx%d", hactive, vactive); |