mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-04 20:20:13 +01:00
Merge branch 'server-1.13-branch' of git://people.freedesktop.org/~airlied/xserver into server-1.13-branch
This commit is contained in:
commit
b3d25d8d65
4 changed files with 58 additions and 34 deletions
|
|
@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
|
|||
return;
|
||||
action = udev_device_get_action(udev_device);
|
||||
if (action) {
|
||||
if (!strcmp(action, "add") || !strcmp(action, "change")) {
|
||||
if (!strcmp(action, "add")) {
|
||||
device_removed(udev_device);
|
||||
device_added(udev_device);
|
||||
} else if (!strcmp(action, "change")) {
|
||||
/* ignore change for the drm devices */
|
||||
if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
|
||||
device_removed(udev_device);
|
||||
device_added(udev_device);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(action, "remove"))
|
||||
device_removed(udev_device);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
|||
if (drv->platformProbe != NULL) {
|
||||
foundScreen = xf86platformProbeDev(drv);
|
||||
}
|
||||
if (ServerIsNotSeat0())
|
||||
return foundScreen;
|
||||
#endif
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
|
|
@ -214,6 +216,8 @@ xf86BusProbe(void)
|
|||
{
|
||||
#ifdef XSERVER_PLATFORM_BUS
|
||||
xf86platformProbe();
|
||||
if (ServerIsNotSeat0())
|
||||
return;
|
||||
#endif
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
xf86PciProbe();
|
||||
|
|
|
|||
|
|
@ -213,11 +213,12 @@ xf86platformProbe(void)
|
|||
int i;
|
||||
Bool pci = TRUE;
|
||||
|
||||
config_odev_probe(xf86PlatformDeviceProbe);
|
||||
|
||||
if (!xf86scanpci()) {
|
||||
pci = FALSE;
|
||||
}
|
||||
|
||||
config_odev_probe(&xf86PlatformDeviceProbe);
|
||||
for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||
char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID);
|
||||
|
||||
|
|
@ -358,6 +359,9 @@ xf86platformProbeDev(DriverPtr drvp)
|
|||
break;
|
||||
}
|
||||
else {
|
||||
/* for non-seat0 servers assume first device is the master */
|
||||
if (ServerIsNotSeat0())
|
||||
break;
|
||||
if (xf86_platform_devices[j].pdev) {
|
||||
if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -766,6 +766,44 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* A TraverseTree callback to invalidate all windows using the same
|
||||
* pixmap
|
||||
*/
|
||||
static int
|
||||
DRI2InvalidateWalk(WindowPtr pWin, pointer data)
|
||||
{
|
||||
if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
|
||||
return WT_DONTWALKCHILDREN;
|
||||
DRI2InvalidateDrawable(&pWin->drawable);
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
|
||||
static void
|
||||
DRI2InvalidateDrawableAll(DrawablePtr pDraw)
|
||||
{
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
WindowPtr pWin = (WindowPtr) pDraw;
|
||||
PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin);
|
||||
|
||||
/*
|
||||
* Find the top-most window using this pixmap
|
||||
*/
|
||||
while (pWin->parent &&
|
||||
pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
|
||||
pWin = pWin->parent;
|
||||
|
||||
/*
|
||||
* Walk the sub-tree to invalidate all of the
|
||||
* windows using the same pixmap
|
||||
*/
|
||||
TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
|
||||
DRI2InvalidateDrawable(&pPixmap->drawable);
|
||||
}
|
||||
else
|
||||
DRI2InvalidateDrawable(pDraw);
|
||||
}
|
||||
|
||||
DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
|
||||
{
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
|
|
@ -831,6 +869,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
|
|||
spix->screen_x = mpix->screen_x;
|
||||
spix->screen_y = mpix->screen_y;
|
||||
#endif
|
||||
|
||||
DRI2InvalidateDrawableAll(pDraw);
|
||||
return &spix->drawable;
|
||||
}
|
||||
|
||||
|
|
@ -1048,18 +1088,7 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* A TraverseTree callback to invalidate all windows using the same
|
||||
* pixmap
|
||||
*/
|
||||
static int
|
||||
DRI2InvalidateWalk(WindowPtr pWin, pointer data)
|
||||
{
|
||||
if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
|
||||
return WT_DONTWALKCHILDREN;
|
||||
DRI2InvalidateDrawable(&pWin->drawable);
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||
|
|
@ -1162,26 +1191,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
|||
*/
|
||||
*swap_target = pPriv->swap_count + pPriv->swapsPending;
|
||||
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
WindowPtr pWin = (WindowPtr) pDraw;
|
||||
PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin);
|
||||
|
||||
/*
|
||||
* Find the top-most window using this pixmap
|
||||
*/
|
||||
while (pWin->parent &&
|
||||
pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
|
||||
pWin = pWin->parent;
|
||||
|
||||
/*
|
||||
* Walk the sub-tree to invalidate all of the
|
||||
* windows using the same pixmap
|
||||
*/
|
||||
TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
|
||||
DRI2InvalidateDrawable(&pPixmap->drawable);
|
||||
}
|
||||
else
|
||||
DRI2InvalidateDrawable(pDraw);
|
||||
DRI2InvalidateDrawableAll(pDraw);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue