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 | |
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.
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/smi_driver.c | 10 |
3 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 74667a3..825aa9c 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,8 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) +AC_CHECK_HEADER(xf86Modes.h, + [XMODES=yes], [XMODES=no], [#include "xorg-server.h"]) CPPFLAGS="$SAVE_CPPFLAGS" # Checks for header files. @@ -73,6 +75,7 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) +AM_CONDITIONAL(XMODES, test "x$XMODES" = xno) AC_SUBST([XORG_CFLAGS]) AC_SUBST([moduledir]) 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 */ |