mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 07:38:22 +02:00
Merge branch 'server-1.5-branch' into xorg-server-1.5-apple
This commit is contained in:
commit
12640de083
12 changed files with 116 additions and 92 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -8,11 +8,12 @@ Makefile.in
|
|||
*.a
|
||||
*.o
|
||||
*~
|
||||
.*.swp
|
||||
.*sw?
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
obj*
|
||||
build*
|
||||
local
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
compile
|
||||
|
|
|
|||
|
|
@ -1117,13 +1117,13 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
&driConfigs,
|
||||
screen);
|
||||
|
||||
screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
|
||||
|
||||
if (screen->driScreen == NULL) {
|
||||
LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed");
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
|
||||
|
||||
initializeExtensions(screen);
|
||||
|
||||
DRIGetTexOffsetFuncs(pScreen, &screen->texOffsetStart,
|
||||
|
|
|
|||
22
configure.ac
22
configure.ac
|
|
@ -313,6 +313,7 @@ case $host_cpu in
|
|||
case $host_os in
|
||||
*linux*) DEFAULT_INT10=vm86 ;;
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO) ;;
|
||||
*dragonfly*) AC_DEFINE(USE_DEV_IO) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL)
|
||||
SYS_LIBS=-li386
|
||||
;;
|
||||
|
|
@ -337,6 +338,7 @@ case $host_cpu in
|
|||
I386_VIDEO=yes
|
||||
case $host_os in
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
|
||||
*dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl])
|
||||
SYS_LIBS=-lx86_64
|
||||
;;
|
||||
|
|
@ -367,7 +369,7 @@ DRI2=no
|
|||
KDRIVE_HW=no
|
||||
dnl it would be nice to autodetect these *CONS_SUPPORTs
|
||||
case $host_os in
|
||||
*freebsd*)
|
||||
*freebsd* | *dragonfly*)
|
||||
case $host_os in
|
||||
kfreebsd*-gnu) ;;
|
||||
*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;;
|
||||
|
|
@ -705,6 +707,15 @@ if test "x$NEED_DBUS" = xyes; then
|
|||
fi
|
||||
CONFIG_LIB='$(top_builddir)/config/libconfig.a'
|
||||
|
||||
AC_MSG_CHECKING([for glibc...])
|
||||
AC_PREPROC_IFELSE([
|
||||
#include <features.h>
|
||||
#ifndef __GLIBC__
|
||||
#error
|
||||
#endif
|
||||
], glibc=yes, glibc=no)
|
||||
AC_MSG_RESULT([$glibc])
|
||||
|
||||
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
|
||||
[AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
|
||||
[have_clock_gettime=no])])
|
||||
|
|
@ -720,9 +731,13 @@ if ! test "x$have_clock_gettime" = xno; then
|
|||
|
||||
LIBS_SAVE="$LIBS"
|
||||
LIBS="$CLOCK_LIBS"
|
||||
CPPFLAGS_SAVE="$CPPFLAGS"
|
||||
|
||||
if test x"$glibc" = xyes; then
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=199309L"
|
||||
fi
|
||||
|
||||
AC_RUN_IFELSE([
|
||||
#define _POSIX_C_SOURCE 199309L
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, char *argv[[]]) {
|
||||
|
|
@ -737,6 +752,7 @@ int main(int argc, char *argv[[]]) {
|
|||
[MONOTONIC_CLOCK="cross compiling"])
|
||||
|
||||
LIBS="$LIBS_SAVE"
|
||||
CPPFLAGS="$CPPFLAGS_SAVE"
|
||||
else
|
||||
MONOTONIC_CLOCK=no
|
||||
fi
|
||||
|
|
@ -1344,7 +1360,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd* | kfreebsd*-gnu)
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
XORG_OS="freebsd"
|
||||
XORG_OS_SUBDIR="bsd"
|
||||
xorg_bus_bsdpci="yes"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ struct _ExaOffscreenArea {
|
|||
int base_offset; /* allocation base */
|
||||
int offset; /* aligned offset */
|
||||
int size; /* total allocation size */
|
||||
int score;
|
||||
unsigned last_use;
|
||||
pointer privData;
|
||||
|
||||
ExaOffscreenSaveProc save;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,64 @@ ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area)
|
|||
return exaOffscreenFree (pScreen, area);
|
||||
}
|
||||
|
||||
#define AREA_SCORE(area) (area->size / (double)(pExaScr->offScreenCounter - area->last_use))
|
||||
|
||||
static ExaOffscreenArea *
|
||||
exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align)
|
||||
{
|
||||
ExaOffscreenArea *begin, *end, *best;
|
||||
double score, best_score;
|
||||
int avail, real_size, tmp;
|
||||
|
||||
best_score = UINT_MAX;
|
||||
begin = end = pExaScr->info->offScreenAreas;
|
||||
avail = 0;
|
||||
score = 0;
|
||||
best = 0;
|
||||
|
||||
while (end != NULL)
|
||||
{
|
||||
restart:
|
||||
while (begin != NULL && begin->state == ExaOffscreenLocked)
|
||||
begin = end = begin->next;
|
||||
|
||||
if (begin == NULL)
|
||||
break;
|
||||
|
||||
/* adjust size needed to account for alignment loss for this area */
|
||||
real_size = size;
|
||||
tmp = begin->base_offset % align;
|
||||
if (tmp)
|
||||
real_size += (align - tmp);
|
||||
|
||||
while (avail < real_size && end != NULL)
|
||||
{
|
||||
if (end->state == ExaOffscreenLocked) {
|
||||
/* Can't more room here, restart after this locked area */
|
||||
avail = 0;
|
||||
score = 0;
|
||||
begin = end;
|
||||
goto restart;
|
||||
}
|
||||
avail += end->size;
|
||||
score += AREA_SCORE(end);
|
||||
end = end->next;
|
||||
}
|
||||
|
||||
/* Check the score, update best */
|
||||
if (avail >= real_size && score < best_score) {
|
||||
best = begin;
|
||||
best_score = score;
|
||||
}
|
||||
|
||||
avail -= begin->size;
|
||||
score -= AREA_SCORE(begin);
|
||||
begin = begin->next;
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
/**
|
||||
* exaOffscreenAlloc allocates offscreen memory
|
||||
*
|
||||
|
|
@ -96,9 +154,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
|||
ExaOffscreenSaveProc save,
|
||||
pointer privData)
|
||||
{
|
||||
ExaOffscreenArea *area, *begin, *best;
|
||||
ExaOffscreenArea *area;
|
||||
ExaScreenPriv (pScreen);
|
||||
int tmp, real_size = 0, best_score;
|
||||
int tmp, real_size = 0;
|
||||
#if DEBUG_OFFSCREEN
|
||||
static int number = 0;
|
||||
ErrorF("================= ============ allocating a new pixmap %d\n", ++number);
|
||||
|
|
@ -143,53 +201,8 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
|||
|
||||
if (!area)
|
||||
{
|
||||
/*
|
||||
* Kick out existing users to make space.
|
||||
*
|
||||
* First, locate a region which can hold the desired object.
|
||||
*/
|
||||
area = exaFindAreaToEvict(pExaScr, size, align);
|
||||
|
||||
/* prev points at the first object to boot */
|
||||
best = NULL;
|
||||
best_score = INT_MAX;
|
||||
for (begin = pExaScr->info->offScreenAreas; begin != NULL;
|
||||
begin = begin->next)
|
||||
{
|
||||
int avail, score;
|
||||
ExaOffscreenArea *scan;
|
||||
|
||||
if (begin->state == ExaOffscreenLocked)
|
||||
continue;
|
||||
|
||||
/* adjust size needed to account for alignment loss for this area */
|
||||
real_size = size;
|
||||
tmp = begin->base_offset % align;
|
||||
if (tmp)
|
||||
real_size += (align - tmp);
|
||||
|
||||
avail = 0;
|
||||
score = 0;
|
||||
/* now see if we can make room here, and how "costly" it'll be. */
|
||||
for (scan = begin; scan != NULL; scan = scan->next)
|
||||
{
|
||||
if (scan->state == ExaOffscreenLocked) {
|
||||
/* Can't make room here, start after this locked area. */
|
||||
begin = scan;
|
||||
break;
|
||||
}
|
||||
/* Score should only be non-zero for ExaOffscreenRemovable */
|
||||
score += scan->score;
|
||||
avail += scan->size;
|
||||
if (avail >= real_size)
|
||||
break;
|
||||
}
|
||||
/* Is it the best option we've found so far? */
|
||||
if (avail >= real_size && score < best_score) {
|
||||
best = begin;
|
||||
best_score = score;
|
||||
}
|
||||
}
|
||||
area = best;
|
||||
if (!area)
|
||||
{
|
||||
DBG_OFFSCREEN (("Alloc 0x%x -> NOSPACE\n", size));
|
||||
|
|
@ -230,7 +243,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
|||
new_area->size = area->size - real_size;
|
||||
new_area->state = ExaOffscreenAvail;
|
||||
new_area->save = NULL;
|
||||
new_area->score = 0;
|
||||
new_area->last_use = 0;
|
||||
new_area->next = area->next;
|
||||
area->next = new_area;
|
||||
area->size = real_size;
|
||||
|
|
@ -244,7 +257,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
|||
area->state = ExaOffscreenRemovable;
|
||||
area->privData = privData;
|
||||
area->save = save;
|
||||
area->score = 0;
|
||||
area->last_use = pExaScr->offScreenCounter++;
|
||||
area->offset = (area->base_offset + align - 1);
|
||||
area->offset -= area->offset % align;
|
||||
|
||||
|
|
@ -395,7 +408,7 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
|
|||
|
||||
area->state = ExaOffscreenAvail;
|
||||
area->save = NULL;
|
||||
area->score = 0;
|
||||
area->last_use = 0;
|
||||
/*
|
||||
* Find previous area
|
||||
*/
|
||||
|
|
@ -427,23 +440,11 @@ ExaOffscreenMarkUsed (PixmapPtr pPixmap)
|
|||
{
|
||||
ExaPixmapPriv (pPixmap);
|
||||
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||
static int iter = 0;
|
||||
|
||||
if (!pExaPixmap || !pExaPixmap->area)
|
||||
return;
|
||||
|
||||
/* The numbers here are arbitrary. We may want to tune these. */
|
||||
pExaPixmap->area->score += 100;
|
||||
if (++iter == 10) {
|
||||
ExaOffscreenArea *area;
|
||||
for (area = pExaScr->info->offScreenAreas; area != NULL;
|
||||
area = area->next)
|
||||
{
|
||||
if (area->state == ExaOffscreenRemovable)
|
||||
area->score = (area->score * 7) / 8;
|
||||
}
|
||||
iter = 0;
|
||||
}
|
||||
pExaPixmap->area->last_use = pExaScr->offScreenCounter++;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -472,10 +473,11 @@ exaOffscreenInit (ScreenPtr pScreen)
|
|||
area->size = pExaScr->info->memorySize - area->base_offset;
|
||||
area->save = NULL;
|
||||
area->next = NULL;
|
||||
area->score = 0;
|
||||
area->last_use = 0;
|
||||
|
||||
/* Add it to the free areas */
|
||||
pExaScr->info->offScreenAreas = area;
|
||||
pExaScr->offScreenCounter = 1;
|
||||
|
||||
ExaOffscreenValidate (pScreen);
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ typedef struct {
|
|||
Bool checkDirtyCorrectness;
|
||||
unsigned disableFbCount;
|
||||
Bool optimize_migration;
|
||||
unsigned offScreenCounter;
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ exaComposite(CARD8 op,
|
|||
!pSrc->transform &&
|
||||
pSrc->repeatType == RepeatNormal)
|
||||
{
|
||||
DDXPointRec srcOrg;
|
||||
DDXPointRec patOrg;
|
||||
|
||||
/* Let's see if the driver can do the repeat in one go */
|
||||
if (pExaScr->info->PrepareComposite && !pSrc->alphaMap &&
|
||||
|
|
@ -674,12 +674,14 @@ exaComposite(CARD8 op,
|
|||
width, height))
|
||||
goto done;
|
||||
|
||||
srcOrg.x = (xSrc - xDst) % pSrc->pDrawable->width;
|
||||
srcOrg.y = (ySrc - yDst) % pSrc->pDrawable->height;
|
||||
/* pattern origin is the point in the destination drawable
|
||||
* corresponding to (0,0) in the source */
|
||||
patOrg.x = xDst - xSrc;
|
||||
patOrg.y = yDst - ySrc;
|
||||
|
||||
ret = exaFillRegionTiled(pDst->pDrawable, ®ion,
|
||||
(PixmapPtr)pSrc->pDrawable,
|
||||
&srcOrg, FB_ALLONES, GXcopy);
|
||||
&patOrg, FB_ALLONES, GXcopy);
|
||||
|
||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
|
||||
|
|
|
|||
|
|
@ -436,9 +436,10 @@ chooseVideoDriver(void)
|
|||
if (!info) {
|
||||
ErrorF("Primary device is not PCI\n");
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
|
||||
else {
|
||||
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
|
||||
/* TODO Handle multiple drivers claiming to support the same PCI ID */
|
||||
|
|
|
|||
|
|
@ -119,7 +119,9 @@ static ModuleDefault ModuleDefaults[] = {
|
|||
{.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "glx", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "freetype", .toLoad = TRUE, .load_opt=NULL},
|
||||
#ifdef XRECORD
|
||||
{.name = "record", .toLoad = TRUE, .load_opt=NULL},
|
||||
#endif
|
||||
{.name = "dri", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
|
||||
{.name = NULL, .toLoad = FALSE, .load_opt=NULL}
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ Mem_wl(CARD32 addr, CARD32 val)
|
|||
static CARD32 PciCfg1Addr = 0;
|
||||
|
||||
#define PCI_OFFSET(x) ((x) & 0x000000ff)
|
||||
#define PCI_TAG(x) ((x) & 0xffffff00)
|
||||
#define PCI_TAG(x) ((x) & 0x7fffff00)
|
||||
|
||||
static struct pci_device*
|
||||
pci_device_for_cfg_address (CARD32 addr)
|
||||
|
|
|
|||
|
|
@ -108,13 +108,6 @@ static Bool quirk_prefer_large_75 (int scrnIndex, xf86MonPtr DDC)
|
|||
|
||||
static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC)
|
||||
{
|
||||
/* Bug #10304: "LGPhilipsLCD LP154W01-A5" */
|
||||
/* Bug #12784: "LGPhilipsLCD LP154W01-TLA2" */
|
||||
/* Red Hat #435216 "LGPhilipsLCD LP154W01-TLAE" */
|
||||
if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
|
||||
(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
|
||||
return TRUE;
|
||||
|
||||
/* Bug #11603: Funai Electronics PM36B */
|
||||
if (memcmp (DDC->vendor.name, "FCM", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 13600)
|
||||
|
|
@ -137,7 +130,7 @@ static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
|
|||
{
|
||||
/* Bug #10304: LGPhilipsLCD LP154W01-A5 */
|
||||
if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 0)
|
||||
(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
|
@ -160,6 +153,16 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC)
|
|||
DDC->vendor.prod_id == 57364)
|
||||
return TRUE;
|
||||
|
||||
/* Proview AY765C 17" LCD. See bug #15160*/
|
||||
if (memcmp (DDC->vendor.name, "PTS", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 765)
|
||||
return TRUE;
|
||||
|
||||
/* ACR of some sort RH #284231 */
|
||||
if (memcmp (DDC->vendor.name, "ACR", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 2423)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -332,13 +332,9 @@ WaitForSomething(int *pClientsReady)
|
|||
|
||||
if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
|
||||
break;
|
||||
#ifdef WIN32
|
||||
/* Windows keyboard and mouse events are added to the input queue
|
||||
in Block- and WakupHandlers. There is no device to check if
|
||||
data is ready. So check here if new input is available */
|
||||
/* check here for DDXes that queue events during Block/Wakeup */
|
||||
if (*checkForInput[0] != *checkForInput[1])
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue