xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Wed Oct 21 12:14:47 PDT 2015
Xext/xvmain.c | 82 ++++++++++--------------------------
hw/xfree86/common/xf86platformBus.c | 3 +
present/present.c | 2
randr/rroutput.c | 22 +++++++--
4 files changed, 45 insertions(+), 64 deletions(-)
New commits:
commit c99fb550e06207e83ec89463fe32bd6bceca45f8
Author: Dave Airlie <airlied at gmail.com>
Date: Sun Sep 13 07:45:15 2015 +1000
xf86: don't add gpus from udev if autoAddGPU is set
At startup the server wasn't adding devices, but nothing
was blocking hotplug devices by the look of it.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91388
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index f1e9423..96895a6 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -477,6 +477,9 @@ xf86platformAddDevice(int index)
screenLayoutPtr layout;
static const char *hotplug_driver_name = "modesetting";
+ if (!xf86Info.autoAddGPU)
+ return -1;
+
/* force load the driver for now */
xf86LoadOneModule(hotplug_driver_name, NULL);
commit 912f1fe2bb1b640d55fc44fcf636b6ca40d7f40b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Apr 5 10:32:03 2015 +0100
Xv: Only stop the adaptors when the Pixmap is finally destroyed
Pixmaps are reference counted and DestroyPixmap is called for the
removal of every reference. However, we only want to stop the adaptors
writing into the Pixmap just before the Pixmap is finally destroyed,
similar to how Windows are handled.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 93e5f0c..0c6f25b 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -327,36 +327,24 @@ XvGetRTPort(void)
return XvRTPort;
}
-static Bool
-XvDestroyPixmap(PixmapPtr pPix)
+static void
+XvStopAdaptors(DrawablePtr pDrawable)
{
- Bool status;
- ScreenPtr pScreen;
- XvScreenPtr pxvs;
- XvAdaptorPtr pa;
- int na;
- XvPortPtr pp;
- int np;
-
- pScreen = pPix->drawable.pScreen;
-
- SCREEN_PROLOGUE(pScreen, DestroyPixmap);
-
- pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
+ ScreenPtr pScreen = pDrawable->pScreen;
+ XvScreenPtr pxvs = dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
+ XvAdaptorPtr pa = pxvs->pAdaptors;
+ int na = pxvs->nAdaptors;
/* CHECK TO SEE IF THIS PORT IS IN USE */
-
- pa = pxvs->pAdaptors;
- na = pxvs->nAdaptors;
while (na--) {
- np = pa->nPorts;
- pp = pa->pPorts;
+ XvPortPtr pp = pa->pPorts;
+ int np = pa->nPorts;
while (np--) {
- if (pp->pDraw == (DrawablePtr) pPix) {
- XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
+ if (pp->pDraw == pDrawable) {
+ XvdiSendVideoNotify(pp, pDrawable, XvPreempted);
- (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw);
+ (void) (*pp->pAdaptor->ddStopVideo) (pp, pDrawable);
pp->pDraw = NULL;
pp->client = NULL;
@@ -366,9 +354,19 @@ XvDestroyPixmap(PixmapPtr pPix)
}
pa++;
}
+}
- status = (*pScreen->DestroyPixmap) (pPix);
+static Bool
+XvDestroyPixmap(PixmapPtr pPix)
+{
+ ScreenPtr pScreen = pPix->drawable.pScreen;
+ Bool status;
+
+ if (pPix->refcnt == 1)
+ XvStopAdaptors(&pPix->drawable);
+ SCREEN_PROLOGUE(pScreen, DestroyPixmap);
+ status = (*pScreen->DestroyPixmap) (pPix);
SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap);
return status;
@@ -378,45 +376,13 @@ XvDestroyPixmap(PixmapPtr pPix)
static Bool
XvDestroyWindow(WindowPtr pWin)
{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
Bool status;
- ScreenPtr pScreen;
- XvScreenPtr pxvs;
- XvAdaptorPtr pa;
- int na;
- XvPortPtr pp;
- int np;
- pScreen = pWin->drawable.pScreen;
+ XvStopAdaptors(&pWin->drawable);
SCREEN_PROLOGUE(pScreen, DestroyWindow);
-
- pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
-
- /* CHECK TO SEE IF THIS PORT IS IN USE */
-
- pa = pxvs->pAdaptors;
- na = pxvs->nAdaptors;
- while (na--) {
- np = pa->nPorts;
- pp = pa->pPorts;
-
- while (np--) {
- if (pp->pDraw == (DrawablePtr) pWin) {
- XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
-
- (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw);
-
- pp->pDraw = NULL;
- pp->client = NULL;
- pp->time = currentTime;
- }
- pp++;
- }
- pa++;
- }
-
status = (*pScreen->DestroyWindow) (pWin);
-
SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow);
return status;
commit 413cb2ff1d754b5f19d77ff19cddf40793989c03
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Feb 16 09:49:18 2015 +0000
present: Fix missed notify MSC computation
Only treat divisor==0 as async to immediately report the actual vblank.
If the user species a non-zero divisor, we should compute the missed
vblank properly or else we report too early.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de at gmail.com>
diff --git a/present/present.c b/present/present.c
index 7ddffbd..beb4ff0 100644
--- a/present/present.c
+++ b/present/present.c
@@ -933,7 +933,7 @@ present_notify_msc(WindowPtr window,
0, 0,
NULL,
NULL, NULL,
- PresentOptionAsync,
+ divisor == 0 ? PresentOptionAsync : 0,
target_msc, divisor, remainder, NULL, 0);
}
commit 702c0a247f5523b43652befaf6be548ddbbe9dee
Author: Alberto Milone <alberto.milone at canonical.com>
Date: Thu Dec 12 10:00:09 2013 +0100
randr: make RROutputChanged change the main protocol screen not the gpu screen
We only set changes on the main protocol screen as, for example
in RRSetChanged() and RRTellChanged(), therefore we should follow
the same logic when reporting that an output changed in
RROutputChanged().
This means that RRTellChanged() will then update the relevant
timestamps also when events come from gpu screens.
[ajax: Fix mixed code and decls]
Reviewed-by: Dave Airlie <airlied at redhat.com>
Signed-off-by: Alberto Milone <alberto.milone at canonical.com>
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 10df4da..d12b9ba 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -31,15 +31,27 @@ RESTYPE RROutputType;
void
RROutputChanged(RROutputPtr output, Bool configChanged)
{
+ /* set changed bits on the master screen only */
ScreenPtr pScreen = output->pScreen;
+ rrScrPrivPtr mastersp;
output->changed = TRUE;
- if (pScreen) {
- rrScrPriv(pScreen);
- RRSetChanged(pScreen);
- if (configChanged)
- pScrPriv->configChanged = TRUE;
+ if (!pScreen)
+ return;
+
+ if (pScreen->isGPU) {
+ ScreenPtr master = pScreen->current_master;
+ if (!master)
+ return;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ mastersp = rrGetScrPriv(pScreen);
}
+
+ RRSetChanged(pScreen);
+ if (configChanged)
+ mastersp->configChanged = TRUE;
}
/*
More information about the xorg-commit
mailing list