xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Wed May 23 05:29:45 PDT 2012


 src/sna/kgem.c       |    7 +++++--
 src/sna/sna_driver.c |   16 +++++++---------
 2 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 5ae032e22b127c7c95753197e0914a8028a3b22e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed May 23 13:27:07 2012 +0100

    sna: Suppress modesetting errors on return from VT switch
    
    If we presume that userspace will set the correct mode shortly
    afterwards, we can ignore the failure of the automatic restore.
    
    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 2e81640..d4b7eb0 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -571,13 +571,6 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
 	return sna_accel_pre_init(sna);
 }
 
-/**
- * Intialiazes the hardware for the 3D pipeline use in the 2D driver.
- *
- * Some state caching is performed to avoid redundant state emits.  This
- * function is also responsible for marking the state as clobbered for DRI
- * clients.
- */
 static void
 sna_block_handler(int i, pointer data, pointer timeout, pointer read_mask)
 {
@@ -981,12 +974,17 @@ static Bool sna_enter_vt(int scrnIndex, int flags)
 	DBG(("%s\n", __FUNCTION__));
 
 	if (drmSetMaster(sna->kgem.fd)) {
-		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "drmSetMaster failed: %s\n",
 			   strerror(errno));
+		return FALSE;
 	}
 
-	return xf86SetDesiredModes(scrn);
+	if (!xf86SetDesiredModes(scrn))
+		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+			   "failed to restore desired modes on VT switch\n");
+
+	return TRUE;
 }
 
 static Bool sna_switch_mode(int scrnIndex, DisplayModePtr mode, int flags)
commit 34882a979d9817d33bd6a8ae73a9f7083556578c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed May 23 10:27:44 2012 +0100

    sna: Keep checking retirement for flushing list
    
    Even after all outstanding requests have been completed we may still
    have buffers on the flushing list that need to become idle.
    Once such consequence would be to prevent the vblank flush from going
    idle, causing spurious wakeups every vrefresh when otherwise idle.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=50078
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 470dd24..9a67c38 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1403,8 +1403,11 @@ bool kgem_retire(struct kgem *kgem)
 	retired |= kgem_retire__requests(kgem);
 	retired |= kgem_retire__partials(kgem);
 
-	DBG(("%s -- need_retire=%d\n", __FUNCTION__, kgem->need_retire));
-	kgem->need_retire = !list_is_empty(&kgem->requests);
+	kgem->need_retire =
+		!list_is_empty(&kgem->requests) ||
+		!list_is_empty(&kgem->flushing);
+	DBG(("%s -- retired=%d, need_retire=%d\n",
+	     __FUNCTION__, retired, kgem->need_retire));
 
 	kgem->retire(kgem);
 


More information about the xorg-commit mailing list