mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-03 00:00:10 +01:00
Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple
This commit is contained in:
commit
7c85430f74
12 changed files with 87 additions and 144 deletions
17
Xext/dpms.c
17
Xext/dpms.c
|
|
@ -217,19 +217,10 @@ ProcDPMSForceLevel(client)
|
|||
if (!DPMSEnabled)
|
||||
return BadMatch;
|
||||
|
||||
if (stuff->level == DPMSModeOn) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis();
|
||||
} else if (stuff->level == DPMSModeStandby) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSStandbyTime;
|
||||
} else if (stuff->level == DPMSModeSuspend) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSSuspendTime;
|
||||
} else if (stuff->level == DPMSModeOff) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSOffTime;
|
||||
} else {
|
||||
if (stuff->level != DPMSModeOn &&
|
||||
stuff->level != DPMSModeStandby &&
|
||||
stuff->level != DPMSModeSuspend &&
|
||||
stuff->level != DPMSModeOff) {
|
||||
client->errorValue = stuff->level;
|
||||
return BadValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ dnl
|
|||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xorg-server], 1.6.3-apple1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_INIT([xorg-server], 1.6.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RELEASE_DATE="2009-8-31"
|
||||
RELEASE_DATE="2009-9-27"
|
||||
|
||||
dnl this gets generated by autoheader, and thus contains all the defines. we
|
||||
dnl don't ever actually use it, internally.
|
||||
|
|
|
|||
|
|
@ -1815,6 +1815,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error)
|
|||
int
|
||||
SetDefaultFontPath(char *path)
|
||||
{
|
||||
char *temp_path,
|
||||
*start,
|
||||
*end;
|
||||
unsigned char *cp,
|
||||
*pp,
|
||||
*nump,
|
||||
|
|
@ -1825,12 +1828,31 @@ SetDefaultFontPath(char *path)
|
|||
size = 0,
|
||||
bad;
|
||||
|
||||
/* ensure temp_path contains "built-ins" */
|
||||
start = path;
|
||||
while (1) {
|
||||
start = strstr(start, "built-ins");
|
||||
if (start == NULL)
|
||||
break;
|
||||
end = start + strlen("built-ins");
|
||||
if ((start == path || start[-1] == ',') && (!*end || *end == ','))
|
||||
break;
|
||||
start = end;
|
||||
}
|
||||
if (!start) {
|
||||
temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
|
||||
} else {
|
||||
temp_path = Xstrdup(path);
|
||||
}
|
||||
if (!temp_path)
|
||||
return BadAlloc;
|
||||
|
||||
/* get enough for string, plus values -- use up commas */
|
||||
len = strlen(path) + 1;
|
||||
nump = cp = newpath = (unsigned char *) xalloc(len);
|
||||
len = strlen(temp_path) + 1;
|
||||
nump = cp = newpath = xalloc(len);
|
||||
if (!newpath)
|
||||
return BadAlloc;
|
||||
pp = (unsigned char *) path;
|
||||
pp = (unsigned char *) temp_path;
|
||||
cp++;
|
||||
while (*pp) {
|
||||
if (*pp == ',') {
|
||||
|
|
@ -1849,6 +1871,7 @@ SetDefaultFontPath(char *path)
|
|||
err = SetFontPathElements(num, newpath, &bad, TRUE);
|
||||
|
||||
xfree(newpath);
|
||||
xfree(temp_path);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ static EventListPtr
|
|||
updateFromMaster(EventListPtr events, DeviceIntPtr dev, int *num_events)
|
||||
{
|
||||
DeviceIntPtr master = dev->u.master;
|
||||
if (master && master->u.lastSlave != dev)
|
||||
if (master && master->u.lastSlave != dev && dev->coreEvents)
|
||||
{
|
||||
updateSlaveDeviceCoords(master, dev);
|
||||
master->u.lastSlave = dev;
|
||||
|
|
@ -674,7 +674,7 @@ positionSprite(DeviceIntPtr dev, int *x, int *y,
|
|||
* to the current screen. */
|
||||
miPointerSetPosition(dev, &dev->last.valuators[0], &dev->last.valuators[1]);
|
||||
|
||||
if (dev->u.master) {
|
||||
if (dev->u.master && dev->coreEvents) {
|
||||
dev->u.master->last.valuators[0] = dev->last.valuators[0];
|
||||
dev->u.master->last.valuators[1] = dev->last.valuators[1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,22 +612,6 @@ configFiles(XF86ConfFilesPtr fileconf)
|
|||
pathFrom = X_DEFAULT;
|
||||
temp_path = defaultFontPath ? defaultFontPath : "";
|
||||
|
||||
/* ensure defaultFontPath contains "built-ins" */
|
||||
start = strstr(temp_path, "built-ins");
|
||||
end = start + strlen("built-ins");
|
||||
if (start == NULL ||
|
||||
!((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) {
|
||||
defaultFontPath = Xprintf("%s%sbuilt-ins",
|
||||
temp_path, *temp_path ? "," : "");
|
||||
if (must_copy == TRUE) {
|
||||
if (defaultFontPath != NULL) {
|
||||
must_copy = FALSE;
|
||||
}
|
||||
} else {
|
||||
/* already made a copy of the font path */
|
||||
xfree(temp_path);
|
||||
}
|
||||
}
|
||||
/* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
|
||||
temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath;
|
||||
defaultFontPath = xf86ValidateFontPath(temp_path);
|
||||
|
|
|
|||
|
|
@ -190,10 +190,18 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
|
|||
int need_fake_front = 0;
|
||||
int have_fake_front = 0;
|
||||
int front_format = 0;
|
||||
const int dimensions_match = (pDraw->width == pPriv->width)
|
||||
&& (pDraw->height == pPriv->height);
|
||||
int dimensions_match;
|
||||
int i;
|
||||
|
||||
if (!pPriv) {
|
||||
*width = pDraw->width;
|
||||
*height = pDraw->height;
|
||||
*out_count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dimensions_match = (pDraw->width == pPriv->width)
|
||||
&& (pDraw->height == pPriv->height);
|
||||
|
||||
buffers = xalloc((count + 1) * sizeof(buffers[0]));
|
||||
|
||||
|
|
|
|||
|
|
@ -317,7 +317,13 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
|
|||
pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
|
||||
|
||||
fd = open(filename, O_RDONLY, 0);
|
||||
if (fd != -1) {
|
||||
if (fd < 0) {
|
||||
sprintf(filename,
|
||||
"/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d",
|
||||
pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
|
||||
fd = open(filename, O_RDONLY, 0);
|
||||
}
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
sprintf(filename, "/dev/fb%d", i);
|
||||
|
||||
|
|
|
|||
|
|
@ -768,6 +768,9 @@ xf86CrtcScreenInit (ScreenPtr screen)
|
|||
config->CloseScreen = screen->CloseScreen;
|
||||
screen->CloseScreen = xf86CrtcCloseScreen;
|
||||
|
||||
#ifdef XFreeXDGA
|
||||
xf86DiDGAInit(screen, 0);
|
||||
#endif
|
||||
#ifdef RANDR_13_INTERFACE
|
||||
return RANDR_INTERFACE_VERSION;
|
||||
#else
|
||||
|
|
@ -1881,6 +1884,10 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
|
|||
}
|
||||
}
|
||||
scrn->currentMode = scrn->modes;
|
||||
#ifdef XFreeXDGA
|
||||
if (scrn->pScreen)
|
||||
xf86DiDGAReInit(scrn->pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ xf86_dga_get_modes (ScreenPtr pScreen)
|
|||
mode = modes + num++;
|
||||
|
||||
mode->mode = display_mode;
|
||||
mode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE;
|
||||
mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
|
||||
mode->flags = DGA_CONCURRENT_ACCESS;
|
||||
if (display_mode->Flags & V_DBLSCAN)
|
||||
mode->flags |= DGA_DOUBLESCAN;
|
||||
if (display_mode->Flags & V_INTERLACE)
|
||||
|
|
@ -91,14 +90,14 @@ xf86_dga_get_modes (ScreenPtr pScreen)
|
|||
mode->yViewportStep = 1;
|
||||
mode->viewportFlags = DGA_FLIP_RETRACE;
|
||||
mode->offset = 0;
|
||||
mode->address = (unsigned char *) xf86_config->dga_address;
|
||||
mode->bytesPerScanline = xf86_config->dga_stride;
|
||||
mode->imageWidth = xf86_config->dga_width;
|
||||
mode->imageHeight = xf86_config->dga_height;
|
||||
mode->address = 0;
|
||||
mode->imageWidth = mode->viewportWidth;
|
||||
mode->imageHeight = mode->viewportHeight;
|
||||
mode->bytesPerScanline = (mode->imageWidth * scrn->bitsPerPixel) >> 3;
|
||||
mode->pixmapWidth = mode->imageWidth;
|
||||
mode->pixmapHeight = mode->imageHeight;
|
||||
mode->maxViewportX = mode->imageWidth - mode->viewportWidth;
|
||||
mode->maxViewportY = mode->imageHeight - mode->viewportHeight;
|
||||
mode->maxViewportX = 0;
|
||||
mode->maxViewportY = 0;
|
||||
|
||||
display_mode = display_mode->next;
|
||||
if (display_mode == scrn->modes)
|
||||
|
|
@ -148,94 +147,12 @@ xf86_dga_set_viewport(ScrnInfoPtr scrn, int x, int y, int flags)
|
|||
scrn->AdjustFrame(scrn->pScreen->myNum, x, y, flags);
|
||||
}
|
||||
|
||||
static Bool
|
||||
xf86_dga_get_drawable_and_gc (ScrnInfoPtr scrn, DrawablePtr *ppDrawable, GCPtr *ppGC)
|
||||
{
|
||||
ScreenPtr pScreen = scrn->pScreen;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
PixmapPtr pPixmap;
|
||||
GCPtr pGC;
|
||||
|
||||
pPixmap = GetScratchPixmapHeader (pScreen, xf86_config->dga_width, xf86_config->dga_height,
|
||||
scrn->depth, scrn->bitsPerPixel, xf86_config->dga_stride,
|
||||
(char *) scrn->memPhysBase + scrn->fbOffset);
|
||||
if (!pPixmap)
|
||||
return FALSE;
|
||||
pGC = GetScratchGC (scrn->depth, pScreen);
|
||||
if (!pGC)
|
||||
{
|
||||
FreeScratchPixmapHeader (pPixmap);
|
||||
return FALSE;
|
||||
}
|
||||
*ppDrawable = &pPixmap->drawable;
|
||||
*ppGC = pGC;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_dga_release_drawable_and_gc (ScrnInfoPtr scrn, DrawablePtr pDrawable, GCPtr pGC)
|
||||
{
|
||||
FreeScratchGC (pGC);
|
||||
FreeScratchPixmapHeader ((PixmapPtr) pDrawable);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_dga_fill_rect(ScrnInfoPtr scrn, int x, int y, int w, int h, unsigned long color)
|
||||
{
|
||||
GCPtr pGC;
|
||||
DrawablePtr pDrawable;
|
||||
XID vals[1];
|
||||
xRectangle r;
|
||||
|
||||
if (!xf86_dga_get_drawable_and_gc (scrn, &pDrawable, &pGC))
|
||||
return;
|
||||
vals[0] = color;
|
||||
ChangeGC (pGC, GCForeground, vals);
|
||||
ValidateGC (pDrawable, pGC);
|
||||
r.x = x;
|
||||
r.y = y;
|
||||
r.width = w;
|
||||
r.height = h;
|
||||
pGC->ops->PolyFillRect (pDrawable, pGC, 1, &r);
|
||||
xf86_dga_release_drawable_and_gc (scrn, pDrawable, pGC);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_dga_sync(ScrnInfoPtr scrn)
|
||||
{
|
||||
ScreenPtr pScreen = scrn->pScreen;
|
||||
WindowPtr pRoot = WindowTable [pScreen->myNum];
|
||||
char buffer[4];
|
||||
|
||||
pScreen->GetImage (&pRoot->drawable, 0, 0, 1, 1, ZPixmap, ~0L, buffer);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_dga_blit_rect(ScrnInfoPtr scrn, int srcx, int srcy, int w, int h, int dstx, int dsty)
|
||||
{
|
||||
DrawablePtr pDrawable;
|
||||
GCPtr pGC;
|
||||
|
||||
if (!xf86_dga_get_drawable_and_gc (scrn, &pDrawable, &pGC))
|
||||
return;
|
||||
ValidateGC (pDrawable, pGC);
|
||||
pGC->ops->CopyArea (pDrawable, pDrawable, pGC, srcx, srcy, w, h, dstx, dsty);
|
||||
xf86_dga_release_drawable_and_gc (scrn, pDrawable, pGC);
|
||||
}
|
||||
|
||||
static Bool
|
||||
xf86_dga_open_framebuffer(ScrnInfoPtr scrn,
|
||||
char **name,
|
||||
unsigned char **mem, int *size, int *offset, int *flags)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
*size = xf86_config->dga_stride * xf86_config->dga_height;
|
||||
*mem = (unsigned char *) (xf86_config->dga_address);
|
||||
*offset = 0;
|
||||
*flags = DGA_NEED_ROOT;
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -249,9 +166,9 @@ static DGAFunctionRec xf86_dga_funcs = {
|
|||
xf86_dga_set_mode,
|
||||
xf86_dga_set_viewport,
|
||||
xf86_dga_get_viewport,
|
||||
xf86_dga_sync,
|
||||
xf86_dga_fill_rect,
|
||||
xf86_dga_blit_rect,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -261,6 +178,9 @@ xf86DiDGAReInit (ScreenPtr pScreen)
|
|||
ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
if (!DGAAvailable(pScreen->myNum))
|
||||
return TRUE;
|
||||
|
||||
if (!xf86_dga_get_modes (pScreen))
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -273,11 +193,14 @@ xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address)
|
|||
ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
if (DGAAvailable(pScreen->myNum))
|
||||
return TRUE;
|
||||
|
||||
xf86_config->dga_flags = 0;
|
||||
xf86_config->dga_address = dga_address;
|
||||
xf86_config->dga_width = scrn->virtualX;
|
||||
xf86_config->dga_height = scrn->virtualY;
|
||||
xf86_config->dga_stride = scrn->displayWidth * scrn->bitsPerPixel >> 3;
|
||||
xf86_config->dga_address = 0;
|
||||
xf86_config->dga_width = 0;
|
||||
xf86_config->dga_height = 0;
|
||||
xf86_config->dga_stride = 0;
|
||||
|
||||
if (!xf86_dga_get_modes (pScreen))
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
|
|
@ -460,7 +460,6 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
|
|||
{
|
||||
xf86ProbeOutputModes (scrp, 0, 0);
|
||||
xf86SetScrnInfoModes (scrp);
|
||||
xf86DiDGAReInit (pScreen);
|
||||
}
|
||||
|
||||
for (mode = scrp->modes; ; mode = mode->next)
|
||||
|
|
@ -1481,7 +1480,6 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations)
|
|||
return TRUE;
|
||||
xf86ProbeOutputModes (pScrn, 0, 0);
|
||||
xf86SetScrnInfoModes (pScrn);
|
||||
xf86DiDGAReInit (pScreen);
|
||||
return xf86RandR12SetInfo12 (pScreen);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ mieqProcessInputEvents(void)
|
|||
NewCurrentScreen (dev, DequeueScreen(dev), x, y);
|
||||
}
|
||||
else {
|
||||
if (master) {
|
||||
if (master && dev->coreEvents) {
|
||||
/* Force a copy of the key class into the VCK so that the layout
|
||||
is transferred. */
|
||||
if (event->u.u.type == DeviceKeyPress ||
|
||||
|
|
@ -472,7 +472,7 @@ mieqProcessInputEvents(void)
|
|||
/* process slave first, then master */
|
||||
dev->public.processInputProc(event, dev, nevents);
|
||||
|
||||
if (master)
|
||||
if (master && dev->coreEvents)
|
||||
master->public.processInputProc(masterEvents->event, master,
|
||||
nevents);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@
|
|||
#define UINT32_MAX 0xffffffffU
|
||||
#endif
|
||||
|
||||
#define SERVER_RENDER_MAJOR 0
|
||||
#define SERVER_RENDER_MINOR 10
|
||||
|
||||
static int ProcRenderQueryVersion (ClientPtr pClient);
|
||||
static int ProcRenderQueryPictFormats (ClientPtr pClient);
|
||||
static int ProcRenderQueryPictIndexValues (ClientPtr pClient);
|
||||
|
|
@ -271,8 +274,8 @@ ProcRenderQueryVersion (ClientPtr client)
|
|||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.majorVersion = RENDER_MAJOR;
|
||||
rep.minorVersion = RENDER_MINOR;
|
||||
rep.majorVersion = SERVER_RENDER_MAJOR;
|
||||
rep.minorVersion = SERVER_RENDER_MINOR;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue