- Add fbdev mode-setting backend to Xati. It and vesa are compiled in when
available, with fbdev being used by default. - Use depth 16 by default when vesa backend is used. - Add MMIO defines for PowerPC (should be in a common location). Many thanks for Michel Daenzer for much of this code.
This commit is contained in:
parent
ec7f553930
commit
9cdd6fd9e3
|
@ -1,10 +1,14 @@
|
||||||
if KDRIVEVESA
|
if KDRIVEVESA
|
||||||
VESA_SUBDIRS = vesa ati mach64 mga nvidia r128 smi
|
VESA_SUBDIRS = vesa mach64 mga nvidia r128 smi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = \
|
if KDRIVEFBDEV
|
||||||
src \
|
FBDEV_SUBDIRS = fbdev
|
||||||
linux \
|
endif
|
||||||
fbdev \
|
|
||||||
$(VESA_SUBDIRS)
|
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
src \
|
||||||
|
linux \
|
||||||
|
$(FBDEV_SUBDIRS) \
|
||||||
|
$(VESA_SUBDIRS) \
|
||||||
|
ati
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
|
if KDRIVEFBDEV
|
||||||
|
FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev
|
||||||
|
FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
if KDRIVEVESA
|
||||||
|
VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa
|
||||||
|
VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
@KDRIVE_INCS@ \
|
@KDRIVE_INCS@ \
|
||||||
-I$(top_srcdir)/hw/kdrive/vesa \
|
$(FBDEV_INCLUDES) \
|
||||||
|
$(VESA_INCLUDES) \
|
||||||
@XSERVER_CFLAGS@
|
@XSERVER_CFLAGS@
|
||||||
|
|
||||||
bin_PROGRAMS = Xati
|
bin_PROGRAMS = Xati
|
||||||
|
@ -22,7 +34,8 @@ Xati_SOURCES = \
|
||||||
|
|
||||||
Xati_LDADD = \
|
Xati_LDADD = \
|
||||||
libati.a \
|
libati.a \
|
||||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
|
$(FBDEV_LIBS) \
|
||||||
|
$(VESA_LIBS) \
|
||||||
@KDRIVE_LIBS@ \
|
@KDRIVE_LIBS@ \
|
||||||
@XSERVER_LIBS@ \
|
@XSERVER_LIBS@ \
|
||||||
$(TSLIB_FLAG)
|
$(TSLIB_FLAG)
|
||||||
|
|
|
@ -157,15 +157,50 @@ ATICardInit(KdCardInfo *card)
|
||||||
{
|
{
|
||||||
ATICardInfo *atic;
|
ATICardInfo *atic;
|
||||||
int i;
|
int i;
|
||||||
|
Bool initialized = FALSE;
|
||||||
|
|
||||||
atic = xalloc(sizeof(ATICardInfo));
|
atic = xcalloc(sizeof(ATICardInfo), 1);
|
||||||
if (atic == NULL)
|
if (atic == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ATIMapReg(card, atic);
|
#ifdef KDRIVEFBDEV
|
||||||
|
if (!initialized && fbdevInitialize(card, &atic->backend_priv.fbdev)) {
|
||||||
|
atic->use_fbdev = TRUE;
|
||||||
|
initialized = TRUE;
|
||||||
|
atic->backend_funcs.cardfini = fbdevCardFini;
|
||||||
|
atic->backend_funcs.scrfini = fbdevScreenFini;
|
||||||
|
atic->backend_funcs.initScreen = fbdevInitScreen;
|
||||||
|
atic->backend_funcs.finishInitScreen = fbdevFinishInitScreen;
|
||||||
|
atic->backend_funcs.createRes = fbdevCreateResources;
|
||||||
|
atic->backend_funcs.preserve = fbdevPreserve;
|
||||||
|
atic->backend_funcs.restore = fbdevRestore;
|
||||||
|
atic->backend_funcs.dpms = fbdevDPMS;
|
||||||
|
atic->backend_funcs.enable = fbdevEnable;
|
||||||
|
atic->backend_funcs.disable = fbdevDisable;
|
||||||
|
atic->backend_funcs.getColors = fbdevGetColors;
|
||||||
|
atic->backend_funcs.putColors = fbdevPutColors;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
|
if (!initialized && vesaInitialize(card, &atic->backend_priv.vesa)) {
|
||||||
|
atic->use_vesa = TRUE;
|
||||||
|
initialized = TRUE;
|
||||||
|
atic->backend_funcs.cardfini = vesaCardFini;
|
||||||
|
atic->backend_funcs.scrfini = vesaScreenFini;
|
||||||
|
atic->backend_funcs.initScreen = vesaInitScreen;
|
||||||
|
atic->backend_funcs.finishInitScreen = vesaFinishInitScreen;
|
||||||
|
atic->backend_funcs.createRes = vesaCreateResources;
|
||||||
|
atic->backend_funcs.preserve = vesaPreserve;
|
||||||
|
atic->backend_funcs.restore = vesaRestore;
|
||||||
|
atic->backend_funcs.dpms = vesaDPMS;
|
||||||
|
atic->backend_funcs.enable = vesaEnable;
|
||||||
|
atic->backend_funcs.disable = vesaDisable;
|
||||||
|
atic->backend_funcs.getColors = vesaGetColors;
|
||||||
|
atic->backend_funcs.putColors = vesaPutColors;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!vesaInitialize(card, &atic->vesa))
|
if (!initialized || !ATIMapReg(card, atic)) {
|
||||||
{
|
|
||||||
xfree(atic);
|
xfree(atic);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -185,39 +220,51 @@ ATICardFini(KdCardInfo *card)
|
||||||
ATICardInfo *atic = (ATICardInfo *)card->driver;
|
ATICardInfo *atic = (ATICardInfo *)card->driver;
|
||||||
|
|
||||||
ATIUnmapReg(card, atic);
|
ATIUnmapReg(card, atic);
|
||||||
vesaCardFini(card);
|
atic->backend_funcs.cardfini(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ATIScreenInit(KdScreenInfo *screen)
|
ATIScreenInit(KdScreenInfo *screen)
|
||||||
{
|
{
|
||||||
ATIScreenInfo *atis;
|
ATIScreenInfo *atis;
|
||||||
int screen_size, memory;
|
ATICardInfo *atic = screen->card->driver;
|
||||||
|
int success = FALSE;
|
||||||
|
|
||||||
atis = xalloc(sizeof(ATIScreenInfo));
|
atis = xcalloc(sizeof(ATIScreenInfo), 1);
|
||||||
if (atis == NULL)
|
if (atis == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
memset(atis, '\0', sizeof(ATIScreenInfo));
|
|
||||||
|
|
||||||
if (!vesaScreenInitialize(screen, &atis->vesa))
|
if (screen->fb[0].depth == 0)
|
||||||
{
|
screen->fb[0].depth = 16;
|
||||||
|
|
||||||
|
screen->driver = atis;
|
||||||
|
|
||||||
|
#ifdef KDRIVEFBDEV
|
||||||
|
if (atic->use_fbdev) {
|
||||||
|
success = fbdevScreenInitialize(screen,
|
||||||
|
&atis->backend_priv.fbdev);
|
||||||
|
screen->memory_size = min(atic->backend_priv.fbdev.fix.smem_len,
|
||||||
|
8192 * screen->fb[0].byteStride);
|
||||||
|
/*screen->memory_size = atic->backend_priv.fbdev.fix.smem_len;*/
|
||||||
|
screen->off_screen_base =
|
||||||
|
atic->backend_priv.fbdev.var.yres_virtual *
|
||||||
|
screen->fb[0].byteStride;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
|
if (atic->use_vesa) {
|
||||||
|
if (screen->fb[0].depth == 0)
|
||||||
|
screen->fb[0].depth = 16;
|
||||||
|
success = vesaScreenInitialize(screen,
|
||||||
|
&atis->backend_priv.vesa);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (!success) {
|
||||||
|
screen->driver = NULL;
|
||||||
xfree(atis);
|
xfree(atis);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
atis->screen = atis->vesa.fb;
|
|
||||||
|
|
||||||
memory = atis->vesa.fb_size;
|
|
||||||
screen_size = screen->fb[0].byteStride * screen->height;
|
|
||||||
|
|
||||||
memory -= screen_size;
|
|
||||||
if (memory > screen->fb[0].byteStride) {
|
|
||||||
atis->off_screen = atis->screen + screen_size;
|
|
||||||
atis->off_screen_size = memory;
|
|
||||||
} else {
|
|
||||||
atis->off_screen = 0;
|
|
||||||
atis->off_screen_size = 0;
|
|
||||||
}
|
|
||||||
screen->driver = atis;
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,8 +272,9 @@ static void
|
||||||
ATIScreenFini(KdScreenInfo *screen)
|
ATIScreenFini(KdScreenInfo *screen)
|
||||||
{
|
{
|
||||||
ATIScreenInfo *atis = (ATIScreenInfo *)screen->driver;
|
ATIScreenInfo *atis = (ATIScreenInfo *)screen->driver;
|
||||||
|
ATICardInfo *atic = screen->card->driver;
|
||||||
|
|
||||||
vesaScreenFini(screen);
|
atic->backend_funcs.scrfini(screen);
|
||||||
xfree(atis);
|
xfree(atis);
|
||||||
screen->driver = 0;
|
screen->driver = 0;
|
||||||
}
|
}
|
||||||
|
@ -257,25 +305,58 @@ ATIUnmapReg(KdCardInfo *card, ATICardInfo *atic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static Bool
|
||||||
ATISetMMIO(KdCardInfo *card, ATICardInfo *atic)
|
ATIInitScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
if (atic->reg_base == NULL)
|
KdScreenPriv(pScreen);
|
||||||
ATIMapReg(card, atic);
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
|
return atic->backend_funcs.initScreen(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static Bool
|
||||||
ATIResetMMIO(KdCardInfo *card, ATICardInfo *atic)
|
ATIFinishInitScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
KdScreenPriv(pScreen);
|
||||||
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
|
return atic->backend_funcs.finishInitScreen(pScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
ATICreateResources(ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
KdScreenPriv(pScreen);
|
||||||
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
|
return atic->backend_funcs.createRes(pScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ATIPreserve(KdCardInfo *card)
|
||||||
|
{
|
||||||
|
ATICardInfo *atic = card->driver;
|
||||||
|
|
||||||
|
atic->backend_funcs.preserve(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ATIRestore(KdCardInfo *card)
|
||||||
|
{
|
||||||
|
ATICardInfo *atic = card->driver;
|
||||||
|
|
||||||
ATIUnmapReg(card, atic);
|
ATIUnmapReg(card, atic);
|
||||||
}
|
|
||||||
|
|
||||||
|
atic->backend_funcs.restore(card);
|
||||||
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ATIDPMS(ScreenPtr pScreen, int mode)
|
ATIDPMS(ScreenPtr pScreen, int mode)
|
||||||
{
|
{
|
||||||
/* XXX */
|
KdScreenPriv(pScreen);
|
||||||
return TRUE;
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
|
return atic->backend_funcs.dpms(pScreen, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
@ -284,10 +365,13 @@ ATIEnable(ScreenPtr pScreen)
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
if (!vesaEnable(pScreen))
|
if (!atic->backend_funcs.enable(pScreen))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if ((atic->reg_base == NULL) && !ATIMapReg(pScreenPriv->screen->card,
|
||||||
|
atic))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ATISetMMIO(pScreenPriv->card, atic);
|
|
||||||
ATIDPMS(pScreen, KD_DPMS_NORMAL);
|
ATIDPMS(pScreen, KD_DPMS_NORMAL);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -299,26 +383,36 @@ ATIDisable(ScreenPtr pScreen)
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
ATIResetMMIO(pScreenPriv->card, atic);
|
ATIUnmapReg(pScreenPriv->card, atic);
|
||||||
vesaDisable(pScreen);
|
|
||||||
|
atic->backend_funcs.disable(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ATIRestore(KdCardInfo *card)
|
ATIGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
|
||||||
{
|
{
|
||||||
ATICardInfo *atic = card->driver;
|
KdScreenPriv(pScreen);
|
||||||
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
ATIResetMMIO(card, atic);
|
atic->backend_funcs.getColors(pScreen, fb, n, pdefs);
|
||||||
vesaRestore(card);
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ATIPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
|
||||||
|
{
|
||||||
|
KdScreenPriv(pScreen);
|
||||||
|
ATICardInfo(pScreenPriv);
|
||||||
|
|
||||||
|
atic->backend_funcs.putColors(pScreen, fb, n, pdefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
KdCardFuncs ATIFuncs = {
|
KdCardFuncs ATIFuncs = {
|
||||||
ATICardInit, /* cardinit */
|
ATICardInit, /* cardinit */
|
||||||
ATIScreenInit, /* scrinit */
|
ATIScreenInit, /* scrinit */
|
||||||
vesaInitScreen, /* initScreen */
|
ATIInitScreen, /* initScreen */
|
||||||
vesaFinishInitScreen, /* finishInitScreen */
|
ATIFinishInitScreen, /* finishInitScreen */
|
||||||
vesaCreateResources, /* createRes */
|
ATICreateResources, /* createRes */
|
||||||
vesaPreserve, /* preserve */
|
ATIPreserve, /* preserve */
|
||||||
ATIEnable, /* enable */
|
ATIEnable, /* enable */
|
||||||
ATIDPMS, /* dpms */
|
ATIDPMS, /* dpms */
|
||||||
ATIDisable, /* disable */
|
ATIDisable, /* disable */
|
||||||
|
@ -338,7 +432,6 @@ KdCardFuncs ATIFuncs = {
|
||||||
ATIDrawDisable, /* disableAccel */
|
ATIDrawDisable, /* disableAccel */
|
||||||
ATIDrawFini, /* finiAccel */
|
ATIDrawFini, /* finiAccel */
|
||||||
|
|
||||||
vesaGetColors, /* getColors */
|
ATIGetColors, /* getColors */
|
||||||
vesaPutColors, /* putColors */
|
ATIPutColors, /* putColors */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,52 @@
|
||||||
|
|
||||||
#ifndef _ATI_H_
|
#ifndef _ATI_H_
|
||||||
#define _ATI_H_
|
#define _ATI_H_
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef KDRIVEFBDEV
|
||||||
|
#include <fbdev.h>
|
||||||
|
#endif
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
#include <vesa.h>
|
#include <vesa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RADEON_REG_BASE(c) ((c)->attr.address[1])
|
#define RADEON_REG_BASE(c) ((c)->attr.address[1])
|
||||||
#define RADEON_REG_SIZE(c) (0x10000)
|
#define RADEON_REG_SIZE(c) (0x10000)
|
||||||
|
|
||||||
|
#ifdef __powerpc__
|
||||||
|
|
||||||
|
static __inline__ void
|
||||||
|
MMIO_OUT32(__volatile__ void *base, const unsigned long offset,
|
||||||
|
const unsigned int val)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__(
|
||||||
|
"stwbrx %1,%2,%3\n\t"
|
||||||
|
"eieio"
|
||||||
|
: "=m" (*((volatile unsigned char *)base+offset))
|
||||||
|
: "r" (val), "b" (base), "r" (offset));
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ CARD32
|
||||||
|
MMIO_IN32(__volatile__ void *base, const unsigned long offset)
|
||||||
|
{
|
||||||
|
register unsigned int val;
|
||||||
|
__asm__ __volatile__(
|
||||||
|
"lwbrx %0,%1,%2\n\t"
|
||||||
|
"eieio"
|
||||||
|
: "=r" (val)
|
||||||
|
: "b" (base), "r" (offset),
|
||||||
|
"m" (*((volatile unsigned char *)base+offset)));
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#define MMIO_OUT32(mmio, a, v) (*(VOL32 *)((mmio) + (a)) = (v))
|
#define MMIO_OUT32(mmio, a, v) (*(VOL32 *)((mmio) + (a)) = (v))
|
||||||
#define MMIO_IN32(mmio, a) (*(VOL32 *)((mmio) + (a)))
|
#define MMIO_IN32(mmio, a) (*(VOL32 *)((mmio) + (a)))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile CARD8 VOL8;
|
typedef volatile CARD8 VOL8;
|
||||||
typedef volatile CARD16 VOL16;
|
typedef volatile CARD16 VOL16;
|
||||||
typedef volatile CARD32 VOL32;
|
typedef volatile CARD32 VOL32;
|
||||||
|
@ -43,20 +81,49 @@ struct pci_id_list {
|
||||||
char *name;
|
char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct backend_funcs {
|
||||||
|
void (*cardfini)(KdCardInfo *);
|
||||||
|
void (*scrfini)(KdScreenInfo *);
|
||||||
|
Bool (*initScreen)(ScreenPtr);
|
||||||
|
Bool (*finishInitScreen)(ScreenPtr pScreen);
|
||||||
|
Bool (*createRes)(ScreenPtr);
|
||||||
|
void (*preserve)(KdCardInfo *);
|
||||||
|
void (*restore)(KdCardInfo *);
|
||||||
|
Bool (*dpms)(ScreenPtr, int);
|
||||||
|
Bool (*enable)(ScreenPtr);
|
||||||
|
void (*disable)(ScreenPtr);
|
||||||
|
void (*getColors)(ScreenPtr, int, int, xColorItem *);
|
||||||
|
void (*putColors)(ScreenPtr, int, int, xColorItem *);
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _ATICardInfo {
|
typedef struct _ATICardInfo {
|
||||||
VesaCardPrivRec vesa;
|
union {
|
||||||
|
#ifdef KDRIVEFBDEV
|
||||||
|
FbdevPriv fbdev;
|
||||||
|
#endif
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
|
VesaCardPrivRec vesa;
|
||||||
|
#endif
|
||||||
|
} backend_priv;
|
||||||
|
struct backend_funcs backend_funcs;
|
||||||
|
|
||||||
CARD8 *reg_base;
|
CARD8 *reg_base;
|
||||||
Bool is_radeon;
|
Bool is_radeon;
|
||||||
|
Bool use_fbdev, use_vesa;
|
||||||
} ATICardInfo;
|
} ATICardInfo;
|
||||||
|
|
||||||
#define getATICardInfo(kd) ((ATICardInfo *) ((kd)->card->driver))
|
#define getATICardInfo(kd) ((ATICardInfo *) ((kd)->card->driver))
|
||||||
#define ATICardInfo(kd) ATICardInfo *atic = getATICardInfo(kd)
|
#define ATICardInfo(kd) ATICardInfo *atic = getATICardInfo(kd)
|
||||||
|
|
||||||
typedef struct _ATIScreenInfo {
|
typedef struct _ATIScreenInfo {
|
||||||
VesaScreenPrivRec vesa;
|
union {
|
||||||
CARD8 *screen;
|
#ifdef KDRIVEFBDEV
|
||||||
CARD8 *off_screen;
|
FbdevScrPriv fbdev;
|
||||||
int off_screen_size;
|
#endif
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
|
VesaScreenPrivRec vesa;
|
||||||
|
#endif
|
||||||
|
} backend_priv;
|
||||||
|
|
||||||
int datatype;
|
int datatype;
|
||||||
int dp_gui_master_cntl;
|
int dp_gui_master_cntl;
|
||||||
|
@ -71,12 +138,6 @@ ATIMapReg(KdCardInfo *card, ATICardInfo *atic);
|
||||||
void
|
void
|
||||||
ATIUnmapReg(KdCardInfo *card, ATICardInfo *atic);
|
ATIUnmapReg(KdCardInfo *card, ATICardInfo *atic);
|
||||||
|
|
||||||
void
|
|
||||||
ATISetMMIO(KdCardInfo *card, ATICardInfo *atic);
|
|
||||||
|
|
||||||
void
|
|
||||||
ATIResetMMIO(KdCardInfo *card, ATICardInfo *atic);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
ATIDrawSetup(ScreenPtr pScreen);
|
ATIDrawSetup(ScreenPtr pScreen);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,9 @@ void
|
||||||
ddxUseMsg (void)
|
ddxUseMsg (void)
|
||||||
{
|
{
|
||||||
KdUseMsg();
|
KdUseMsg();
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
vesaUseMsg();
|
vesaUseMsg();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -81,7 +83,10 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef KDRIVEVESA
|
||||||
if (!(ret = vesaProcessArgument (argc, argv, i)))
|
if (!(ret = vesaProcessArgument (argc, argv, i)))
|
||||||
|
#endif
|
||||||
ret = KdProcessArgument(argc, argv, i);
|
ret = KdProcessArgument(argc, argv, i);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
|
||||||
int k;
|
int k;
|
||||||
unsigned long off;
|
unsigned long off;
|
||||||
if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0) {
|
if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0) {
|
||||||
perror("Error opening /dev/fb0\n");
|
perror("Error opening /dev/fb0");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* quiet valgrind */
|
/* quiet valgrind */
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
*/
|
*/
|
||||||
/* $RCSId: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.29 2002/11/13 16:37:39 keithp Exp $ */
|
/* $RCSId: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.29 2002/11/13 16:37:39 keithp Exp $ */
|
||||||
|
|
||||||
|
#ifndef _KDRIVE_H_
|
||||||
|
#define _KDRIVE_H_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#define NEED_EVENTS
|
#define NEED_EVENTS
|
||||||
|
@ -851,3 +854,5 @@ KdOffscreenFini (ScreenPtr pScreen);
|
||||||
/* function prototypes to be implemented by the drivers */
|
/* function prototypes to be implemented by the drivers */
|
||||||
void
|
void
|
||||||
InitCard (char *name);
|
InitCard (char *name);
|
||||||
|
|
||||||
|
#endif /* _KDRIVE_H_ */
|
||||||
|
|
Loading…
Reference in New Issue