diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-09 18:51:50 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-09 18:51:50 -0300 |
commit | 605199b1fa80d5a65e11a38270f6d0974466d1dc (patch) | |
tree | d0b8daf982eeaabd140faed382d25b890eec99a9 /src | |
parent | 55052509d75492f0936273686826c51fcbc831c1 (diff) |
Add a PanelSize/60Hz CVT mode at driver initialization
This driver is expected to be used with XServer 1.4 or newer, but a
(probably temporary) copy of xf86cvt.c was also added to the build.
This modeline automatically added implies it would not be required
to specify one in xorg.conf, as it should not be uncommon "non standard"
modes, like 800x480 or 1024x600.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/smi_driver.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 63510f5..2219ee2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,4 +44,7 @@ siliconmotion_drv_la_SOURCES = \ smi_pcirename.h \ smi_shadow.c \ smi_video.c \ - smi_video.h + smi_video.h \ +if XMODES + xf86cvt.c +endif diff --git a/src/smi_driver.c b/src/smi_driver.c index 5730550..64db50f 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1047,6 +1047,16 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) clockRanges->interlaceAllowed = FALSE; clockRanges->doubleScanAllowed = FALSE; + /* FIXME Maybe this should be done only for the 501/502? + * as it doesn't have any method of detecting monitors, other then + * reading what is in the hardware, and hoping the kernel received + * the proper parameters, and correctly programmed the hardware. */ + if (pSmi->lcdWidth && pSmi->lcdHeight) + pScrn->monitor->Modes = + xf86ModesAdd(pScrn->monitor->Modes, + xf86CVTMode(pSmi->lcdWidth, pSmi->lcdHeight, 60.0f, + FALSE, FALSE)); + i = xf86ValidateModes( pScrn, /* Screen pointer */ pScrn->monitor->Modes, /* Available monitor modes */ |