From 579ad8903038f51d11bf0559e974d62b9ac8b6f0 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Dec 05 2006 01:44:26 +0000 Subject: - Update to 1.3.0 - vesa-1.2.1-validmode.patch: Implement a ValidMode driver hook, which rejects modes not present in the BIOS or outside the capability of the monitor. --- diff --git a/.cvsignore b/.cvsignore index 052a199..c980ef0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xf86-video-vesa-1.2.1.tar.bz2 +xf86-video-vesa-1.3.0.tar.bz2 diff --git a/sources b/sources index d3d1552..c023643 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -387c0e38ddeaacdb32f05069440a34c0 xf86-video-vesa-1.2.1.tar.bz2 +4a307852f3b4850e436a41dab2a73676 xf86-video-vesa-1.3.0.tar.bz2 diff --git a/vesa-1.2.1-validmode.patch b/vesa-1.2.1-validmode.patch new file mode 100644 index 0000000..98627e6 --- /dev/null +++ b/vesa-1.2.1-validmode.patch @@ -0,0 +1,71 @@ +--- xf86-video-vesa-1.2.1/src/vesa.c.validmode 2006-12-04 18:25:14.000000000 -0500 ++++ xf86-video-vesa-1.2.1/src/vesa.c 2006-12-04 19:46:21.000000000 -0500 +@@ -273,6 +273,60 @@ + xf86PrintChipsets(VESA_NAME, "driver for VESA chipsets", VESAChipsets); + } + ++static ModeStatus ++VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass) ++{ ++ static int warned = 0; ++ ScrnInfoPtr pScrn = xf86Screens[scrn]; ++ MonPtr mon = pScrn->monitor; ++ ModeStatus ret1, ret2; ++ DisplayModePtr lo, hi, drop; ++ ++ if (pass != MODECHECK_FINAL) { ++ if (!warned) { ++ xf86DrvMsg(scrn, X_WARNING, "VESAValidMode called unexpectedly\n"); ++ warned = 1; ++ } ++ return MODE_OK; ++ } ++ ++ /* ++ * This is suboptimal. We pass in just the barest description of a mode ++ * we can get away with to VBEValidateModes, so it can't really throw ++ * out anything we give it. But we need to filter the list so that we ++ * don't populate the mode list with things the monitor can't do. ++ * ++ * So first off, if this isn't a mode we handed to the server (ie, ++ * M_T_BUILTIN), then we know we can't do it. ++ */ ++ ++ if (!(p->type & M_T_BUILTIN)) ++ return MODE_NOMODE; ++ ++ /* ++ * Next, synthesize fully-loaded modes corresponding to the maximal and ++ * minimal refresh rates. If they both fail, then pass the failure code ++ * up (possibly bogus, but oh well). ++ */ ++ ++ lo = xf86CVTMode(p->HDisplay, p->VDisplay, mon->vrefresh[0].lo, 0, 0); ++ hi = xf86CVTMode(p->HDisplay, p->VDisplay, mon->vrefresh[0].hi, 0, 0); ++ ret1 = xf86CheckModeForMonitor(lo, mon); ++ ret2 = xf86CheckModeForMonitor(hi, mon); ++ xfree(lo); ++ xfree(hi); ++ ++ if (ret1 && ret2) { ++ if (ret1 == ret2) ++ return ret1; ++ else return MODE_BAD; ++ } ++ ++ /* Hooray, we think we can do it */ ++ ++ return MODE_OK; ++} ++ + /* + * This function is called once, at the start of the first server generation to + * do a minimal probe for supported hardware. +@@ -318,6 +372,7 @@ + pScrn->PreInit = VESAPreInit; + pScrn->ScreenInit = VESAScreenInit; + pScrn->SwitchMode = VESASwitchMode; ++ pScrn->ValidMode = VESAValidMode; + pScrn->AdjustFrame = VESAAdjustFrame; + pScrn->EnterVT = VESAEnterVT; + pScrn->LeaveVT = VESALeaveVT; diff --git a/xorg-x11-drv-vesa.spec b/xorg-x11-drv-vesa.spec index 1ff4ea0..a96d5fc 100644 --- a/xorg-x11-drv-vesa.spec +++ b/xorg-x11-drv-vesa.spec @@ -6,8 +6,8 @@ Summary: Xorg X11 vesa video driver Name: xorg-x11-drv-vesa -Version: 1.2.1 -Release: 4 +Version: 1.3.0 +Release: 1%{?dist} URL: http://www.x.org Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 License: MIT/X11 @@ -17,7 +17,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 alpha sparc sparc64 Patch0: vesa-1.2.1-randr-crash.patch -Patch1: vesa-1.2.1-fix-shadowfb.patch +Patch1: vesa-1.2.1-validmode.patch BuildRequires: pkgconfig BuildRequires: xorg-x11-server-sdk >= 1.1.0-1 @@ -58,6 +58,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/vesa.4* %changelog +* Mon Dec 4 2006 Adam Jackson 1.3.0-1 +- Update to 1.3.0 +- vesa-1.2.1-validmode.patch: Implement a ValidMode driver hook, which rejects + modes not present in the BIOS or outside the capability of the monitor. + * Sun Oct 01 2006 Jesse Keating - 1.2.1-4 - rebuilt for unwind info generation, broken in gcc-4.1.1-21