summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellström <thomas@shipmail.org>2009-01-20 17:08:59 +0000
committerThomas Hellström <thomas@shipmail.org>2009-01-20 17:08:59 +0000
commit94802c2b0d1e364d98a06e56d659508379301b4a (patch)
treeea33f5e9e4a4afaf03220ceffa8b09e24ec36434
parentf279620d3ffa5da16c552a8bced0d8be27a7eb4b (diff)
Change the dri driver to openchrome and fix some dri
libpciaccess stuff.
-rw-r--r--src/via_dri.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/via_dri.c b/src/via_dri.c
index e528e2a..884eb8b 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -65,8 +65,8 @@ typedef struct
} ViaDRMVersion;
static char VIAKernelDriverName[] = "openchrome";
-static char VIAClientDriverName[] = "unichrome";
-static const ViaDRMVersion drmExpected = { 0, 0, 0 };
+static char VIAClientDriverName[] = "openchrome";
+static const ViaDRMVersion drmExpected = { 0, 1, 0 };
static const ViaDRMVersion drmCompat = { 0, 0, 0 };
static Bool VIAInitVisualConfigs(ScreenPtr pScreen);
@@ -274,12 +274,22 @@ VIADRIScreenInit(ScreenPtr pScreen)
pDRIInfo->ddxDriverMinorVersion = VIA_DRIDDX_VERSION_MINOR;
pDRIInfo->ddxDriverPatchVersion = VIA_DRIDDX_VERSION_PATCH;
#if (DRIINFO_MAJOR_VERSION == 5)
+#ifdef XSERVER_LIBPCIACCESS
+ pDRIInfo->frameBufferPhysicalAddress = (pointer)
+ (unsigned long) pVia->PciInfo->regions[0].base_addr;
+#else
pDRIInfo->frameBufferPhysicalAddress = (pointer)
pVia->PciInfo->memBase[0];
+#endif
+#else
+#ifdef XSERVER_LIBPCIACCESS
+ pDRIInfo->frameBufferPhysicalAddress =
+ pVia->PciInfo->regions[0].base_addr;
#else
pDRIInfo->frameBufferPhysicalAddress =
pVia->PciInfo->memBase[0];
#endif
+#endif
pDRIInfo->frameBufferSize = 4096;
pDRIInfo->frameBufferStride = (pScrn->displayWidth *