xserver: Branch 'master' - 4 commits
Keith Packard
keithp at kemper.freedesktop.org
Thu Jul 31 00:05:50 PDT 2014
hw/xfree86/common/xf86platformBus.c | 7 ++-----
hw/xfree86/modes/xf86Rotate.c | 2 ++
present/present.c | 21 +++++++++++++--------
present/present_priv.h | 2 ++
present/present_screen.c | 1 +
5 files changed, 20 insertions(+), 13 deletions(-)
New commits:
commit 61afe950e6a1a640ad9c5368549914ea32b90d48
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jul 21 19:27:20 2014 -0700
xfree86/modes: rotation damage is automatically destroyed on close
Don't try to destroy rotation_damage in the xf86RotateCloseScreen; it
will have been destroyed when the screen pixmap was destroyed.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 54cbf2e..9c00a44 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -309,6 +309,8 @@ xf86RotateCloseScreen(ScreenPtr screen)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int c;
+ /* This has already been destroyed when the root window was destroyed */
+ xf86_config->rotation_damage = NULL;
for (c = 0; c < xf86_config->num_crtc; c++)
xf86RotateDestroy(xf86_config->crtc[c]);
}
commit 40dc81154ad38514793f2181447d597b57d39e80
Author: Keith Packard <keithp at keithp.com>
Date: Sun Jul 20 18:57:42 2014 -0700
present: Avoid crash at server shutdown
When a present flip operation is still in process during server reset,
the call to present_set_abort_flip may not happen until the screen is
being closed, at which point there is no root window to set pixmaps
for. Check to make sure there's a window before resetting window pixmaps.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/present/present.c b/present/present.c
index f624e5b..f488e21 100644
--- a/present/present.c
+++ b/present/present.c
@@ -399,7 +399,8 @@ present_set_abort_flip(ScreenPtr screen)
present_set_tree_pixmap(screen_priv->flip_window,
(*screen->GetScreenPixmap)(screen));
- present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
+ if (screen->root)
+ present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
screen_priv->flip_pending->abort_flip = TRUE;
}
commit 627bce80894647c681b146a709aad4c390b4374e
Author: Keith Packard <keithp at keithp.com>
Date: Sun Jul 20 18:53:52 2014 -0700
present: Make window MSC offset 0 initially
The MSC offset used by a window is adjusted as the window moves
between screens, and between shown/unshown. The value shouldn't
matter, but it's helpful for debugging to have window MSC values be
the same as the CRTC MSC at first.
This patch introduces a unique CRTC value so that Present can detect
the first time a window is a PresentPixmap destination and set the MSC
offset to zero, rather than using the fake MSC value as the previous
window MSC.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/present/present.c b/present/present.c
index 3aea0d7..f624e5b 100644
--- a/present/present.c
+++ b/present/present.c
@@ -291,14 +291,18 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc
if (crtc != window_priv->crtc) {
uint64_t old_ust, old_msc;
- /* The old CRTC may have been turned off, in which case
- * we'll just use whatever previous MSC we'd seen from this CRTC
- */
+ if (window_priv->crtc == PresentCrtcNeverSet) {
+ window_priv->msc_offset = 0;
+ } else {
+ /* The old CRTC may have been turned off, in which case
+ * we'll just use whatever previous MSC we'd seen from this CRTC
+ */
- if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
- old_msc = window_priv->msc;
+ if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
+ old_msc = window_priv->msc;
- window_priv->msc_offset += new_msc - old_msc;
+ window_priv->msc_offset += new_msc - old_msc;
+ }
window_priv->crtc = crtc;
}
@@ -725,7 +729,7 @@ present_pixmap(WindowPtr window,
if (!pixmap)
target_crtc = window_priv->crtc;
- if (!target_crtc)
+ if (!target_crtc || target_crtc == PresentCrtcNeverSet)
target_crtc = present_get_crtc(window);
}
diff --git a/present/present_priv.h b/present/present_priv.h
index d8569a2..f5c1652 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -134,6 +134,8 @@ typedef struct present_window_priv {
struct xorg_list notifies;
} present_window_priv_rec, *present_window_priv_ptr;
+#define PresentCrtcNeverSet ((RRCrtcPtr) 1)
+
extern DevPrivateKeyRec present_window_private_key;
static inline present_window_priv_ptr
diff --git a/present/present_screen.c b/present/present_screen.c
index 25ef681..2f91ac7 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -45,6 +45,7 @@ present_get_window_priv(WindowPtr window, Bool create)
return NULL;
xorg_list_init(&window_priv->vblank);
xorg_list_init(&window_priv->notifies);
+ window_priv->crtc = PresentCrtcNeverSet;
dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv);
return window_priv;
}
commit bd4198b01f2baf2284e61ea7ebf4600f554800e9
Author: Keith Packard <keithp at keithp.com>
Date: Fri Jul 18 11:19:01 2014 -0700
xfree86: Avoid compiler warning for unused vars without systemd
When systemd isn't being used, systemd_logind_release_fd is defined
as an empty macro, leaving the arguments unused. Fix the compiler
warnings by simply removing the local variables and referencing the
structure within the macro call.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 22e4603..9460399 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -348,7 +348,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp,
GDevPtr gdev, int flags, intptr_t match_data)
{
Bool foundScreen = FALSE;
- int entity, fd, major, minor;
+ int entity;
if (gdev && gdev->screen == 0 && !xf86_check_platform_slot(dev))
return FALSE;
@@ -374,10 +374,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp,
if (entity != -1) {
if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc ||
!drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) {
- fd = dev->attribs->fd;
- major = dev->attribs->major;
- minor = dev->attribs->minor;
- systemd_logind_release_fd(major, minor, fd);
+ systemd_logind_release_fd(dev->attribs->major, dev->attribs->minor, dev->attribs->fd);
dev->attribs->fd = -1;
dev->flags &= ~XF86_PDEV_SERVER_FD;
}
More information about the xorg-commit
mailing list