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
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
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 =

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