xf86-video-intel: 2 commits - src/sna/sna_dri.c src/sna/sna_driver.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Sep 29 08:42:59 PDT 2012
src/sna/sna_dri.c | 21 ++++++++++-----------
src/sna/sna_driver.c | 14 +++++++-------
2 files changed, 17 insertions(+), 18 deletions(-)
New commits:
commit 33f6f753788398efdf20cde4aa0b4ca402eee8fe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Sep 29 16:41:00 2012 +0100
sna/dri: Swallow error from GetMSC
Just ignore the error return from WaitVBlank and make up a value for
last MSC/SBC similar to an unattached Drawable.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55395
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 676636a..286f9a3 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -2065,30 +2065,29 @@ sna_dri_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
{
struct sna *sna = to_sna_from_drawable(draw);
drmVBlank vbl;
- int pipe = sna_dri_get_pipe(draw);
+ int pipe;
DBG(("%s(pipe=%d)\n", __FUNCTION__, pipe));
+ *ust = *msc = 0;
/* Drawable not displayed, make up a value */
- if (pipe == -1) {
- *ust = 0;
- *msc = 0;
+ pipe = sna_dri_get_pipe(draw);
+ if (pipe == -1)
return TRUE;
- }
VG_CLEAR(vbl);
vbl.request.type = DRM_VBLANK_RELATIVE | pipe_select(pipe);
vbl.request.sequence = 0;
- if (sna_wait_vblank(sna, &vbl)) {
+ if (sna_wait_vblank(sna, &vbl) == 0) {
+ *ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec;
+ *msc = vbl.reply.sequence;
+ DBG(("%s: msc=%llu, ust=%llu\n", __FUNCTION__,
+ (long long)*msc, (long long)*ust));
+ } else {
DBG(("%s: query failed on pipe %d, ret=%d\n",
__FUNCTION__, pipe, errno));
- return FALSE;
}
- *ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec;
- *msc = vbl.reply.sequence;
- DBG(("%s: msc=%llu, ust=%llu\n", __FUNCTION__,
- (long long)*msc, (long long)*ust));
return TRUE;
}
commit a873f6d354ebbc52265e686b614027f537a6363a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Sep 29 16:01:58 2012 +0100
sna: Release the front buffer and drop DRM master early during shutdown
If we delay the dropping of DRM master we may complete a VT switch
before we are ready and so prevent a second X server from reacquiring
master, and dying.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55446
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 462d9ac..1b7e817 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -736,6 +736,7 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL)
DBG(("%s\n", __FUNCTION__));
+ xf86_hide_cursors(scrn);
sna_uevent_fini(scrn);
/* drain the event queues */
@@ -747,7 +748,12 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL)
sna->dri_open = false;
}
- xf86_hide_cursors(scrn);
+ if (sna->front) {
+ screen->DestroyPixmap(sna->front);
+ sna->front = NULL;
+ }
+
+ drmDropMaster(sna->kgem.fd);
scrn->vtSema = FALSE;
xf86_cursors_fini(screen);
@@ -764,13 +770,7 @@ static Bool sna_late_close_screen(CLOSE_SCREEN_ARGS_DECL)
DBG(("%s\n", __FUNCTION__));
- if (sna->front) {
- screen->DestroyPixmap(sna->front);
- sna->front = NULL;
- }
-
sna_accel_close(sna);
- drmDropMaster(sna->kgem.fd);
depths = screen->allowedDepths;
for (d = 0; d < screen->numDepths; d++)
More information about the xorg-commit
mailing list