xf86-video-intel: 3 commits - src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Jun 10 06:39:42 PDT 2014


 src/sna/sna_display.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit f19195f7ea317f5601543724c725c4b63fdc3f60
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 10 14:25:42 2014 +0100

    sna: Fix arguments when flipping transformed TearFree outputs
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index ae8658f..e014b27 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6065,7 +6065,7 @@ void sna_mode_redisplay(struct sna *sna)
 				if (arg.fb_id == 0)
 					goto disable1;
 
-				arg.user_data = (uintptr_t)crtc;
+				arg.user_data = (uintptr_t)sna_crtc;
 				arg.flags = DRM_MODE_PAGE_FLIP_EVENT;
 				arg.reserved = 0;
 
@@ -6090,6 +6090,8 @@ disable1:
 						sna_crtc_disable(crtc);
 					}
 
+					kgem_bo_destroy(&sna->kgem, bo);
+					sna_crtc->shadow_bo = NULL;
 					continue;
 				}
 				sna->mode.flip_active++;
@@ -6099,7 +6101,7 @@ disable1:
 				sna_crtc->flip_bo = bo;
 				sna_crtc->flip_bo->active_scanout++;
 
-				sna_crtc->shadow_bo = sna_crtc->bo;
+				sna_crtc->shadow_bo = kgem_bo_reference(sna_crtc->bo);
 			} else {
 				sna_crtc_redisplay(crtc, &damage);
 				kgem_scanout_flush(&sna->kgem, sna_crtc->bo);
commit c16b2a125929c9027b62c07d47e9602553153eef
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 10 13:25:57 2014 +0100

    sna: Tidy a few asserts on the state of crtc->flip_bo
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 8e9f711..ae8658f 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6276,19 +6276,19 @@ void sna_mode_wakeup(struct sna *sna)
 				crtc->swap.tv_usec = vbl->tv_usec;
 				crtc->swap.msc = msc64(crtc, vbl->sequence);
 
+				assert(crtc->flip_bo);
+				assert(crtc->flip_bo->active_scanout);
+				assert(crtc->flip_bo->refcnt >= crtc->flip_bo->active_scanout);
+
 				if (crtc->bo) {
 					assert(crtc->bo->active_scanout);
 					assert(crtc->bo->refcnt >= crtc->bo->active_scanout);
 					crtc->bo->active_scanout--;
 					kgem_bo_destroy(&sna->kgem, crtc->bo);
 
-					assert(crtc->flip_bo->active_scanout >= 1);
-					assert(crtc->flip_bo->refcnt >= crtc->flip_bo->active_scanout);
 					crtc->bo = crtc->flip_bo;
 					crtc->flip_bo = NULL;
 				} else {
-					assert(crtc->flip_bo->active_scanout);
-					assert(crtc->flip_bo->refcnt >= crtc->flip_bo->active_scanout);
 					crtc->flip_bo->active_scanout--;
 					kgem_bo_destroy(&sna->kgem, crtc->flip_bo);
 					crtc->flip_bo = NULL;
commit fd6aaec33d8ad70544cc02e061c9c5e68cf83414
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 10 11:01:38 2014 +0100

    sna: Handle the user passing "Backlight" ""
    
    Allow the user to disable the backlight control by passing the empty
    string in the xorg.conf.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 40cc347..8e9f711 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -591,6 +591,8 @@ has_user_backlight_override(xf86OutputPtr output)
 		return NULL;
 
 	DBG(("%s(%s) requested %s\n", __FUNCTION__, output->name, str));
+	if (*str == '\0')
+		return str;
 
 	if (backlight_exists(str) == BL_NONE) {
 		xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,


More information about the xorg-commit mailing list