diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/amd_gx_driver.c | 9 | ||||
-rw-r--r-- | src/amd_gx_video.c | 14 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c index b606827..09a9d40 100644 --- a/src/amd_gx_driver.c +++ b/src/amd_gx_driver.c @@ -128,6 +128,7 @@ extern void GXInitVideo(ScreenPtr pScrn); extern Bool GXDGAInit(ScreenPtr pScrn); extern void GXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src); +unsigned char *XpressROMPtr; unsigned long fb; /* Existing Processor Models */ @@ -500,12 +501,15 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) pGeode->cpu_version = gfx_detect_cpu(); if ((pGeode->cpu_version & 0xFF) == GFX_CPU_REDCLOUD) { + int ret; Q_WORD msrValue; pGeode->DetectedChipSet = GX; /* See if this a CRT or TFT part */ - gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msrValue); + ret = gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msrValue); + DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR, "MSR=%d\n", ret)); + pGeode->DetectedChipSet = ((msrValue.low & RCDF_CONFIG_FMT_MASK) == RCDF_CONFIG_FMT_FP) ? GX_TFT : GX_CRT; @@ -2471,6 +2475,9 @@ GXMapMem(ScrnInfoPtr pScrni) gfx_virt_fbptr = (unsigned char *)xf86MapVidMem(pScrni->scrnIndex, VIDMEM_FRAMEBUFFER, pGeode->FBLinearAddr, pGeode->FBAvail); + XpressROMPtr = (unsigned char *)xf86MapVidMem(pScrni->scrnIndex, + VIDMEM_FRAMEBUFFER, 0xF0000, 0x10000); + pGeode->FBBase = gfx_virt_fbptr; DEBUGMSG(1, (0, X_NONE, "Set mode %p %p %p %p %p\n", diff --git a/src/amd_gx_video.c b/src/amd_gx_video.c index 1fc0235..e8ee152 100644 --- a/src/amd_gx_video.c +++ b/src/amd_gx_video.c @@ -34,10 +34,14 @@ * Alan Hourihane <alanh@fairlite.demon.co.uk> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Resources.h" -#include "xf86_ansic.h" +//#include "xf86_ansic.h" #include "compiler.h" #include "xf86PciInfo.h" #include "xf86Pci.h" @@ -45,7 +49,8 @@ #include "regionstr.h" #include "amd.h" -/* #include "Xv.h" */ +#include "xf86xv.h" +#include <X11/extensions/Xv.h> #include "xaa.h" #include "xaalocal.h" #include "dixstruct.h" @@ -64,6 +69,7 @@ #define REINIT 1 #ifndef XvExtension +#error "It didn't work!" void GXInitVideo(ScreenPtr pScrn) { @@ -92,7 +98,7 @@ static void GXQueryBestSize(ScrnInfoPtr, Bool, short, short, short, short, unsigned int *, unsigned int *, pointer); static int GXPutImage(ScrnInfoPtr, short, short, short, short, short, short, short, short, int, unsigned char *, short, short, Bool, - RegionPtr, pointer); + RegionPtr, pointer, DrawablePtr pDraw); static int GXQueryImageAttributes(ScrnInfoPtr, int, unsigned short *, unsigned short *, int *, int *); @@ -937,7 +943,7 @@ GXPutImage(ScrnInfoPtr pScrni, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, - short width, short height, Bool sync, RegionPtr clipBoxes, pointer data) + short width, short height, Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; GeodeRec *pGeode = GEODEPTR(pScrni); |