Add a memory_base variable and use it.

This commit is contained in:
Anders Carlsson 2003-10-15 05:34:54 +00:00
commit f4bcd36a38
8 changed files with 11 additions and 12 deletions

View file

@ -74,8 +74,8 @@ mgaScreenInit (KdScreenInfo *screen)
screen->dumb = TRUE;
fprintf (stderr, "vesa mapping is %d\n", mgas->vesa.mapping);
#endif
mgas->screen = mgas->vesa.fb;
#endif
screen->memory_base = mgas->vesa.fb;
memory = mgas->vesa.fb_size;
screen_size = screen->fb[0].byteStride * screen->height;

View file

@ -96,7 +96,6 @@ typedef struct _mgaCardInfo {
typedef struct _mgaScreenInfo {
VesaScreenPrivRec vesa;
CARD8 *screen;
int pitch;
int pw;

View file

@ -102,7 +102,7 @@ mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg)
cmd = MGA_OPCOD_TRAP | MGA_DWGCTL_SOLID | MGA_DWGCTL_ARZERO | MGA_DWGCTL_SGNZERO |
MGA_DWGCTL_SHIFTZERO | mgaRop[alu];
dst_org = (int)pPixmap->devPrivate.ptr - (int)mgas->screen;
dst_org = (int)pPixmap->devPrivate.ptr - (int)pScreenPriv->screen->memory_base;
mgaSetup (pPixmap->drawable.pScreen, 5);
@ -152,8 +152,8 @@ mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap,
mgaSetup (pSrcPixmap->drawable.pScreen, 7);
MGA_OUT32 (mmio, MGA_REG_SRCORG, ((int)pSrcPixmap->devPrivate.ptr - (int)mgas->screen));
MGA_OUT32 (mmio, MGA_REG_DSTORG, ((int)pDstPixmap->devPrivate.ptr - (int)mgas->screen));
MGA_OUT32 (mmio, MGA_REG_SRCORG, ((int)pSrcPixmap->devPrivate.ptr - (int)pScreenPriv->screen->memory_base));
MGA_OUT32 (mmio, MGA_REG_DSTORG, ((int)pDstPixmap->devPrivate.ptr - (int)pScreenPriv->screen->memory_base));
MGA_OUT32 (mmio, MGA_REG_PITCH, pDstPixmap->devKind / (pDstPixmap->drawable.bitsPerPixel >> 3));
src_pitch = pSrcPixmap->devKind / (pSrcPixmap->drawable.bitsPerPixel >> 3);