summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:06 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:06 +0000
commit1225aa4e49a874a5af28fc8dbe3d6511b33a94b3 (patch)
tree4b1cd8a34a9323f3b6dc3f72de8e9aa12c8fb0dd
parentd30e77934f877806542ab2e98710da36314cd051 (diff)
-rw-r--r--src/via_accel.c18
-rw-r--r--src/via_dri.c12
-rw-r--r--src/via_dri.h2
-rw-r--r--src/via_driver.c10
-rw-r--r--src/via_memory.c4
-rw-r--r--src/via_priv.h6
-rw-r--r--src/via_swov.c4
7 files changed, 35 insertions, 21 deletions
diff --git a/src/via_accel.c b/src/via_accel.c
index 74fa4f4..e867b8f 100644
--- a/src/via_accel.c
+++ b/src/via_accel.c
@@ -606,7 +606,7 @@ VIASetupForScreenToScreenCopy(
VIAPtr pVia = VIAPTR(pScrn);
int cmd;
- cmd = VIA_GEC_BLT | (XAACopyROP[rop] << 24);
+ cmd = VIA_GEC_BLT | (XAAGetCopyROP(rop) << 24);
if (xdir < 0)
cmd |= VIA_GEC_DECX;
@@ -681,7 +681,7 @@ VIASetupForSolidFill(
VIAPtr pVia = VIAPTR(pScrn);
int cmd;
- cmd = VIA_GEC_BLT | VIA_GEC_FIXCOLOR_PAT | (XAAPatternROP[rop] << 24);
+ cmd = VIA_GEC_BLT | VIA_GEC_FIXCOLOR_PAT | (XAAGetPatternROP(rop) << 24);
pVia->SavedCmd = cmd;
pVia->SavedFgColor = color;
@@ -741,7 +741,7 @@ VIASetupForMono8x8PatternFill(
int cmd;
cmd = VIA_GEC_BLT | VIA_GEC_PAT_REG | VIA_GEC_PAT_MONO |
- (XAAPatternROP[rop] << 24);
+ (XAAGetPatternROP(rop) << 24);
if (bg == -1) {
/* transparent mono pattern */
@@ -803,7 +803,7 @@ VIASetupForColor8x8PatternFill(
VIAPtr pVia = VIAPTR(pScrn);
int cmd;
- cmd = VIA_GEC_BLT | (XAAPatternROP[rop] << 24);
+ cmd = VIA_GEC_BLT | (XAAGetPatternROP(rop) << 24);
pVia->SavedCmd = cmd;
pVia->SavedPatternAddr = (patternx * pVia->Bpp + patterny * pVia->Bpl);
@@ -854,7 +854,7 @@ VIASetupForCPUToScreenColorExpandFill(
int cmd;
cmd = VIA_GEC_BLT | VIA_GEC_SRC_SYS | VIA_GEC_SRC_MONO |
- (XAACopyROP[rop] << 24);
+ (XAAGetCopyROP(rop) << 24);
if (bg == -1) {
cmd |= VIA_GEC_MSRC_TRANS;
@@ -914,7 +914,7 @@ VIASetupForScreenToScreenColorExpand(
VIAPtr pVia = VIAPTR(pScrn);
int cmd;
- cmd = VIA_GEC_BLT | VIA_GEC_SRC_MONO | (XAACopyROP[rop] << 24);
+ cmd = VIA_GEC_BLT | VIA_GEC_SRC_MONO | (XAAGetCopyROP(rop) << 24);
if (bg == -1) {
cmd |= VIA_GEC_MSRC_TRANS;
@@ -980,7 +980,7 @@ VIASetupForImageWrite(
/* We don't record bpp and depth because we assume bpp is equal to
bpp of screen. Is this assume correct ? */
- cmd = VIA_GEC_BLT | VIA_GEC_SRC_SYS | (XAACopyROP[rop] << 24);
+ cmd = VIA_GEC_BLT | VIA_GEC_SRC_SYS | (XAAGetCopyROP(rop) << 24);
pVia->SavedCmd = cmd;
@@ -1038,7 +1038,7 @@ VIASetupForSolidLine(
int cmd;
/* we move VIA_GEC_LINE from here to the place firing command */
- cmd = VIA_GEC_FIXCOLOR_PAT | (XAAPatternROP[rop] << 24);
+ cmd = VIA_GEC_FIXCOLOR_PAT | (XAAGetPatternROP(rop) << 24);
pVia->SavedCmd = cmd;
pVia->SavedFgColor = color;
@@ -1151,7 +1151,7 @@ VIASetupForDashedLine(
int cmd;
CARD32 pat = *(CARD32 *)pattern;
- cmd = VIA_GEC_LINE | VIA_GEC_FIXCOLOR_PAT | (XAAPatternROP[rop] << 24);
+ cmd = VIA_GEC_LINE | VIA_GEC_FIXCOLOR_PAT | (XAAGetPatternROP(rop) << 24);
if (bg == -1) {
/* transparent mono pattern */
diff --git a/src/via_dri.c b/src/via_dri.c
index 9eb36af..d9816ea 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -54,7 +54,7 @@ extern void GlxSetVisualConfigs(
#define AGP_CMDBUF_SIZE (AGP_PAGE_SIZE * AGP_CMDBUF_PAGES)
static char VIAKernelDriverName[] = "via";
-static char VIAClientDriverName[] = "via";
+static char VIAClientDriverName[] = "unichrome";
int test_alloc_FB(ScreenPtr pScreen, VIAPtr pVia, int Size);
int test_alloc_AGP(ScreenPtr pScreen, VIAPtr pVia, int Size);
static Bool VIAInitVisualConfigs(ScreenPtr pScreen);
@@ -65,9 +65,9 @@ static Bool VIADRIKernelInit(ScreenPtr pScreen, VIAPtr pVia);
static Bool VIADRIMapInit(ScreenPtr pScreen, VIAPtr pVia);
static Bool VIACreateContext(ScreenPtr pScreen, VisualPtr visual,
- drmContext hwContext, void *pVisualConfigPriv,
+ drm_context_t hwContext, void *pVisualConfigPriv,
DRIContextType contextStore);
-static void VIADestroyContext(ScreenPtr pScreen, drmContext hwContext,
+static void VIADestroyContext(ScreenPtr pScreen, drm_context_t hwContext,
DRIContextType contextStore);
static void VIADRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
DRIContextType readContextType,
@@ -123,7 +123,7 @@ static Bool VIADRIAgpInit(ScreenPtr pScreen, VIAPtr pVia)
"[drm] agpAddr = 0x%08lx\n",pVia->agpAddr);
pVIADRI->agp.size = pVia->agpSize;
- if (drmAddMap(pVia->drmFD, (drmHandle)0,
+ if (drmAddMap(pVia->drmFD, (drm_handle_t)0,
pVIADRI->agp.size, DRM_AGP, 0,
&pVIADRI->agp.handle) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
@@ -507,14 +507,14 @@ VIADRICloseScreen(ScreenPtr pScreen)
*/
static Bool
VIACreateContext(ScreenPtr pScreen, VisualPtr visual,
- drmContext hwContext, void *pVisualConfigPriv,
+ drm_context_t hwContext, void *pVisualConfigPriv,
DRIContextType contextStore)
{
return TRUE;
}
static void
-VIADestroyContext(ScreenPtr pScreen, drmContext hwContext,
+VIADestroyContext(ScreenPtr pScreen, drm_context_t hwContext,
DRIContextType contextStore)
{
}
diff --git a/src/via_dri.h b/src/via_dri.h
index da002f7..006cd09 100644
--- a/src/via_dri.h
+++ b/src/via_dri.h
@@ -38,7 +38,7 @@ typedef struct {
} VIASAREAPriv;
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
drmAddress map;
} viaRegion, *viaRegionPtr;
diff --git a/src/via_driver.c b/src/via_driver.c
index fa94284..f4962e2 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -203,6 +203,7 @@ static const char *vgaHWSymbols[] = {
"vgaHWLock",
"vgaHWUnlock",
"vgaHWFreeHWRec",
+ "vgaHWddc1SetSpeedWeak",
NULL
};
@@ -243,9 +244,9 @@ static const char *i2cSymbols[] = {
};
static const char *xaaSymbols[] = {
- "XAACopyROP",
- "XAACopyROP_PM",
- "XAAPatternROP",
+ "XAAGetCopyROP",
+ "XAAGetCopyROP_PM",
+ "XAAGetPatternROP",
"XAACreateInfoRec",
"XAADestroyInfoRec",
"XAAInit",
@@ -649,7 +650,8 @@ VIAddc1(int scrnIndex)
VGAOUT8(0x3c5, (tmp | 0x11));
if ((pMon = xf86PrintEDID(
- xf86DoEDID_DDC1(scrnIndex,vgaHWddc1SetSpeed,VIAddc1Read))) != NULL)
+ xf86DoEDID_DDC1(scrnIndex,vgaHWddc1SetSpeedWeak(),
+ VIAddc1Read))) != NULL)
success = TRUE;
xf86SetDDCproperties(pScrn,pMon);
diff --git a/src/via_memory.c b/src/via_memory.c
index 804d84e..19bb49c 100644
--- a/src/via_memory.c
+++ b/src/via_memory.c
@@ -31,14 +31,18 @@
#include "via_capture.h"
#include "via.h"
#include "ddmpeg.h"
+#ifdef XF86DRI
#include "xf86drm.h"
+#endif
#include "via_overlay.h"
#include "via_driver.h"
#include "via_regrec.h"
#include "via_priv.h"
#include "via_swov.h"
+#ifdef XF86DRI
#include "via_common.h"
+#endif
/*
diff --git a/src/via_priv.h b/src/via_priv.h
index a646de0..a4d947a 100644
--- a/src/via_priv.h
+++ b/src/via_priv.h
@@ -1,19 +1,23 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/via/via_priv.h,v 1.1.4.1.4.2 2004/03/04 20:16:33 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/via/via_priv.h,v 1.3 2004/07/16 04:38:54 anholt Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/via/via_priv.h,v 1.3 2003/08/27 15:16:12 tsi Exp $ */
#ifndef _VIA_PRIV_H_
#define _VIA_PRIV_H_ 1
#include "ddmpeg.h"
+#ifdef XF86DRI
#include "via_common.h"
+#endif
#define MEM_BLOCKS 4
typedef struct {
unsigned long base; /* Offset into fb */
int pool; /* Pool we drew from */
+#ifdef XF86DRI
int drm_fd; /* Fd in DRM mode */
drmViaMem drm; /* DRM management object */
+#endif
int slot; /* Pool 3 slot */
void *pVia; /* VIA driver pointer */
FBLinearPtr linear; /* X linear pool info ptr */
diff --git a/src/via_swov.c b/src/via_swov.c
index f791446..9e7b423 100644
--- a/src/via_swov.c
+++ b/src/via_swov.c
@@ -32,14 +32,18 @@
#include "via_capture.h"
#include "via.h"
#include "ddmpeg.h"
+#ifdef XF86DRI
#include "xf86drm.h"
+#endif
#include "via_overlay.h"
#include "via_driver.h"
#include "via_regrec.h"
#include "via_priv.h"
#include "via_swov.h"
+#ifdef XF86DRI
#include "via_common.h"
+#endif