diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
commit | dbca69c8a4f3e2d1ccb4f89152213b2861b33af6 (patch) | |
tree | f8963ef73903a7b4374adc2354dffbaa905112ac /xserver/hw/xfree86/vbe | |
parent | 33b2029f322f3c238b7ba528083195ad8dde33e1 (diff) |
xserver 1.5.2. tested by ckuethe@, oga@, and others.
Diffstat (limited to 'xserver/hw/xfree86/vbe')
-rw-r--r-- | xserver/hw/xfree86/vbe/Makefile.in | 70 | ||||
-rw-r--r-- | xserver/hw/xfree86/vbe/vbe.c | 74 | ||||
-rw-r--r-- | xserver/hw/xfree86/vbe/vbeModes.c | 31 |
3 files changed, 121 insertions, 54 deletions
diff --git a/xserver/hw/xfree86/vbe/Makefile.in b/xserver/hw/xfree86/vbe/Makefile.in index e7c7435ee..1334e7202 100644 --- a/xserver/hw/xfree86/vbe/Makefile.in +++ b/xserver/hw/xfree86/vbe/Makefile.in @@ -123,8 +123,6 @@ BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@ BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@ BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ -BUILD_DARWIN_FALSE = @BUILD_DARWIN_FALSE@ -BUILD_DARWIN_TRUE = @BUILD_DARWIN_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_IOPORT_FALSE = @BUILD_IOPORT_FALSE@ BUILD_IOPORT_TRUE = @BUILD_IOPORT_TRUE@ @@ -196,6 +194,10 @@ DMX_FALSE = @DMX_FALSE@ DMX_TRUE = @DMX_TRUE@ DPMSExtension_FALSE = @DPMSExtension_FALSE@ DPMSExtension_TRUE = @DPMSExtension_TRUE@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI2_FALSE = @DRI2_FALSE@ +DRI2_TRUE = @DRI2_TRUE@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ @@ -225,7 +227,7 @@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ -FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_FALSE = @GLX_FALSE@ GLX_TRUE = @GLX_TRUE@ @@ -239,8 +241,8 @@ HAVE_AGL_FRAMEWORK_FALSE = @HAVE_AGL_FRAMEWORK_FALSE@ HAVE_AGL_FRAMEWORK_TRUE = @HAVE_AGL_FRAMEWORK_TRUE@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ -HAVE_X_PLUGIN_FALSE = @HAVE_X_PLUGIN_FALSE@ -HAVE_X_PLUGIN_TRUE = @HAVE_X_PLUGIN_TRUE@ +HAVE_XPLUGIN_FALSE = @HAVE_XPLUGIN_FALSE@ +HAVE_XPLUGIN_TRUE = @HAVE_XPLUGIN_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -281,6 +283,9 @@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KDRIVE_TRUE = @KDRIVE_TRUE@ +LAUNCHD = @LAUNCHD@ +LAUNCHD_FALSE = @LAUNCHD_FALSE@ +LAUNCHD_TRUE = @LAUNCHD_TRUE@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -335,6 +340,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -342,12 +349,11 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ -PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ @@ -359,13 +365,12 @@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ -RGB_DB = @RGB_DB@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ -SERVERCONFIGdir = @SERVERCONFIGdir@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SGI_VIDEO_FALSE = @SGI_VIDEO_FALSE@ SGI_VIDEO_TRUE = @SGI_VIDEO_TRUE@ @@ -381,20 +386,21 @@ SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@ STRIP = @STRIP@ SUN_KBD_MODE_FALSE = @SUN_KBD_MODE_FALSE@ SUN_KBD_MODE_TRUE = @SUN_KBD_MODE_TRUE@ -SYS_LIBS = @SYS_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_FALSE = @TSLIB_FALSE@ TSLIB_LIBS = @TSLIB_LIBS@ TSLIB_TRUE = @TSLIB_TRUE@ USE_CURSES_FALSE = @USE_CURSES_FALSE@ USE_CURSES_TRUE = @USE_CURSES_TRUE@ -USE_RGB_BUILTIN_FALSE = @USE_RGB_BUILTIN_FALSE@ -USE_RGB_BUILTIN_TRUE = @USE_RGB_BUILTIN_TRUE@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +X11APP_ARCHS = @X11APP_ARCHS@ +X11APP_FALSE = @X11APP_FALSE@ +X11APP_TRUE = @X11APP_TRUE@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XACE_FALSE = @XACE_FALSE@ @@ -411,18 +417,22 @@ XDMCP_LIBS = @XDMCP_LIBS@ XDMCP_TRUE = @XDMCP_TRUE@ XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ XEGL_FALSE = @XEGL_FALSE@ XEGL_LIBS = @XEGL_LIBS@ +XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEGL_TRUE = @XEGL_TRUE@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_FALSE = @XEPHYR_FALSE@ +XEPHYR_HAS_DRI_FALSE = @XEPHYR_HAS_DRI_FALSE@ +XEPHYR_HAS_DRI_TRUE = @XEPHYR_HAS_DRI_TRUE@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XEPHYR_TRUE = @XEPHYR_TRUE@ -XERRORDB_PATH = @XERRORDB_PATH@ XEVIE_FALSE = @XEVIE_FALSE@ XEVIE_TRUE = @XEVIE_TRUE@ XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ @@ -446,10 +456,12 @@ XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ XGLX_FALSE = @XGLX_FALSE@ XGLX_LIBS = @XGLX_LIBS@ +XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ XGLX_TRUE = @XGLX_TRUE@ XGL_FALSE = @XGL_FALSE@ XGL_LIBS = @XGL_LIBS@ XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XGL_SYS_LIBS = @XGL_SYS_LIBS@ XGL_TRUE = @XGL_TRUE@ XINERAMA_FALSE = @XINERAMA_FALSE@ XINERAMA_TRUE = @XINERAMA_TRUE@ @@ -463,19 +475,18 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XNEST_TRUE = @XNEST_TRUE@ XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_BUS_FREEBSDPCI_FALSE = @XORG_BUS_FREEBSDPCI_FALSE@ -XORG_BUS_FREEBSDPCI_TRUE = @XORG_BUS_FREEBSDPCI_TRUE@ +XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@ +XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@ XORG_BUS_IX86PCI_FALSE = @XORG_BUS_IX86PCI_FALSE@ XORG_BUS_IX86PCI_TRUE = @XORG_BUS_IX86PCI_TRUE@ XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@ XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@ -XORG_BUS_NETBSDPCI_FALSE = @XORG_BUS_NETBSDPCI_FALSE@ -XORG_BUS_NETBSDPCI_TRUE = @XORG_BUS_NETBSDPCI_TRUE@ XORG_BUS_PPCPCI_FALSE = @XORG_BUS_PPCPCI_FALSE@ XORG_BUS_PPCPCI_TRUE = @XORG_BUS_PPCPCI_TRUE@ XORG_BUS_SPARCPCI_FALSE = @XORG_BUS_SPARCPCI_FALSE@ @@ -483,7 +494,6 @@ XORG_BUS_SPARCPCI_TRUE = @XORG_BUS_SPARCPCI_TRUE@ XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@ XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@ XORG_CFLAGS = @XORG_CFLAGS@ -XORG_CORE_LIBS = @XORG_CORE_LIBS@ XORG_FALSE = @XORG_FALSE@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -493,23 +503,31 @@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ XORG_TRUE = @XORG_TRUE@ +XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ +XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ XPRINT_CFLAGS = @XPRINT_CFLAGS@ XPRINT_FALSE = @XPRINT_FALSE@ XPRINT_LIBS = @XPRINT_LIBS@ +XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ XPRINT_TRUE = @XPRINT_TRUE@ XP_USE_FREETYPE_FALSE = @XP_USE_FREETYPE_FALSE@ XP_USE_FREETYPE_TRUE = @XP_USE_FREETYPE_TRUE@ XQUARTZ_FALSE = @XQUARTZ_FALSE@ XQUARTZ_TRUE = @XQUARTZ_TRUE@ +XREGISTRY_FALSE = @XREGISTRY_FALSE@ +XREGISTRY_TRUE = @XREGISTRY_TRUE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDLSERVER_FALSE = @XSDLSERVER_FALSE@ XSDLSERVER_TRUE = @XSDLSERVER_TRUE@ XSDL_INCS = @XSDL_INCS@ XSDL_LIBS = @XSDL_LIBS@ +XSELINUX_FALSE = @XSELINUX_FALSE@ +XSELINUX_TRUE = @XSELINUX_TRUE@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ @@ -517,12 +535,14 @@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XTRAP_FALSE = @XTRAP_FALSE@ XTRAP_TRUE = @XTRAP_TRUE@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_FALSE = @XVFB_FALSE@ XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XVFB_TRUE = @XVFB_TRUE@ XVMC_FALSE = @XVMC_FALSE@ XVMC_TRUE = @XVMC_TRUE@ @@ -547,7 +567,7 @@ XWIN_PRIMARYFB_TRUE = @XWIN_PRIMARYFB_TRUE@ XWIN_RANDR_FALSE = @XWIN_RANDR_FALSE@ XWIN_RANDR_TRUE = @XWIN_RANDR_TRUE@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ XWIN_TRUE = @XWIN_TRUE@ XWIN_XV_FALSE = @XWIN_XV_FALSE@ XWIN_XV_TRUE = @XWIN_XV_TRUE@ @@ -555,6 +575,11 @@ X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@ X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@ YACC = @YACC@ __XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_font = @abi_font@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ @@ -597,6 +622,7 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ diff --git a/xserver/hw/xfree86/vbe/vbe.c b/xserver/hw/xfree86/vbe/vbe.c index 3ca985167..8af1727cc 100644 --- a/xserver/hw/xfree86/vbe/vbe.c +++ b/xserver/hw/xfree86/vbe/vbe.c @@ -1019,7 +1019,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) /* Input: AX := 4F0Bh VBE Get Pixel Clock - BL := 01h Get Pixel Clock + BL := 00h Get Pixel Clock ECX := pixel clock in units of Hz DX := mode number @@ -1030,7 +1030,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f0b; - pVbe->pInt10->bx = 0x01; + pVbe->pInt10->bx = 0x00; pVbe->pInt10->cx = clock; pVbe->pInt10->dx = mode; xf86ExecX86int10(pVbe->pInt10); @@ -1074,3 +1074,73 @@ VBEDPMSSet(vbeInfoPtr pVbe, int mode) return (R16(pVbe->pInt10->ax) == 0x4f); } +void +VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + DisplayModePtr mode; + const float PANEL_HZ = 60.0; + + if (!data) + return; + + xf86DrvMsg(scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n", + data->hsize, data->vsize); + + if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh) + return; + + mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0); + + pScrn->monitor->nHsync = 1; + pScrn->monitor->hsync[0].lo = 31.5; + pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal; + pScrn->monitor->nVrefresh = 1; + pScrn->monitor->vrefresh[0].lo = 56.0; + pScrn->monitor->vrefresh[0].hi = + (float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal; + + xfree(mode); +} + +struct vbePanelID * +VBEReadPanelID(vbeInfoPtr pVbe) +{ + int RealOff = pVbe->real_mode_base; + pointer page = pVbe->memory; + unsigned char *tmp = NULL; + int screen = pVbe->pInt10->scrnIndex; + + pVbe->pInt10->ax = 0x4F11; + pVbe->pInt10->bx = 0x01; + pVbe->pInt10->cx = 0; + pVbe->pInt10->dx = 0; + pVbe->pInt10->es = SEG_ADDR(RealOff); + pVbe->pInt10->di = SEG_OFF(RealOff); + pVbe->pInt10->num = 0x10; + + xf86ExecX86int10(pVbe->pInt10); + + if ((pVbe->pInt10->ax & 0xff) != 0x4f) { + xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID invalid\n"); + goto error; + } + + switch (pVbe->pInt10->ax & 0xff00) { + case 0x0: + xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read successfully\n"); + tmp = (unsigned char *)xnfalloc(32); + memcpy(tmp,page,32); + break; + case 0x100: + xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read failed\n"); + break; + default: + xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID unknown failure %i\n", + pVbe->pInt10->ax & 0xff00); + break; + } + +error: + return tmp; +} diff --git a/xserver/hw/xfree86/vbe/vbeModes.c b/xserver/hw/xfree86/vbe/vbeModes.c index ef2c728f4..fb730a708 100644 --- a/xserver/hw/xfree86/vbe/vbeModes.c +++ b/xserver/hw/xfree86/vbe/vbeModes.c @@ -127,10 +127,9 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id, { CARD16 major; VbeModeInfoBlock *mode; - DisplayModePtr pMode, p; + DisplayModePtr pMode; VbeModeInfoData *data; Bool modeOK = FALSE; - ModeStatus status = MODE_OK; major = (unsigned)(vbe->VESAVersion >> 8); @@ -152,34 +151,6 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id, xf86ErrorFVerb(DEBUG_VERB, "*"); } - /* - * Check if there's a valid monitor mode that this one can be matched - * up with. The actual matching is done later. - */ - if (modeOK) { - Bool sizeMatch = FALSE; - modeOK = FALSE; - for (p = pScrn->monitor->Modes; p != NULL; p = p->next) { - if ((p->HDisplay != mode->XResolution) || - (p->VDisplay != mode->YResolution) || - (p->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) - continue; - sizeMatch = TRUE; - /* XXX could support the various V_ flags */ - status = xf86CheckModeForMonitor(p, pScrn->monitor); - if (status == MODE_OK) { - modeOK = TRUE; - break; - } - } - if (sizeMatch && !modeOK) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Not using built-in mode \"%dx%d\" (%s)\n", - mode->XResolution, mode->YResolution, - xf86ModeStatusToString(status)); - } - } - xf86ErrorFVerb(DEBUG_VERB, "Mode: %x (%dx%d)\n", id, mode->XResolution, mode->YResolution); xf86ErrorFVerb(DEBUG_VERB, |