Commit f39a62d1 authored by Keith Packard's avatar Keith Packard
Browse files

Add Xmuu library to remove requirement for Xt/Xaw from most X utilities Add

    i810 and Xv support to kdrive
parent a161cfd7
XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $
XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.4 2000/09/15 15:19:00 keithp Exp $
XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.5 2000/12/01 00:01:30 keithp Exp $
KDRIVE=.
#include "Kdrive.tmpl"
......@@ -8,11 +8,16 @@ RENDERSRCS=kpict.c
RENDEROBJS=kpict.o
#endif
#if BuildXvExt
XVSRCS=kxv.c
XVOBJS=kxv.o
#endif
SRCS = kcmap.c kcolor.c kdrive.c kinfo.c kinput.c kmap.c knoop.c ktest.c \
vga.c kasync.c kmode.c kcurscol.c kshadow.c $(RENDERSRCS)
vga.c kasync.c kmode.c kcurscol.c kshadow.c $(RENDERSRCS) $(XVSRCS)
OBJS = kcmap.o kcolor.o kdrive.o kinfo.o kinput.o kmap.o knoop.o ktest.o \
vga.o kasync.o kmode.o kcurscol.o kshadow.o $(RENDEROBJS)
vga.o kasync.o kmode.o kcurscol.o kshadow.o $(RENDEROBJS) $(XVOBJS)
INCLUDES = $(KDINCS)
......
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.9 2000/09/27 20:46:36 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.10 2000/10/03 17:22:14 keithp Exp $ */
#include "fbdev.h"
......@@ -119,6 +119,11 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
screen->fb[0].redMask = Mask (priv->var.red.offset, priv->var.red.length);
screen->fb[0].greenMask = Mask (priv->var.green.offset, priv->var.green.length);
screen->fb[0].blueMask = Mask (priv->var.blue.offset, priv->var.blue.length);
#ifdef ITSY
screen->fb[0].redMask = 0xf800;
screen->fb[0].greenMask = 0x07e0;
screen->fb[0].blueMask = 0x001f;
#endif
allbits = screen->fb[0].redMask | screen->fb[0].greenMask | screen->fb[0].blueMask;
depth = 32;
while (depth && !(allbits & (1 << (depth - 1))))
......
......@@ -8,9 +8,9 @@ TSSRCS = ts.c
TSOBJS = ts.o
#endif
SRCS = keyboard.c linux.c ps2.c bus.c $(TSSRCS)
SRCS = keyboard.c linux.c ps2.c bus.c agp.c $(TSSRCS)
OBJS = keyboard.o linux.o ps2.o bus.o $(TSOBJS)
OBJS = keyboard.o linux.o ps2.o bus.o agp.o $(TSOBJS)
INCLUDES = -I. $(KDINCS)
......
/*
* $XFree86: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.4 2000/10/10 14:05:48 tsi Exp $
* $XFree86: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.5 2000/12/08 23:04:57 keithp Exp $
*
* Copyright 1999 Keith Packard
*
......@@ -29,6 +29,7 @@
#define XK_PUBLISHING
#include <X11/keysym.h>
#include <termios.h>
#include <sys/ioctl.h>
extern int LinuxConsoleFd;
......
......@@ -28,6 +28,7 @@
#include <linux/vt.h>
#include <linux/kd.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <keysym.h>
static int vtno;
......@@ -174,6 +175,7 @@ LinuxFindPci (CARD16 vendor, CARD16 device, CARD32 count, KdCardAttr *attr)
n--;
}
attr->naddr = n;
attr->bus = bus;
ret = TRUE;
break;
}
......@@ -181,6 +183,37 @@ LinuxFindPci (CARD16 vendor, CARD16 device, CARD32 count, KdCardAttr *attr)
return ret;
}
unsigned char *
LinuxGetPciCfg(KdCardAttr *attr) {
char filename[256];
FILE *f;
unsigned char *cfg;
int r;
snprintf(filename, 255, "/proc/bus/pci/%02x/%02x.%x",
attr->bus >> 8, (attr->bus & 0xff) >> 3, attr->bus & 7);
/* fprintf(stderr,"Find card on path %s\n",filename); */
if (!(f=fopen(filename,"r")))
return NULL;
if (!(cfg=xalloc(256)))
{
fclose(f);
return NULL;
}
if (256 != (r=fread(cfg, 1, 256, f)))
{
fprintf(stderr,"LinuxGetPciCfg: read %d, expected 256\n",r);
free(cfg);
cfg=NULL;
}
fclose(f);
/* fprintf(stderr,"LinuxGetPciCfg: success, returning %p\n",cfg); */
return cfg;
}
void
LinuxSetSwitchMode (int mode)
{
......
......@@ -115,6 +115,7 @@ Ps2Init (void)
if (ps2Port >= 0)
return ps2Port;
}
return -1;
}
void
......
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.5 2000/08/26 00:24:37 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.7 2000/09/22 06:25:29 keithp Exp $ */
#include "kdrive.h"
......@@ -287,12 +287,12 @@ const GCOps kdAsyncPixmapGCOps = {
KdCheckCopyPlane,
fbPolyPoint,
fbPolyLine,
miPolySegment,
miPolyRectangle,
fbPolySegment,
fbPolyRectangle,
fbPolyArc,
miFillPolygon,
fbFillPolygon,
fbPolyFillRect,
miPolyFillArc,
fbPolyFillArc,
miPolyText8,
miPolyText16,
miImageText8,
......
This diff is collapsed.
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.10 2000/09/27 20:47:36 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.11 2000/12/08 22:59:37 keithp Exp $ */
#include "kdrive.h"
#ifdef PSEUDO8
......@@ -30,6 +30,10 @@
#include <mivalidate.h>
#include <dixstruct.h>
#ifdef XV
#include "kxv.h"
#endif
CARD8 kdBpp[] = { 1, 4, 8, 16, 24, 32 };
#define NUM_KD_BPP (sizeof (kdBpp) / sizeof (kdBpp[0]))
......@@ -243,6 +247,7 @@ KdEnableScreen (ScreenPtr pScreen)
KdSetRootClip (pScreen, TRUE);
if (pScreenPriv->card->cfuncs->dpms)
(*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
return TRUE;
}
void
......@@ -755,6 +760,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
miInitializeBackingStore (pScreen);
#endif
#endif
/*
* Wrap CloseScreen, the order now is:
* KdCloseScreen
......@@ -811,7 +818,6 @@ KdInitScreen (ScreenInfo *pScreenInfo,
char **argv)
{
KdCardInfo *card = screen->card;
int i;
(*card->cfuncs->scrinit) (screen);
......@@ -927,6 +933,8 @@ KdAddScreen (ScreenInfo *pScreenInfo,
AddScreen (KdScreenInit, argc, argv);
}
#if 0 /* This function is not used currently */
int
KdDepthToFb (ScreenPtr pScreen, int depth)
{
......@@ -938,12 +946,13 @@ KdDepthToFb (ScreenPtr pScreen, int depth)
return fb;
}
#endif
void
KdInitOutput (ScreenInfo *pScreenInfo,
int argc,
char **argv)
{
int i;
KdCardInfo *card;
KdScreenInfo *screen;
......
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.11 2000/11/29 08:42:25 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.12 2000/12/08 22:59:37 keithp Exp $ */
#include <stdio.h>
#include "X.h"
......@@ -67,6 +67,7 @@ typedef struct _KdCardAttr {
CARD32 io;
CARD32 address[KD_MAX_CARD_ADDRESS];
int naddr;
int bus;
} KdCardAttr;
typedef struct _KdCardInfo {
......@@ -612,3 +613,6 @@ KdFrameBufferValid (CARD8 *base, int size);
int
KdFrameBufferSize (CARD8 *base, int max);
/* function prototypes to be imlpemented by the drivers */
void
InitCard (char *name);
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.11 2000/12/08 21:40:02 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.12 2001/01/23 06:25:05 keithp Exp $ */
#include "kdrive.h"
#include "inputstr.h"
......@@ -48,8 +48,8 @@ static Bool kdInputEnabled;
static Bool kdOffScreen;
static unsigned long kdOffScreenTime;
static KdMouseMatrix kdMouseMatrix = {
1, 0, 0,
0, 1, 0
{ { 1, 0, 0 },
{ 0, 1, 0 } }
};
#ifdef TOUCHSCREEN
......@@ -403,29 +403,29 @@ KdInitAutoRepeats (void)
}
const KdKeySymModsRec kdKeySymMods[] = {
XK_Control_L, ControlMask,
XK_Control_R, ControlMask,
XK_Shift_L, ShiftMask,
XK_Shift_R, ShiftMask,
XK_Caps_Lock, LockMask,
XK_Shift_Lock, LockMask,
XK_Alt_L, Mod1Mask,
XK_Alt_R, Mod1Mask,
XK_Meta_L, Mod1Mask,
XK_Meta_R, Mod1Mask,
XK_Num_Lock, Mod2Mask,
XK_Super_L, Mod3Mask,
XK_Super_R, Mod3Mask,
XK_Hyper_L, Mod3Mask,
XK_Hyper_R, Mod3Mask,
XK_Mode_switch, Mod4Mask,
{ XK_Control_L, ControlMask },
{ XK_Control_R, ControlMask },
{ XK_Shift_L, ShiftMask },
{ XK_Shift_R, ShiftMask },
{ XK_Caps_Lock, LockMask },
{ XK_Shift_Lock, LockMask },
{ XK_Alt_L, Mod1Mask },
{ XK_Alt_R, Mod1Mask },
{ XK_Meta_L, Mod1Mask },
{ XK_Meta_R, Mod1Mask },
{ XK_Num_Lock, Mod2Mask },
{ XK_Super_L, Mod3Mask },
{ XK_Super_R, Mod3Mask },
{ XK_Hyper_L, Mod3Mask },
{ XK_Hyper_R, Mod3Mask },
{ XK_Mode_switch, Mod4Mask },
#ifdef TOUCHSCREEN
/* PDA specific hacks */
XF86XK_Start, ControlMask,
XK_Menu, ShiftMask,
XK_telephone, Mod1Mask,
XF86XK_AudioRecord, Mod2Mask,
XF86XK_Calendar, Mod3Mask,
{ XF86XK_Start, ControlMask },
{ XK_Menu, ShiftMask },
{ XK_telephone, Mod1Mask },
{ XF86XK_AudioRecord, Mod2Mask },
{ XF86XK_Calendar, Mod3Mask }
#endif
};
......@@ -787,6 +787,7 @@ int kdEmulationDx, kdEmulationDy;
#define EventX(e) ((e)->u.keyButtonPointer.rootX)
#define EventY(e) ((e)->u.keyButtonPointer.rootY)
int
KdInsideEmulationWindow (xEvent *ev)
{
if (ev->u.keyButtonPointer.pad1)
......@@ -829,6 +830,7 @@ KdClassifyInput (xEvent *ev)
default:
return keyboard;
}
return keyboard;
}
#ifndef NDEBUG
......
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.5 2000/12/08 23:04:56 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.6 2000/12/13 18:06:54 keithp Exp $ */
#include "kdrive.h"
......@@ -38,6 +38,8 @@
#include <asm/mtrr.h>
#endif
#include <sys/ioctl.h>
void *
KdMapDevice (CARD32 addr, CARD32 size)
{
......
/*
* $XFree86$
* $XFree86: xc/programs/Xserver/hw/kdrive/kmode.c,v 1.5 2000/05/24 23:57:56 keithp Exp $
*
* Copyright 1999 SuSE, Inc.
*
......@@ -41,6 +41,14 @@ const KdMonitorTiming kdMonitorTimings[] = {
36, 108, 216, KdSyncNegative, /* 37.927 */
1, 42, 46, KdSyncPositive, /* 85.039 */
},
/* Modeline "720x576" 29.000 720 736 800 880 576 577 580 625 */
{
720, 576, 52, 32954, /* PAL Video */
16, 80, 160, KdSyncPositive, /* 32.954 */
1, 45, 49, KdSyncPositive, /* 52.727 */
},
/* 640x480 modes */
{ 640, 480, 85, 36000, /* VESA */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment