mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-16 00:19:55 +00:00
merge xfixes_2_branch back to HEAD
This commit is contained in:
parent
9e94665cf9
commit
5378236aa6
51 changed files with 920 additions and 996 deletions
|
|
@ -1,15 +1,7 @@
|
|||
INCLUDES = \
|
||||
-I$(top_srcdir)/fb \
|
||||
-I$(top_srcdir)/hw/kdrive/src \
|
||||
@KDRIVE_INCS@ \
|
||||
-I$(top_srcdir)/hw/kdrive/vesa \
|
||||
-I$(top_srcdir)/hw/kdrive/linux \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/mi \
|
||||
-I$(top_srcdir)/miext/layer \
|
||||
-I$(top_srcdir)/miext/shadow \
|
||||
-I$(top_srcdir)/randr \
|
||||
-I$(top_srcdir)/render \
|
||||
$(XSERVER_CFLAGS)
|
||||
@XSERVER_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = Xmga
|
||||
|
||||
|
|
@ -24,23 +16,7 @@ Xmga_SOURCES = \
|
|||
mgastub.c
|
||||
|
||||
Xmga_LDADD = \
|
||||
libmga.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
|
||||
$(top_builddir)/dix/libdix.a \
|
||||
$(top_builddir)/os/libos.a \
|
||||
$(top_builddir)/miext/layer/liblayer.a \
|
||||
$(top_builddir)/hw/kdrive/src/libkdrive.a \
|
||||
$(top_builddir)/hw/kdrive/linux/liblinux.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.a \
|
||||
$(top_builddir)/randr/librandr.a \
|
||||
$(top_builddir)/render/librender.a \
|
||||
$(top_builddir)/xfixes/libxfixes.a \
|
||||
$(top_builddir)/fb/libfb.a \
|
||||
$(top_builddir)/mi/libmi.a \
|
||||
$(top_builddir)/Xext/libXext.a \
|
||||
$(top_builddir)/randr/librandr.a \
|
||||
$(top_builddir)/render/librender.a \
|
||||
$(top_builddir)/xfixes/libxfixes.a \
|
||||
$(top_builddir)/dix/libxpstubs.a \
|
||||
$(XSERVER_LIBS) \
|
||||
-lm -lz
|
||||
libmga.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#endif
|
||||
#include "mga.h"
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaCardInit (KdCardInfo *card)
|
||||
{
|
||||
MgaCardInfo *mgac;
|
||||
|
|
@ -51,11 +51,10 @@ mgaCardInit (KdCardInfo *card)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaScreenInit (KdScreenInfo *screen)
|
||||
{
|
||||
MgaScreenInfo *mgas;
|
||||
int screen_size, memory;
|
||||
|
||||
mgas = (MgaScreenInfo *) xalloc (sizeof (MgaScreenInfo));
|
||||
if (!mgas)
|
||||
|
|
@ -75,33 +74,17 @@ mgaScreenInit (KdScreenInfo *screen)
|
|||
|
||||
fprintf (stderr, "vesa mapping is %d\n", mgas->vesa.mapping);
|
||||
#endif
|
||||
screen->memory_base = mgas->vesa.fb;
|
||||
|
||||
memory = mgas->vesa.fb_size;
|
||||
screen_size = screen->fb[0].byteStride * screen->height;
|
||||
|
||||
memory -= screen_size;
|
||||
if (memory > screen->fb[0].byteStride)
|
||||
{
|
||||
screen->off_screen_base = screen_size;
|
||||
screen->off_screen_size = memory;
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->off_screen_base = 0;
|
||||
screen->off_screen_size = 0;
|
||||
}
|
||||
screen->driver = mgas;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaInitScreen (ScreenPtr pScreen)
|
||||
{
|
||||
return vesaInitScreen (pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaFinishInitScreen (ScreenPtr pScreen)
|
||||
{
|
||||
Bool ret;
|
||||
|
|
@ -111,7 +94,13 @@ mgaFinishInitScreen (ScreenPtr pScreen)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
static Bool
|
||||
mgaCreateResources (ScreenPtr pScreen)
|
||||
{
|
||||
return vesaCreateResources (pScreen);
|
||||
}
|
||||
|
||||
static void
|
||||
mgaPreserve (KdCardInfo *card)
|
||||
{
|
||||
vesaPreserve (card);
|
||||
|
|
@ -162,14 +151,14 @@ mgaResetMMIO (KdCardInfo *card, MgaCardInfo *mgac)
|
|||
mgaUnmapReg (card, mgac);
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaDPMS (ScreenPtr pScreen, int mode)
|
||||
{
|
||||
/* XXX */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaEnable (ScreenPtr pScreen)
|
||||
{
|
||||
KdScreenPriv (pScreen);
|
||||
|
|
@ -184,7 +173,7 @@ mgaEnable (ScreenPtr pScreen)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaDisable (ScreenPtr pScreen)
|
||||
{
|
||||
KdScreenPriv (pScreen);
|
||||
|
|
@ -195,7 +184,7 @@ mgaDisable (ScreenPtr pScreen)
|
|||
vesaDisable (pScreen);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaRestore (KdCardInfo *card)
|
||||
{
|
||||
MgaCardInfo *mgac = card->driver;
|
||||
|
|
@ -204,7 +193,7 @@ mgaRestore (KdCardInfo *card)
|
|||
vesaRestore (card);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaScreenFini (KdScreenInfo *screen)
|
||||
{
|
||||
MgaScreenInfo *mgas = (MgaScreenInfo *) screen->driver;
|
||||
|
|
@ -214,7 +203,7 @@ mgaScreenFini (KdScreenInfo *screen)
|
|||
screen->driver = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaCardFini (KdCardInfo *card)
|
||||
{
|
||||
MgaCardInfo *mgac = (MgaCardInfo *)card->driver;
|
||||
|
|
@ -227,6 +216,8 @@ KdCardFuncs mgaFuncs = {
|
|||
mgaCardInit, /* cardinit */
|
||||
mgaScreenInit, /* scrinit */
|
||||
mgaInitScreen, /* initScreen */
|
||||
mgaFinishInitScreen, /* finishInitScreen */
|
||||
mgaCreateResources, /* createRes */
|
||||
mgaPreserve, /* preserve */
|
||||
mgaEnable, /* enable */
|
||||
mgaDPMS, /* dpms */
|
||||
|
|
@ -249,7 +240,5 @@ KdCardFuncs mgaFuncs = {
|
|||
|
||||
vesaGetColors, /* getColors */
|
||||
vesaPutColors, /* putColors */
|
||||
|
||||
mgaFinishInitScreen, /* finishInitScreen */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ int fifo_size;
|
|||
int pitch, src_pitch;
|
||||
int dir;
|
||||
|
||||
void
|
||||
static void
|
||||
mgaWaitAvail (int n)
|
||||
{
|
||||
if (fifo_size < n) {
|
||||
|
|
@ -62,7 +62,7 @@ mgaWaitAvail (int n)
|
|||
fifo_size -= n;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaWaitIdle (void)
|
||||
{
|
||||
while (MGA_IN32 (mmio, MGA_REG_STATUS) & 0x10000);
|
||||
|
|
@ -91,11 +91,10 @@ mgaSetup (ScreenPtr pScreen, int wait)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg)
|
||||
{
|
||||
KdScreenPriv(pPixmap->drawable.pScreen);
|
||||
mgaScreenInfo (pScreenPriv);
|
||||
int cmd;
|
||||
int dst_org;
|
||||
|
||||
|
|
@ -115,7 +114,7 @@ mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaSolid (int x1, int y1, int x2, int y2)
|
||||
{
|
||||
mgaWaitAvail (2);
|
||||
|
|
@ -124,7 +123,7 @@ mgaSolid (int x1, int y1, int x2, int y2)
|
|||
MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (y1 << 16) | (y2 - y1));
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaDoneSolid (void)
|
||||
{
|
||||
}
|
||||
|
|
@ -132,12 +131,11 @@ mgaDoneSolid (void)
|
|||
#define BLIT_LEFT 1
|
||||
#define BLIT_UP 4
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap,
|
||||
int dx, int dy, int alu, Pixel pm)
|
||||
{
|
||||
KdScreenPriv(pSrcPixmap->drawable.pScreen);
|
||||
mgaScreenInfo (pScreenPriv);
|
||||
|
||||
int cmd;
|
||||
|
||||
|
|
@ -165,7 +163,7 @@ mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaCopy (int srcX, int srcY, int dstX, int dstY, int w, int h)
|
||||
{
|
||||
int start, end;
|
||||
|
|
@ -191,7 +189,7 @@ mgaCopy (int srcX, int srcY, int dstX, int dstY, int w, int h)
|
|||
MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (dstY << 16) | h);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mgaDoneCopy (void)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue