rpms/xorg-x11-drv-amd/F-8 amd-wide-mode.patches, NONE, 1.1 xorg-x11-drv-amd.spec, 1.16, 1.17

Warren Togami 砥上勇 (wtogami) fedora-extras-commits at redhat.com
Sun Mar 2 19:04:49 UTC 2008


Author: wtogami

Update of /cvs/pkgs/rpms/xorg-x11-drv-amd/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv790

Modified Files:
	xorg-x11-drv-amd.spec 
Added Files:
	amd-wide-mode.patches 
Log Message:
Bart Trojanowski's widemode patch



--- NEW FILE amd-wide-mode.patches ---
>From 62076bb36c7e3d521c7e5b21f79b50571ef45201 Mon Sep 17 00:00:00 2001
From: Bart Trojanowski <bart at jukie.net>
Date: Wed, 13 Feb 2008 10:43:26 -0500
Subject: [PATCH] ddc patch from Jordan

---
 src/amd_gx_driver.c |    9 +++++----
 src/amd_lx_driver.c |   21 +++++++++++++++------
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 177b111..ead492f 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -783,7 +783,9 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
 
   /* Only use the panel mode for built in modes */
 
-  if ((pMode->type && pMode->type != M_T_USERDEF) && pGeode->Panel) {
+ if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)
+	&& pGeode->Panel) {
+
     GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY,
 			  pMode->CrtcHDisplay, pMode->CrtcVDisplay,
 			  pScrni->bitsPerPixel));
@@ -1390,10 +1392,9 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
   GeodeRec *pGeode = GEODEPTR(pScrni);
   int p, ret;
 
-  /* Not sure if this is an X bug or not - but on my current build,
-   * user defined modes pass a type of 0 */
+  /* Use the durango lookup for builtin or default modes only */
 
-  if (pMode->type && pMode->type != M_T_USERDEF) {
+  if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) {
 
     if (pGeode->Panel) {
       if (pMode->CrtcHDisplay > pGeode->PanelX ||
diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index 9abbd5f..c779ac1 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -845,9 +845,10 @@ LXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
     lx_disable_dac_power(pScrni, DF_CRT_DISABLE);
     vg_set_compression_enable(0);
 
-    if (!pMode->type || pMode->type == M_T_USERDEF) 
-      lx_set_custom_mode(pGeode, pMode, pScrni->bitsPerPixel);
-    else {
+    /* If the mode is a default one, then set the mode with the Cimarron
+     * tables */
+
+    if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) {
       if (pMode->Flags & V_NHSYNC)
 	flags |= VG_MODEFLAG_NEG_HSYNC;
       if (pMode->Flags & V_NVSYNC)
@@ -878,8 +879,14 @@ LXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
 			    pScrni->bitsPerPixel, GeodeGetRefreshRate(pMode), 
 			    0);
       }
-    } 
-   
+    }
+    else {
+	/* For anything other then a default mode - use the passed in
+	 * timings */
+
+	lx_set_custom_mode(pGeode, pMode, pScrni->bitsPerPixel);
+    }
+
     if (pGeode->Output & OUTPUT_PANEL)
       df_set_output_path((pGeode->Output & OUTPUT_CRT) ? DF_DISPLAY_CRT_FP : DF_DISPLAY_FP);
     else
@@ -1386,7 +1393,9 @@ LXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
 
     memset(&vgQueryMode, 0, sizeof(vgQueryMode));
 
-    if (pMode->type && pMode->type != M_T_USERDEF) {
+    /* For builtin and default modes, try to look up the mode in Cimarron */
+
+    if ((pMode->type & M_T_BUILTIN) || (pMode->type && M_T_DEFAULT)) {
       
       if (pGeode->Output & OUTPUT_PANEL) {
 
-- 
1.5.3.8


>From 17d1a6a83aab541a5d627ceee526b1d89c0929c0 Mon Sep 17 00:00:00 2001
From: Bart Trojanowski <bart at jukie.net>
Date: Sat, 1 Mar 2008 11:38:57 -0500
Subject: [PATCH] fix logic bug in LXValidMode()

---
 src/amd_lx_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index c779ac1..f125995 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -1395,7 +1395,7 @@ LXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags)
 
     /* For builtin and default modes, try to look up the mode in Cimarron */
 
-    if ((pMode->type & M_T_BUILTIN) || (pMode->type && M_T_DEFAULT)) {
+    if ((pMode->type & M_T_BUILTIN) || (pMode->type & M_T_DEFAULT)) {
       
       if (pGeode->Output & OUTPUT_PANEL) {
 
-- 
1.5.3.8



Index: xorg-x11-drv-amd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-amd/F-8/xorg-x11-drv-amd.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- xorg-x11-drv-amd.spec	15 Feb 2008 16:58:37 -0000	1.16
+++ xorg-x11-drv-amd.spec	2 Mar 2008 19:04:14 -0000	1.17
@@ -7,7 +7,7 @@
 Summary:   Xorg X11 AMD Geode video driver
 Name:      xorg-x11-drv-amd
 Version:   2.7.7.6
-Release:   1%{?dist}
+Release:   2%{?dist}
 #Release:   0.1.%{gitdate}%{?dist}
 URL:       http://www.x.org/wiki/AMDGeodeDriver
 # Upstream GIT
@@ -15,11 +15,12 @@
 # Upstream Tarballs
 # http://xorg.freedesktop.org/releases/individual/driver/
 Source0:    http://xorg.freedesktop.org/releases/individual/driver/xf86-video-amd-%{version}.tar.bz2
+Patch0:     amd-wide-mode.patches
 License:   MIT/X11
 Group:     User Interface/X Hardware Support
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-ExclusiveArch: %{ix86} 
+ExclusiveArch: %{ix86}
 
 BuildRequires: pkgconfig
 BuildRequires: autoconf
@@ -44,6 +45,7 @@
 
 %prep
 %setup -q -n %{tarball}-%{version}
+%patch0 -p1
 
 # remind myself to do snapshots properly
 if [ -e %{tarball}/.git ] ; then
@@ -77,6 +79,9 @@
 %{driverdir}/ztv_drv.so
 
 %changelog
+* Sun Mar 02 2008 Warren Togami <wtogami at redhat.com> 2.7.7.6-2
+- Bart Trojanowski's widemode patch
+
 * Fri Feb 15 2008 Warren Togami <wtogami at redhat.com> 2.7.7.6-1
 - update to 2.7.7.6 and remove all patches
 - Jordan Crouse (AMD) says to OLPC:




More information about the fedora-extras-commits mailing list