work on xorg driver

ulab-next
Jay Sorg 12 years ago
parent 39b749e09d
commit 0ff197f30c

@ -7,5 +7,9 @@ to run it
create /etc/X11/xrdp create /etc/X11/xrdp
copy xorg.conf into it copy xorg.conf into it
Xorg -config xrdp/xorg.conf -logfile /tmp/Xjay.log -novtswitch -sharevts -noreset :10 copy xrdpdev_drv.so to /usr/lib/xorg/modules/drivers
copy libxorgxrdp.so to /usr/lib/xorg/modules
strat xserver like this
Xorg -modulepath /usr/lib/xorg/modules -config xrdp/xorg.conf -logfile /tmp/Xjay.log -novtswitch -sharevts -noreset -nohwaccess -ac :10

@ -1,7 +1,7 @@
OBJS = xrdpdev.o OBJS = xrdpdev.o
CFLAGS = -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 -I../module CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 -I../module
LDFLAGS = LDFLAGS =

@ -41,6 +41,7 @@ This is the main driver file
#include "rdpPri.h" #include "rdpPri.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpGC.h" #include "rdpGC.h"
#include "rdpCursor.h"
#define XRDP_DRIVER_NAME "XRDPDEV" #define XRDP_DRIVER_NAME "XRDPDEV"
#define XRDP_NAME "XRDPDEV" #define XRDP_NAME "XRDPDEV"
@ -144,6 +145,8 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
return 0; return 0;
} }
rdpPrivateInit();
rdpAllocRec(pScrn); rdpAllocRec(pScrn);
dev = XRDPPTR(pScrn); dev = XRDPPTR(pScrn);
@ -254,24 +257,22 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
return 1; return 1;
} }
#if 0
static miPointerSpriteFuncRec g_rdpSpritePointerFuncs = static miPointerSpriteFuncRec g_rdpSpritePointerFuncs =
{ {
/* these are in viv_cur.c */ /* these are in rdpCursor.c */
rdpSpriteRealizeCursor, rdpSpriteRealizeCursor,
rdpSpriteUnrealizeCursor, rdpSpriteUnrealizeCursor,
rdpSpriteSetCursor, rdpSpriteSetCursor,
rdpSpriteMoveCursor, rdpSpriteMoveCursor,
rdpDeviceCursorInitialize, rdpSpriteDeviceCursorInitialize,
rdpDeviceCursorCleanup rdpSpriteDeviceCursorCleanup
}; };
#endif
/******************************************************************************/ /******************************************************************************/
static Bool static Bool
rdpSaveScreen(ScreenPtr pScreen, int on) rdpSaveScreen(ScreenPtr pScreen, int on)
{ {
LLOGLN(10, ("rdpSaveScreen:")); LLOGLN(0, ("rdpSaveScreen:"));
return 1; return 1;
} }
@ -284,18 +285,18 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
VisualPtr vis; VisualPtr vis;
int vis_found; int vis_found;
rdpPrivateInit();
pScrn = xf86Screens[scrnIndex]; pScrn = xf86Screens[scrnIndex];
dev = XRDPPTR(pScrn); dev = XRDPPTR(pScrn);
dev->pScreen = pScreen;
miClearVisualTypes(); miClearVisualTypes();
miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
pScrn->rgbBits, TrueColor); pScrn->rgbBits, TrueColor);
miSetPixmapDepths(); miSetPixmapDepths();
LLOGLN(0, ("rdpScreenInit: virtualX %d virtualY %d", LLOGLN(0, ("rdpScreenInit: virtualX %d virtualY %d",
pScrn->virtualX, pScrn->virtualY)); pScrn->virtualX, pScrn->virtualY));
dev->ptr = malloc(1024 * 768 * 4); dev->ptr = malloc(dev->width * dev->height * 4);
if (!fbScreenInit(pScreen, dev->ptr, pScrn->virtualX, pScrn->virtualY, if (!fbScreenInit(pScreen, dev->ptr, pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
pScrn->bitsPerPixel)) pScrn->bitsPerPixel))
@ -331,10 +332,16 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86SetBlackWhitePixels(pScreen); xf86SetBlackWhitePixels(pScreen);
xf86SetBackingStore(pScreen); xf86SetBackingStore(pScreen);
#if 1
/* hardware cursor */ /* hardware cursor */
//dev->pCursorFuncs = xf86GetPointerScreenFuncs(); dev->pCursorFuncs = xf86GetPointerScreenFuncs();
//miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs, miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs,
// dev->pCursorFuncs, 0); dev->pCursorFuncs, 0);
#else
/* software cursor */
dev->pCursorFuncs = xf86GetPointerScreenFuncs();
miDCInitialize(pScreen, dev->pCursorFuncs);
#endif
fbCreateDefColormap(pScreen); fbCreateDefColormap(pScreen);
@ -358,7 +365,7 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
} }
dev->privateKeyRecGC = rdpAllocateGCPrivate(pScreen, sizeof(rdpGCRec)); dev->privateKeyRecGC = rdpAllocateGCPrivate(pScreen, sizeof(rdpGCRec));
dev->privateKeyRecPixmap =rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec)); dev->privateKeyRecPixmap = rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec));
dev->CopyWindow = pScreen->CopyWindow; dev->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = rdpCopyWindow; pScreen->CopyWindow = rdpCopyWindow;
@ -488,8 +495,18 @@ rdpAvailableOptions(int chipid, int busid)
static Bool static Bool
rdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr) rdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
{ {
LLOGLN(0, ("rdpDriverFunc:")); xorgHWFlags *flags;
return 0; int rv;
rv = 0;
LLOGLN(0, ("rdpDriverFunc: op %d", (int)op));
if (op == GET_REQUIRED_HW_INTERFACES)
{
flags = (xorgHWFlags *) ptr;
*flags = HW_SKIP_CONSOLE;
rv = 1;
}
return rv;
} }
/*****************************************************************************/ /*****************************************************************************/

Loading…
Cancel
Save