summaryrefslogtreecommitdiff
path: root/recipes/xorg-driver
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2009-05-22 22:14:04 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2009-05-24 19:09:42 -0300
commit16633cd9e9549175fb4682b35bff1f60ce268e98 (patch)
tree279bd6c95ea83e3048309733d4c2962a6ce475e6 /recipes/xorg-driver
parent415d39568034fd520a52681c00420aefa4939146 (diff)
xf86-video-geode: fix GPIO probing and RandR init
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes/xorg-driver')
-rw-r--r--recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch30
-rw-r--r--recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch56
-rw-r--r--recipes/xorg-driver/xf86-video-geode_2.11.2.bb5
3 files changed, 91 insertions, 0 deletions
diff --git a/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch b/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch
new file mode 100644
index 0000000000..af267ba269
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch
@@ -0,0 +1,30 @@
+From 1c70b4d2b70155558a9b5edb79a172696c16e129 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 22 May 2009 18:02:04 -0300
+Subject: [PATCH] probe GPIO device before asking for base_addr
+
+After finding the PCI ISA device it is required to ask for the
+resources to be read, before we use the base_addr for GPIO.
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ src/geode_ddc.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/geode_ddc.c b/src/geode_ddc.c
+index 2533488..086dbb1 100644
+--- a/src/geode_ddc.c
++++ b/src/geode_ddc.c
+@@ -72,6 +72,9 @@ geode_gpio_iobase(void)
+ if (pci == NULL)
+ return 0;
+
++ if (pci_device_probe(pci) != 0)
++ return 0;
++
+ /* The GPIO I/O address is in resource 1 */
+ return (unsigned short)pci->regions[1].base_addr;
+ #else
+--
+1.6.3.1.54.g99dd
+
diff --git a/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch b/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch
new file mode 100644
index 0000000000..7408473063
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch
@@ -0,0 +1,56 @@
+From 312b5ad7a3e1f92abaa113c3e72c8da5cb3e6cb0 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 22 May 2009 20:40:16 -0300
+Subject: [PATCH 2/2] [GX] fix RandR to properly use dixSetPrivate
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ src/gx_randr.c | 13 +++----------
+ 1 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/src/gx_randr.c b/src/gx_randr.c
+index 6cdd244..68e1dbd 100644
+--- a/src/gx_randr.c
++++ b/src/gx_randr.c
+@@ -57,18 +57,13 @@ typedef struct _GXRandRInfo
+
+ #define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
+
+-#if AMD_OLDPRIV
+-
+ static int GXRandRIndex;
+
++#if AMD_OLDPRIV
+ #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr)
+ #else
+-
+-static DevPrivateKey GXRandRKey;
+-
+ #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
+- dixLookupPrivate(&(p)->devPrivates, GXRandRKey));
+-
++ dixLookupPrivate(&(p)->devPrivates, GXRandRIndex));
+ #endif
+
+ static int
+@@ -333,8 +328,6 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
+ }
+ #if AMD_OLDPRIV
+ GXRandRIndex = AllocateScreenPrivateIndex();
+-#else
+- GXRandRKey = &GXRandRKey;
+ #endif
+
+ pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1);
+@@ -363,7 +356,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
+ #if AMD_OLDPRIV
+ pScreen->devPrivates[GXRandRIndex].ptr = pRandr;
+ #else
+- dixSetPrivate(&pScreen->devPrivates, GXRandRKey, pRandr);
++ dixSetPrivate(&pScreen->devPrivates, &GXRandRIndex, pRandr);
+ #endif
+ return TRUE;
+ }
+--
+1.6.3.1.54.g99dd
+
diff --git a/recipes/xorg-driver/xf86-video-geode_2.11.2.bb b/recipes/xorg-driver/xf86-video-geode_2.11.2.bb
index 380ce2ea0b..5f1cc3ad03 100644
--- a/recipes/xorg-driver/xf86-video-geode_2.11.2.bb
+++ b/recipes/xorg-driver/xf86-video-geode_2.11.2.bb
@@ -1,5 +1,10 @@
require xorg-driver-video.inc
PE = "1"
+PR = "r1"
COMPATIBLE_HOST = 'i.86.*-linux'
DESCRIPTION = "X.org server -- Geode GX2/LX display driver"
+
+SRC_URI += "file://0001-probe-GPIO-device-before-asking-for-base_addr.patch;patch=1 \
+ file://0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch;patch=1 \
+ "