rpms/xorg-x11-drv-vesa/devel vesa-1.9-mode-heuristics.patch, NONE, 1.1 vesa-1.9-no-legacy-fb.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 sources, 1.10, 1.11 xorg-x11-drv-vesa.spec, 1.28, 1.29 vesa-1.2.1-fix-shadowfb.patch, 1.1, NONE vesa-1.2.1-randr-crash.patch, 1.1, NONE vesa-1.2.1-validmode.patch, 1.2, NONE vesa-1.3.0-mode-heuristics.patch, 1.2, NONE

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Tue Nov 13 23:33:18 UTC 2007


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-drv-vesa/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20085/devel

Modified Files:
	.cvsignore sources xorg-x11-drv-vesa.spec 
Added Files:
	vesa-1.9-mode-heuristics.patch vesa-1.9-no-legacy-fb.patch 
Removed Files:
	vesa-1.2.1-fix-shadowfb.patch vesa-1.2.1-randr-crash.patch 
	vesa-1.2.1-validmode.patch vesa-1.3.0-mode-heuristics.patch 
Log Message:
Update to git snapshot, remove legacy fb


vesa-1.9-mode-heuristics.patch:

--- NEW FILE vesa-1.9-mode-heuristics.patch ---
diff -up xf86-video-vesa-20071113/src/vesa.c.mode-heuristics xf86-video-vesa-20071113/src/vesa.c
--- xf86-video-vesa-20071113/src/vesa.c.mode-heuristics	2007-11-13 18:02:17.000000000 -0500
+++ xf86-video-vesa-20071113/src/vesa.c	2007-11-13 18:27:47.000000000 -0500
@@ -296,6 +296,88 @@ VESAIdentify(int flags)
     xf86PrintChipsets(VESA_NAME, "driver for VESA chipsets", VESAChipsets);
 }
 
+static VESAPtr
+VESAGetRec(ScrnInfoPtr pScrn)
+{
+    if (!pScrn->driverPrivate)
+	pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1);
+
+    return ((VESAPtr)pScrn->driverPrivate);
+}
+
+static ModeStatus
+VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass)
+{
+    static int warned = 0;
+    int found = 0;
+    ScrnInfoPtr pScrn = xf86Screens[scrn];
+    VESAPtr pVesa = VESAGetRec(pScrn);
+    MonPtr mon = pScrn->monitor, vesamon = pVesa->monitor;
+    ModeStatus ret;
+    DisplayModePtr mode;
+    float v;
+
+    pVesa = VESAGetRec(pScrn);
+
+    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, walk through the mode list from DDC (if any) and look for a
+     * matching resolution.  Only do this on the first try though; on the
+     * second VBEValidateModes, let things through if they fit at all.
+     */
+    if (pVesa->strict_validation) {
+	if (pScrn->monitor->DDC) {
+	    for (mode = pScrn->monitor->Modes; mode; mode = mode->next) {
+		if (mode->type & M_T_DRIVER && 
+			mode->HDisplay == p->HDisplay &&
+			mode->VDisplay == p->VDisplay) {
+		    found = 1;
+		    break;
+		}
+		if (mode == pScrn->monitor->Last)
+		    break;
+	    }
+	    if (!found)
+		return MODE_NOMODE;
+	}
+    }
+
+    /*
+     * Finally, walk through the vsync rates 1Hz at a time looking for a mode
+     * that will fit.  This is assuredly a terrible way to do this, but
+     * there's no obvious method for computing a mode of a given size that
+     * will pass xf86CheckModeForMonitor.
+     */
+    for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) {
+	mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0);
+	ret = xf86CheckModeForMonitor(mode, mon);
+	xfree(mode);
+	if (ret == MODE_OK)
+	    break;
+    }
+
+    return ret;
+}
+
 /*
  * This function is called once, at the start of the first server generation to
  * do a minimal probe for supported hardware.
@@ -373,6 +455,7 @@ VESAProbe(DriverPtr drv, int flags)
 			pScrn->PreInit       = VESAPreInit;
 			pScrn->ScreenInit    = VESAScreenInit;
 			pScrn->SwitchMode    = VESASwitchMode;
+			pScrn->ValidMode     = VESAValidMode;
 			pScrn->AdjustFrame   = VESAAdjustFrame;
 			pScrn->EnterVT       = VESAEnterVT;
 			pScrn->LeaveVT       = VESALeaveVT;
@@ -447,15 +530,6 @@ VESAFindIsaDevice(GDevPtr dev)
     return (int)CHIP_VESA_GENERIC;
 }
 
-static VESAPtr
-VESAGetRec(ScrnInfoPtr pScrn)
-{
-    if (!pScrn->driverPrivate)
-	pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1);
-
-    return ((VESAPtr)pScrn->driverPrivate);
-}
-
 static void
 VESAFreeRec(ScrnInfoPtr pScrn)
 {
@@ -650,6 +724,7 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags
 
     VBESetModeNames(pScrn->modePool);
 
+    pVesa->strict_validation = TRUE;
     i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, 
 			  NULL, NULL, 0, 2048, 1, 0, 2048,
 			  pScrn->display->virtualX,
@@ -657,6 +732,20 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags
 			  pVesa->mapSize, LOOKUP_BEST_REFRESH);
 
     if (i <= 0) {
+	DisplayModePtr mode;
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		"No valid modes left.  Trying less strict filter...\n");
+	for (mode = pScrn->monitor->Modes; mode; mode = mode->next)
+	    mode->status = MODE_OK;
+	pVesa->strict_validation = FALSE;
+	i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, 
+		NULL, NULL, 0, 2048, 1, 0, 2048,
+		pScrn->display->virtualX,
+		pScrn->display->virtualY,
+		pVesa->mapSize, LOOKUP_BEST_REFRESH);
+    }
+
+    if (i <= 0) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes\n");
         vbeFree(pVesa->pVbe);
 	return (FALSE);
diff -up xf86-video-vesa-20071113/src/vesa.h.mode-heuristics xf86-video-vesa-20071113/src/vesa.h
--- xf86-video-vesa-20071113/src/vesa.h.mode-heuristics	2007-11-13 18:02:17.000000000 -0500
+++ xf86-video-vesa-20071113/src/vesa.h	2007-11-13 18:28:23.000000000 -0500
@@ -116,7 +116,7 @@ typedef struct _VESARec
     CARD32 *pal, *savedPal;
     CARD8 *fonts;
     xf86MonPtr monitor;
-    Bool shadowFB;
+    Bool shadowFB, strict_validation;
     CARD32 windowAoffset;
     /* Don't override the default refresh rate. */
     Bool defaultRefresh;

vesa-1.9-no-legacy-fb.patch:

--- NEW FILE vesa-1.9-no-legacy-fb.patch ---
>From a1fbfb880dc51c81bf5dadd20aa9a166e59e4269 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Tue, 13 Nov 2007 18:25:28 -0500
Subject: [PATCH] Nuke legacy fb support.

---
 src/vesa.c |   48 ++----------------------------------------------
 src/vesa.h |    8 --------
 2 files changed, 2 insertions(+), 54 deletions(-)

diff --git a/src/vesa.c b/src/vesa.c
index e4e6547..0079cd0 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -181,16 +181,6 @@ static const OptionInfoRec VESAOptions[] = {
  * xf86LoaderReqSymLists().  The purpose is this is to avoid warnings about
  * unresolved symbols that are not required.
  */
-#ifdef XFree86LOADER
-static const char *miscfbSymbols[] = {
-    "xf1bppScreenInit",
-    "xf4bppScreenInit",
-#ifdef USE_AFB
-    "afbScreenInit",
-#endif
-    NULL
-};
-#endif
 
 static const char *fbSymbols[] = {
     "fbPictureInit",
@@ -268,8 +258,7 @@ vesaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
     {
 	Initialised = TRUE;
 	xf86AddDriver(&VESA, Module, 1);
-	LoaderRefSymLists(miscfbSymbols,
-			  fbSymbols,
+	LoaderRefSymLists(fbSymbols,
 			  shadowSymbols,
 			  vbeSymbols,
 			  ddcSymbols,
@@ -729,23 +718,9 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
 	    }
 	    else {
 		switch (pScrn->bitsPerPixel) {
-		    case 1:
-			mod = "xf1bpp";
-			reqSym = "xf1bppScreenInit";
-			break;
-		    case 4:
-			mod = "xf4bpp";
-			reqSym = "xf4bppScreenInit";
-			break;
 		    default:
-#ifdef USE_AFB
-			mod = "afb";
-			reqSym = "afbScreenInit";
-			break;
-#else
 			xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 
 				   "Unsupported bpp: %d", pScrn->bitsPerPixel);
-#endif
 		}
 	    }
 	    break;
@@ -921,28 +896,9 @@ VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	    return (FALSE);
 	case 0x3:	/* Planar */
 		switch (pScrn->bitsPerPixel) {
-		    case 1:
-			if (!xf1bppScreenInit(pScreen, pVesa->base,
-					      pScrn->virtualX, pScrn->virtualY,
-					      pScrn->xDpi, pScrn->yDpi,
-					      pScrn->displayWidth))
-			    return (FALSE);
-			break;
-		    case 4:
-			if (!xf4bppScreenInit(pScreen, pVesa->base,
-					      pScrn->virtualX, pScrn->virtualY,
-					      pScrn->xDpi, pScrn->yDpi,
-					      pScrn->displayWidth))
-			    return (FALSE);
-			break;
 		    default:
-#ifdef USE_AFB
-			if (!afbScreenInit(pScreen, pVesa->base,
-					   pScrn->virtualX, pScrn->virtualY,
-					   pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth))
-#endif
 			    return (FALSE);
-			break;
+			    break;
 		}
 	    break;
 	case 0x4:	/* Packed pixel */
diff --git a/src/vesa.h b/src/vesa.h
index 0705d76..6c5b8c0 100644
--- a/src/vesa.h
+++ b/src/vesa.h
@@ -69,16 +69,8 @@
 #include "xf86Resources.h"
 #include "xf86RAC.h"
 
-#include "xf1bpp.h"
-#include "xf4bpp.h"
 #include "fb.h"
 
-#ifdef USE_AFB
-#include "afb.h"
-#endif
-
-#include "mfb.h"
-
 #ifdef XSERVER_LIBPCIACCESS
 #include <pciaccess.h>
 #endif
-- 
1.5.3.4



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-vesa/devel/.cvsignore,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- .cvsignore	5 Dec 2006 01:44:26 -0000	1.10
+++ .cvsignore	13 Nov 2007 23:31:57 -0000	1.11
@@ -1 +1 @@
-xf86-video-vesa-1.3.0.tar.bz2
+xf86-video-vesa-20071113.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-vesa/devel/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	5 Dec 2006 01:44:26 -0000	1.10
+++ sources	13 Nov 2007 23:31:57 -0000	1.11
@@ -1 +1 @@
-4a307852f3b4850e436a41dab2a73676  xf86-video-vesa-1.3.0.tar.bz2
+67b0db9408cdcb1a70111a567eaca701  xf86-video-vesa-20071113.tar.bz2


Index: xorg-x11-drv-vesa.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-vesa/devel/xorg-x11-drv-vesa.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- xorg-x11-drv-vesa.spec	23 Aug 2007 18:43:02 -0000	1.28
+++ xorg-x11-drv-vesa.spec	13 Nov 2007 23:31:57 -0000	1.29
@@ -2,37 +2,41 @@
 %define moduledir %(pkg-config xorg-server --variable=moduledir )
 %define driverdir	%{moduledir}/drivers
 
+%define gitdate 20071113
+
 Summary:   Xorg X11 vesa video driver
 Name:      xorg-x11-drv-vesa
 Version:   1.3.0
-Release:   10%{?dist}
+Release:   11.%{gitdate}%{?dist}
 URL:       http://www.x.org
-Source0:   http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2
+Source0:   http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{gitdate}.tar.bz2
 License: MIT
 Group:     User Interface/X Hardware Support
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 ExcludeArch: s390 s390x
 
-Patch0:	    vesa-1.2.1-randr-crash.patch
-Patch1:     vesa-1.3.0-mode-heuristics.patch
+Patch1:     vesa-1.9-mode-heuristics.patch
 Patch2:	    vesa-1.3.0-range-hack.patch
+Patch3:     vesa-1.9-no-legacy-fb.patch
 
-BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6
+BuildRequires: xorg-x11-server-sdk >= 1.4.99.1
+BuildRequires: autoconf automake libtool
 
-Requires:  xorg-x11-server-Xorg >= 1.3.0.0-6
+Requires:  xorg-x11-server-Xorg >= 1.4.99.1
 
 %description 
 X.Org X11 vesa video driver.
 
 %prep
-%setup -q -n %{tarball}-%{version}
+%setup -q -n %{tarball}-%{gitdate}
 
-%patch0 -p1 -b .randr-crash
 %patch1 -p1 -b .mode-heuristics
 %patch2 -p1 -b .range-hack
+%patch3 -p1 -b .legacy
 
 %build
+autoreconf -v --install || exit 1
 %configure --disable-static
 make
 
@@ -54,6 +58,10 @@
 %{_mandir}/man4/vesa.4*
 
 %changelog
+* Tue Nov 13 2007 Adam Jackson <ajax at redhat.com> 1.3.0-11.20071113
+- Update to git snapshot for pciaccess goodness.
+- Rip out legacy framebuffer support.
+
 * Thu Aug 23 2007 Adam Jackson <ajax at redhat.com> - 1.3.0-10
 - Rebuild for ppc toolchain bug
 


--- vesa-1.2.1-fix-shadowfb.patch DELETED ---


--- vesa-1.2.1-randr-crash.patch DELETED ---


--- vesa-1.2.1-validmode.patch DELETED ---


--- vesa-1.3.0-mode-heuristics.patch DELETED ---




More information about the fedora-extras-commits mailing list