diff options
author | Bart Trojanowski <bart@jukie.net> | 2008-03-02 11:52:01 +0200 |
---|---|---|
committer | Martin-Éric Racine <q-funk@iki.fi> | 2008-03-02 11:52:01 +0200 |
commit | 1e763626aaefa1ae0cf4d4896c0b7192955e5993 (patch) | |
tree | dfc9a39238bd10b83a0d371e423709a8bd49ae09 /src | |
parent | 2a7240e845ba27a9d2f485fda0bb5f8175234454 (diff) |
Implement support for wide and non-standard screen resolutions.
Works fine on the VGA output, but requires further testing to
ensure that it doesn't disturb operation on the TFT output.
Diffstat (limited to 'src')
-rw-r--r-- | src/amd_gx_driver.c | 9 | ||||
-rw-r--r-- | src/amd_lx_driver.c | 21 |
2 files changed, 20 insertions, 10 deletions
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c index 4fcebae..da4fa0b 100644 --- a/src/amd_gx_driver.c +++ b/src/amd_gx_driver.c @@ -795,7 +795,9 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) /* Only use the panel mode for built in modes */ - if ((pMode->type && pMode->type != M_T_USERDEF) && pGeode->Panel) { + if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT) + && pGeode->Panel) { + GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY, pMode->CrtcHDisplay, pMode->CrtcVDisplay, pScrni->bitsPerPixel)); @@ -1402,10 +1404,9 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) GeodeRec *pGeode = GEODEPTR(pScrni); int p, ret; - /* Not sure if this is an X bug or not - but on my current build, - * user defined modes pass a type of 0 */ + /* Use the durango lookup for builtin or default modes only */ - if (pMode->type && pMode->type != M_T_USERDEF) { + if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) { if (pGeode->Panel) { if (pMode->CrtcHDisplay > pGeode->PanelX || diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c index 3aba428..a2db90e 100644 --- a/src/amd_lx_driver.c +++ b/src/amd_lx_driver.c @@ -857,9 +857,10 @@ LXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) lx_disable_dac_power(pScrni, DF_CRT_DISABLE); vg_set_compression_enable(0); - if (!pMode->type || pMode->type == M_T_USERDEF) - lx_set_custom_mode(pGeode, pMode, pScrni->bitsPerPixel); - else { + /* If the mode is a default one, then set the mode with the Cimarron + * tables */ + + if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) { if (pMode->Flags & V_NHSYNC) flags |= VG_MODEFLAG_NEG_HSYNC; if (pMode->Flags & V_NVSYNC) @@ -890,8 +891,14 @@ LXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) pScrni->bitsPerPixel, GeodeGetRefreshRate(pMode), 0); } - } - + } + else { + /* For anything other then a default mode - use the passed in + * timings */ + + lx_set_custom_mode(pGeode, pMode, pScrni->bitsPerPixel); + } + if (pGeode->Output & OUTPUT_PANEL) df_set_output_path((pGeode->Output & OUTPUT_CRT) ? DF_DISPLAY_CRT_FP : DF_DISPLAY_FP); else @@ -1398,7 +1405,9 @@ LXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) memset(&vgQueryMode, 0, sizeof(vgQueryMode)); - if (pMode->type && pMode->type != M_T_USERDEF) { + /* For builtin and default modes, try to look up the mode in Cimarron */ + + if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) { if (pGeode->Output & OUTPUT_PANEL) { |