rpms/xorg-x11-drv-geode/F-9 dcon.patch, NONE, 1.1 fix-memory-mapping.patch, NONE, 1.1 xorg-x11-drv-geode.spec, 1.3, 1.4
Dennis Gilmore (ausil)
fedora-extras-commits at redhat.com
Tue May 20 17:59:57 UTC 2008
- Previous message (by thread): rpms/frysk/F-9 .cvsignore, 1.53, 1.54 frysk.spec, 1.132, 1.133 sources, 1.53, 1.54 frysk-0.0.1.2008.02.29.rh1-asm-includes.patch, 1.1, NONE frysk-0.0.1.2008.02.29.rh1-jboolean-array.patch, 1.1, NONE frysk-0.0.1.2008.03.19.rh1-fparser8.patch, 1.3, NONE frysk-0.2.1-ppc-build.patch, 1.1, NONE
- Next message (by thread): rpms/libpciaccess/F-9 libpciaccess-no-pci-fix.patch, NONE, 1.1 libpciaccess.spec, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ausil
Update of /cvs/pkgs/rpms/xorg-x11-drv-geode/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4614
Modified Files:
xorg-x11-drv-geode.spec
Added Files:
dcon.patch fix-memory-mapping.patch
Log Message:
apply patches for olpc
dcon.patch:
--- NEW FILE dcon.patch ---
geode: Bring over the DCON detection code from the OLPC tree
From: Jordan Crouse <jordan.crouse at amd.com>
---
src/geode.h | 1 +
src/geode_dcon.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
src/lx_driver.c | 36 +++++++++++++++++++++++-------------
3 files changed, 70 insertions(+), 14 deletions(-)
diff --git a/src/geode.h b/src/geode.h
index 2490315..2c2ce89 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -234,6 +234,7 @@ VESARec;
#define OUTPUT_CRT 0x02
#define OUTPUT_TV 0x04
#define OUTPUT_VOP 0x08
+#define OUTPUT_DCON 0x10
typedef struct _geodeRec
{
diff --git a/src/geode_dcon.c b/src/geode_dcon.c
index 27cad18..fc887f7 100644
--- a/src/geode_dcon.c
+++ b/src/geode_dcon.c
@@ -35,11 +35,56 @@
#include "geode.h"
#include <unistd.h>
+#include <fcntl.h>
+
+#define DCON_SLEEP_FILE "/sys/devices/platform/dcon/sleep"
static Bool
dcon_present(void)
{
- return access("/sys/devices/platform/dcon", F_OK) == 0;
+ static int _dval = -1;
+
+ if (_dval == -1)
+ _dval = (access("/sys/devices/platform/dcon", F_OK) == 0);
+
+ return (Bool) _dval;
+}
+
+int
+DCONDPMSSet(ScrnInfoPtr pScrni, int mode, int flags)
+{
+ static int failed = -1;
+ int fd;
+ char value[1];
+
+ if (failed == -1)
+ failed = !dcon_present();
+
+ if (failed)
+ return 0;
+
+ fd = open(DCON_SLEEP_FILE, O_WRONLY);
+
+ if (fd < 0) {
+ failed = 1;
+ return 0;
+ }
+
+ switch (mode) {
+ case DPMSModeOn:
+ value[0] = '0';
+ break;
+ case DPMSModeStandby:
+ case DPMSModeSuspend:
+ case DPMSModeOff:
+ value[0] = '1';
+ break;
+ }
+
+ write(fd, value, sizeof(value));
+ close(fd);
+
+ return 1;
}
Bool
diff --git a/src/lx_driver.c b/src/lx_driver.c
index d44fb94..e8477db 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -525,7 +525,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
OptionInfoRec *GeodeOptions = &LX_GeodeOptions[0];
rgb defaultWeight = { 0, 0, 0 };
int modecnt;
- char *s, *panelgeo = NULL;
+ char *s;
if (pScrni->numEntities != 1)
return FALSE;
@@ -636,7 +636,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
&pGeode->tryHWCursor);
if (!xf86GetOptValInteger(GeodeOptions, LX_OPTION_FBSIZE,
- (int *) &(pGeode->FBAvail)))
+ (int *)&(pGeode->FBAvail)))
pGeode->FBAvail = 0;
/* For compatability - allow SWCursor too */
@@ -666,7 +666,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
}
xf86GetOptValInteger(GeodeOptions, LX_OPTION_EXA_SCRATCH_BFRSZ,
- (int *) &(pGeode->exaBfrSz));
+ (int *)&(pGeode->exaBfrSz));
if (pGeode->exaBfrSz <= 0)
pGeode->exaBfrSz = 0;
@@ -676,23 +676,23 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->Output &= ~OUTPUT_PANEL;
}
- panelgeo = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_GEOMETRY);
-
- /* Get the panel information - if it is specified on the command line,
- * then go with that - otherwise try to determine it by probing the
- * BIOS - the BIOS may tell us that the panel doesn't exist, so the
- * value of the output bitmask may change
+ /* Panel detection code -
+ * 1. See if an OLPC DCON is attached - we can make some assumptions
+ * about the panel if so.
+ * 2. Use override options specified in the config
+ * 3. "Autodetect" the panel through VSA
*/
if (dcon_init(pScrni)) {
- pGeode->Output = OUTPUT_PANEL;
+ pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON;
} else if (pGeode->Output & OUTPUT_PANEL) {
+ char *panelgeo =
+ xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_GEOMETRY);
+
if (panelgeo != NULL)
GeodeGetFPGeometry(panelgeo, &pGeode->PanelX, &pGeode->PanelY);
else {
- Bool ret = lx_get_panel(&pGeode->PanelX, &pGeode->PanelY);
-
- if (ret == FALSE)
+ if (!lx_get_panel(&pGeode->PanelX, &pGeode->PanelY))
pGeode->Output &= ~OUTPUT_PANEL;
}
}
@@ -704,6 +704,9 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " PANEL: %s\n",
pGeode->Output & OUTPUT_PANEL ? "YES" : "NO");
+ xf86DrvMsg(pScrni->scrnIndex, X_INFO, " DCON: %s\n",
+ pGeode->Output & OUTPUT_DCON ? "YES" : "NO");
+
xf86DrvMsg(pScrni->scrnIndex, X_INFO, " VGA: %s\n",
pGeode->useVGA ? "YES" : "NO");
@@ -1204,9 +1207,16 @@ LXLoadPalette(ScrnInfoPtr pScrni,
static void
LXDPMSSet(ScrnInfoPtr pScrni, int mode, int flags)
{
+ GeodeRec *pGeode = GEODEPTR(pScrni);
+
if (!pScrni->vtSema)
return;
+ if (pGeode->Output & OUTPUT_DCON) {
+ if (DCONDPMSSet(pScrni, mode, flags))
+ return;
+ }
+
switch (mode) {
case DPMSModeOn:
lx_enable_dac_power(pScrni, 1);
fix-memory-mapping.patch:
--- NEW FILE fix-memory-mapping.patch ---
geode: Unmap the PCI memory when we close the screen
From: Jordan Crouse <jordan.crouse at amd.com>
---
src/lx_driver.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/lx_driver.c b/src/lx_driver.c
index 48aff44..d44fb94 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -418,6 +418,13 @@ map_pci_mem(ScrnInfoPtr pScrni, int vram,
return NULL;
return ptr;
}
+
+static inline int
+unmap_pci_mem(ScrnInfoPtr pScrni, struct pci_device *dev, void *ptr, int size)
+{
+ return pci_device_unmap_range(dev, ptr, size);
+}
+
#endif
static Bool
@@ -848,15 +855,23 @@ static Bool
LXUnmapMem(ScrnInfoPtr pScrni)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
+ pciVideoPtr pci = xf86GetPciInfoForEntity(pGeode->pEnt->index);
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_gp_ptr, LX_GP_REG_SIZE);
xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vg_ptr, LX_VG_REG_SIZE);
xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vid_ptr,
LX_VID_REG_SIZE);
xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vip_ptr,
LX_VIP_REG_SIZE);
+#else
+ unmap_pci_mem(pScrni, pci, cim_gp_ptr, LX_GP_REG_SIZE);
+ unmap_pci_mem(pScrni, pci, cim_vg_ptr, LX_VG_REG_SIZE);
+ unmap_pci_mem(pScrni, pci, cim_vid_ptr, LX_VID_REG_SIZE);
+ unmap_pci_mem(pScrni, pci, cim_vip_ptr, LX_VIP_REG_SIZE);
+ unmap_pci_mem(pScrni, pci, cim_fb_ptr, pGeode->FBAvail + CIM_CMD_BFR_SZ);
+#endif
- xf86UnMapVidMem(pScrni->scrnIndex, cim_fb_ptr, pGeode->FBAvail);
xf86UnMapVidMem(pScrni->scrnIndex, XpressROMPtr, 0x10000);
return TRUE;
Index: xorg-x11-drv-geode.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-geode/F-9/xorg-x11-drv-geode.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xorg-x11-drv-geode.spec 8 May 2008 20:53:55 -0000 1.3
+++ xorg-x11-drv-geode.spec 20 May 2008 17:59:16 -0000 1.4
@@ -5,9 +5,11 @@
Summary: Xorg X11 AMD Geode video driver
Name: xorg-x11-drv-geode
Version: 2.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.x.org/wiki/AMDGeodeDriver
Source0: http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-%{version}.tar.bz2
+Patch0: http://dev.laptop.org/~jcrouse/fix-memory-mapping.patch
+Patch1: http://dev.laptop.org/~jcrouse/dcon.patch
License: MIT
Group: User Interface/X Hardware Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -32,6 +34,8 @@
%prep
%setup -q -n %{tarball}-%{version}
+%patch0 -p1
+%patch1 -p1
%build
%configure --disable-static --libdir=%{_libdir} --mandir=%{_mandir} \
@@ -60,6 +64,9 @@
%{driverdir}/ztv_drv.so
%changelog
+* Tue May 20 2008 Dennis Gilmore <dennis at ausil.us> 2.9.0-2
+- apply patches for olpc
+
* Thu May 08 2008 Dennis Gilmore <dennis at ausil.us> 2.9.0-1
- update to 2.9.0
- adds olpc support for everything but DPMS
- Previous message (by thread): rpms/frysk/F-9 .cvsignore, 1.53, 1.54 frysk.spec, 1.132, 1.133 sources, 1.53, 1.54 frysk-0.0.1.2008.02.29.rh1-asm-includes.patch, 1.1, NONE frysk-0.0.1.2008.02.29.rh1-jboolean-array.patch, 1.1, NONE frysk-0.0.1.2008.03.19.rh1-fparser8.patch, 1.3, NONE frysk-0.2.1-ppc-build.patch, 1.1, NONE
- Next message (by thread): rpms/libpciaccess/F-9 libpciaccess-no-pci-fix.patch, NONE, 1.1 libpciaccess.spec, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list