Merge branch 'master' of ssh+git://sandmann@git.freedesktop.org/git/xorg/xserver
This commit is contained in:
commit
b6a7c0112c
|
@ -16,7 +16,7 @@
|
|||
<!-- If we're using Linux, we use evdev by default (falling back to
|
||||
keyboard otherwise). -->
|
||||
<merge key="input.x11_driver" type="string">keyboard</merge>
|
||||
<merge key="input.xkb.model" type="string">keyboard</merge>
|
||||
<merge key="input.xkb.model" type="string">pc105</merge>
|
||||
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
|
||||
string="Linux">
|
||||
<merge key="input.x11_driver" type="string">evdev</merge>
|
||||
|
|
|
@ -597,6 +597,7 @@ XTRANS_CONNECTION_FLAGS
|
|||
|
||||
# Secure RPC detection macro from xtrans.m4
|
||||
XTRANS_SECURE_RPC_FLAGS
|
||||
AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes])
|
||||
|
||||
AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
|
||||
AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
|
||||
|
|
|
@ -382,19 +382,19 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
|
|||
ExaMigrationRec pixmaps[1];
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
fb = pExaPixmap->sys_ptr;
|
||||
|
||||
/* Try to avoid framebuffer readbacks */
|
||||
if (exaPixmapIsOffscreen(pPixmap)) {
|
||||
if (!miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box)) {
|
||||
fb = pExaPixmap->sys_ptr;
|
||||
} else {
|
||||
need_finish = TRUE;
|
||||
fb = pPixmap->devPrivate.ptr;
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
if (exaPixmapIsOffscreen(pPixmap) &&
|
||||
miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box))
|
||||
{
|
||||
need_finish = TRUE;
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
fb = pPixmap->devPrivate.ptr;
|
||||
}
|
||||
|
||||
switch (pPixmap->drawable.bitsPerPixel) {
|
||||
|
|
|
@ -114,6 +114,18 @@ extern DeviceAssocRec mouse_assoc;
|
|||
|
||||
static char *fontPath = NULL;
|
||||
|
||||
static ModuleDefault ModuleDefaults[] = {
|
||||
{.name = "extmod", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "glx", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "freetype", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "type1", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "record", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "dri", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = NULL, .toLoad = FALSE, .load_opt=NULL}
|
||||
};
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
static Bool configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen,
|
||||
int scrnum, MessageType from);
|
||||
|
|
|
@ -54,17 +54,6 @@ typedef struct _ModuleDefault {
|
|||
XF86OptionPtr load_opt;
|
||||
} ModuleDefault;
|
||||
|
||||
static ModuleDefault ModuleDefaults[] = {
|
||||
{.name = "extmod", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "glx", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "freetype", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "type1", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "record", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "dri", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = NULL, .toLoad = FALSE, .load_opt=NULL}
|
||||
};
|
||||
|
||||
/*
|
||||
* prototypes
|
||||
*/
|
||||
|
|
|
@ -1203,6 +1203,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
|||
SYMFUNC(xf86_show_cursors)
|
||||
SYMFUNC(xf86_hide_cursors)
|
||||
SYMFUNC(xf86_cursors_fini)
|
||||
SYMFUNC(xf86_crtc_clip_video_helper)
|
||||
|
||||
SYMFUNC(xf86DoEDID_DDC1)
|
||||
SYMFUNC(xf86DoEDID_DDC2)
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
#include "picturestr.h"
|
||||
#endif
|
||||
|
||||
#include "xf86xv.h"
|
||||
|
||||
/*
|
||||
* Initialize xf86CrtcConfig structure
|
||||
*/
|
||||
|
@ -2144,3 +2146,119 @@ xf86ConnectorGetName(xf86ConnectorType connector)
|
|||
{
|
||||
return _xf86ConnectorNames[connector];
|
||||
}
|
||||
|
||||
static void
|
||||
x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
|
||||
{
|
||||
dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1;
|
||||
dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2;
|
||||
dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1;
|
||||
dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2;
|
||||
|
||||
if (dest->x1 >= dest->x2 || dest->y1 >= dest->y2)
|
||||
dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
|
||||
{
|
||||
if (crtc->enabled) {
|
||||
crtc_box->x1 = crtc->x;
|
||||
crtc_box->x2 = crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation);
|
||||
crtc_box->y1 = crtc->y;
|
||||
crtc_box->y2 = crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation);
|
||||
} else
|
||||
crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
xf86_crtc_box_area(BoxPtr box)
|
||||
{
|
||||
return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the crtc covering 'box'. If two crtcs cover a portion of
|
||||
* 'box', then prefer 'desired'. If 'desired' is NULL, then prefer the crtc
|
||||
* with greater coverage
|
||||
*/
|
||||
|
||||
static xf86CrtcPtr
|
||||
xf86_covering_crtc(ScrnInfoPtr pScrn,
|
||||
BoxPtr box,
|
||||
xf86CrtcPtr desired,
|
||||
BoxPtr crtc_box_ret)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
xf86CrtcPtr crtc, best_crtc;
|
||||
int coverage, best_coverage;
|
||||
int c;
|
||||
BoxRec crtc_box, cover_box;
|
||||
|
||||
best_crtc = NULL;
|
||||
best_coverage = 0;
|
||||
crtc_box_ret->x1 = 0;
|
||||
crtc_box_ret->x2 = 0;
|
||||
crtc_box_ret->y1 = 0;
|
||||
crtc_box_ret->y2 = 0;
|
||||
for (c = 0; c < xf86_config->num_crtc; c++) {
|
||||
crtc = xf86_config->crtc[c];
|
||||
x86_crtc_box(crtc, &crtc_box);
|
||||
x86_crtc_box_intersect(&cover_box, &crtc_box, box);
|
||||
coverage = xf86_crtc_box_area(&cover_box);
|
||||
if (coverage && crtc == desired) {
|
||||
*crtc_box_ret = crtc_box;
|
||||
return crtc;
|
||||
} else if (coverage > best_coverage) {
|
||||
*crtc_box_ret = crtc_box;
|
||||
best_crtc = crtc;
|
||||
best_coverage = coverage;
|
||||
}
|
||||
}
|
||||
return best_crtc;
|
||||
}
|
||||
|
||||
/*
|
||||
* For overlay video, compute the relevant CRTC and
|
||||
* clip video to that
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
|
||||
xf86CrtcPtr *crtc_ret,
|
||||
xf86CrtcPtr desired_crtc,
|
||||
BoxPtr dst,
|
||||
INT32 *xa,
|
||||
INT32 *xb,
|
||||
INT32 *ya,
|
||||
INT32 *yb,
|
||||
RegionPtr reg,
|
||||
INT32 width,
|
||||
INT32 height)
|
||||
{
|
||||
Bool ret;
|
||||
RegionRec crtc_region_local;
|
||||
RegionPtr crtc_region = reg;
|
||||
|
||||
if (crtc_ret) {
|
||||
BoxRec crtc_box;
|
||||
xf86CrtcPtr crtc = xf86_covering_crtc(pScrn, dst,
|
||||
desired_crtc,
|
||||
&crtc_box);
|
||||
|
||||
if (crtc) {
|
||||
REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
|
||||
crtc_region = &crtc_region_local;
|
||||
REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
|
||||
}
|
||||
*crtc_ret = crtc;
|
||||
}
|
||||
|
||||
ret = xf86XVClipVideoHelper(dst, xa, xb, ya, yb,
|
||||
crtc_region, width, height);
|
||||
|
||||
if (crtc_region != reg)
|
||||
REGION_UNINIT (pScreen, &crtc_region_local);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -765,5 +765,24 @@ xf86_hide_cursors (ScrnInfoPtr scrn);
|
|||
*/
|
||||
void
|
||||
xf86_cursors_fini (ScreenPtr screen);
|
||||
|
||||
/*
|
||||
* For overlay video, compute the relevant CRTC and
|
||||
* clip video to that.
|
||||
* wraps xf86XVClipVideoHelper()
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
|
||||
xf86CrtcPtr *crtc_ret,
|
||||
xf86CrtcPtr desired_crtc,
|
||||
BoxPtr dst,
|
||||
INT32 *xa,
|
||||
INT32 *xb,
|
||||
INT32 *ya,
|
||||
INT32 *yb,
|
||||
RegionPtr reg,
|
||||
INT32 width,
|
||||
INT32 height);
|
||||
|
||||
#endif /* _XF86CRTC_H_ */
|
||||
|
|
|
@ -447,7 +447,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
++cursor->refcnt;
|
||||
|
||||
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||
cursor->bits->height> cursor_info->MaxHeight)
|
||||
|
@ -463,7 +466,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
++cursor->refcnt;
|
||||
|
||||
/* Make sure ARGB support is available */
|
||||
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
|
||||
|
@ -632,4 +638,9 @@ xf86_cursors_fini (ScreenPtr screen)
|
|||
xfree (xf86_config->cursor_image);
|
||||
xf86_config->cursor_image = NULL;
|
||||
}
|
||||
if (xf86_config->cursor)
|
||||
{
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
|||
randrp->virtualX = pScrn->virtualX;
|
||||
randrp->virtualY = pScrn->virtualY;
|
||||
}
|
||||
if (pRoot)
|
||||
if (pRoot && pScrn->vtSema)
|
||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
|
||||
|
||||
/* Let the driver update virtualX and virtualY */
|
||||
|
@ -363,7 +363,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
|||
xf86SetViewport (pScreen, 0, 0);
|
||||
|
||||
finish:
|
||||
if (pRoot)
|
||||
if (pRoot && pScrn->vtSema)
|
||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
||||
#if RANDR_12_INTERFACE
|
||||
if (WindowTable[pScreen->myNum] && ret)
|
||||
|
|
|
@ -83,7 +83,7 @@ static const char *mouseDevs[] = {
|
|||
DEFAULT_PS2_DEV,
|
||||
NULL
|
||||
};
|
||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
#elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
|
||||
/* Only wsmouse mices are autoconfigured for now on OpenBSD */
|
||||
#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse"
|
||||
#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0"
|
||||
|
@ -154,7 +154,7 @@ DefaultProtocol(void)
|
|||
{
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
return "Auto";
|
||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
#elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
|
||||
return "WSMouse";
|
||||
#else
|
||||
return NULL;
|
||||
|
@ -340,7 +340,7 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
#if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
|
||||
|
||||
/* Only support wsmouse configuration for now */
|
||||
static const char *
|
||||
|
@ -381,7 +381,7 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
}
|
||||
return *pdev;
|
||||
}
|
||||
#endif /* __OpenBSD__ && WSCONS_SUPPORT */
|
||||
#endif /* __OpenBSD__ || __NetBSD__ && WSCONS_SUPPORT */
|
||||
|
||||
#ifdef WSCONS_SUPPORT
|
||||
#define NUMEVENTS 64
|
||||
|
@ -779,11 +779,11 @@ xf86OSMouseInit(int flags)
|
|||
p->SetBMRes = SetSysMouseRes;
|
||||
p->SetMiscRes = SetSysMouseRes;
|
||||
#endif
|
||||
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
#if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
|
||||
p->SetupAuto = SetupAuto;
|
||||
p->SetMiscRes = SetMouseRes;
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
|
||||
p->FindDevice = FindDevice;
|
||||
#endif
|
||||
p->PreInit = bsdMousePreInit;
|
||||
|
|
|
@ -11,7 +11,7 @@ PLATFORM_PCI_SUPPORT = \
|
|||
$(srcdir)/lnx_axp.c \
|
||||
$(srcdir)/../shared/xf86Axp.c
|
||||
|
||||
liblinuxev56_la_CFLAGS = -mcpu=ev56
|
||||
liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56
|
||||
|
||||
liblinuxev56_la_SOURCES = lnx_ev56.c
|
||||
endif
|
||||
|
|
|
@ -411,7 +411,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
|||
# ifndef JENSEN_SUPPORT
|
||||
FatalError("Jensen is not supported any more\n"
|
||||
"If you are intereseted in fixing Jensen support\n"
|
||||
"please contact xfree86@xfree86.org\n");
|
||||
"please contact xorg@lists.freedesktop.org\n");
|
||||
# else
|
||||
xf86Msg(X_INFO,"Machine type is Jensen\n");
|
||||
pVidMem->mapMem = mapVidMemJensen;
|
||||
|
|
|
@ -282,6 +282,9 @@
|
|||
/* Support MIT-SCREEN-SAVER extension */
|
||||
#undef SCREENSAVER
|
||||
|
||||
/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
|
||||
#undef SECURE_RPC
|
||||
|
||||
/* Use a lock to prevent multiple servers on a display */
|
||||
#undef SERVER_LOCK
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la
|
|||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
# FIXME: Add support for these in configure.ac
|
||||
SECURERPC_SRCS = rpcauth.c
|
||||
INTERNALMALLOC_SRCS = xalloc.c
|
||||
|
||||
SECURERPC_SRCS = rpcauth.c
|
||||
XCSECURITY_SRCS = secauth.c
|
||||
XDMCP_SRCS = xdmcp.c
|
||||
STRLCAT_SRCS = strlcat.c strlcpy.c
|
||||
|
@ -28,6 +28,10 @@ libos_la_SOURCES = \
|
|||
xprintf.c \
|
||||
$(XORG_SRCS)
|
||||
|
||||
if SECURE_RPC
|
||||
libos_la_SOURCES += $(SECURERPC_SRCS)
|
||||
endif
|
||||
|
||||
if XCSECURITY
|
||||
libos_la_SOURCES += $(XCSECURITY_SRCS)
|
||||
endif
|
||||
|
|
16
os/rpcauth.c
16
os/rpcauth.c
|
@ -39,7 +39,7 @@ from The Open Group.
|
|||
#ifdef SECURE_RPC
|
||||
|
||||
#include <X11/X.h>
|
||||
#include "Xauth.h"
|
||||
#include <X11/Xauth.h>
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "dixstruct.h"
|
||||
|
@ -135,7 +135,7 @@ CheckNetName (
|
|||
|
||||
static char rpc_error[MAXNETNAMELEN+50];
|
||||
|
||||
XID
|
||||
_X_HIDDEN XID
|
||||
SecureRPCCheck (unsigned short data_length, char *data,
|
||||
ClientPtr client, char **reason)
|
||||
{
|
||||
|
@ -159,14 +159,14 @@ SecureRPCCheck (unsigned short data_length, char *data,
|
|||
return (XID) ~0L;
|
||||
}
|
||||
|
||||
void
|
||||
_X_HIDDEN void
|
||||
SecureRPCInit (void)
|
||||
{
|
||||
if (rpc_id == ~0L)
|
||||
AddAuthorization (9, "SUN-DES-1", 0, (char *) 0);
|
||||
}
|
||||
|
||||
int
|
||||
_X_HIDDEN int
|
||||
SecureRPCAdd (unsigned short data_length, char *data, XID id)
|
||||
{
|
||||
if (data_length)
|
||||
|
@ -175,26 +175,26 @@ SecureRPCAdd (unsigned short data_length, char *data, XID id)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
_X_HIDDEN int
|
||||
SecureRPCReset (void)
|
||||
{
|
||||
rpc_id = (XID) ~0L;
|
||||
return 1;
|
||||
}
|
||||
|
||||
XID
|
||||
_X_HIDDEN XID
|
||||
SecureRPCToID (unsigned short data_length, char *data)
|
||||
{
|
||||
return rpc_id;
|
||||
}
|
||||
|
||||
int
|
||||
_X_HIDDEN int
|
||||
SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_X_HIDDEN int
|
||||
SecureRPCRemove (unsigned short data_length, char *data)
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user