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

Chris Wilson ickle at kemper.freedesktop.org
Tue Mar 10 01:56:38 PDT 2015


 src/sna/gen6_common.h |    6 +++---
 src/sna/kgem.c        |    4 +++-
 src/sna/sna_display.c |   31 +++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 4 deletions(-)

New commits:
commit 15c307d70e00bc035bb61be5d8b6f727925e3d34
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Mar 10 08:48:48 2015 +0000

    sna: Force frontbuffer to CPU for randr fallback
    
    When we are using the fallback method, we need to make sure the source
    is on the CPU.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89053
    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 fd6c46c..f648d62 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6977,6 +6977,14 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 	     __FUNCTION__, format->format, depth, draw->bitsPerPixel,
 	     bo->pitch, crtc->mode.HDisplay, crtc->mode.VDisplay));
 
+	if (sx | sy)
+		RegionTranslate(region, sx, sy);
+	error = !sna_drawable_move_region_to_cpu(draw, region, MOVE_READ);
+	if (sx | sy)
+		RegionTranslate(region, -sx, -sy);
+	if (error)
+		return;
+
 	ptr = kgem_bo_map__gtt(&sna->kgem, bo);
 	if (ptr == NULL)
 		return;
@@ -6999,6 +7007,29 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 	pixman_transform_init_translate(&T, sx << 16, sy << 16);
 	pixman_transform_multiply(&T, &T, &crtc->crtc_to_framebuffer);
 	if (!sna_transform_is_integer_translation(&T, &sx, &sy)) {
+#define f2d(x) (((double)(x))/65536.)
+		DBG(("%s: transform=[[%f %f %f], [%f %f %f], [%f %f %f]] (raw [[%x %x %x], [%x %x %x], [%x %x %x]])\n",
+		     __FUNCTION__,
+		     f2d(T.matrix[0][0]),
+		     f2d(T.matrix[0][1]),
+		     f2d(T.matrix[0][2]),
+		     f2d(T.matrix[1][0]),
+		     f2d(T.matrix[1][1]),
+		     f2d(T.matrix[1][2]),
+		     f2d(T.matrix[2][0]),
+		     f2d(T.matrix[2][1]),
+		     f2d(T.matrix[2][2]),
+		     T.matrix[0][0],
+		     T.matrix[0][1],
+		     T.matrix[0][2],
+		     T.matrix[1][0],
+		     T.matrix[1][1],
+		     T.matrix[1][2],
+		     T.matrix[2][0],
+		     T.matrix[2][1],
+		     T.matrix[2][2]));
+#undef f2d
+
 		error = SetPictureTransform(src, &T);
 		if (error)
 			goto free_src;
commit 535b030c02c3769dbf537babb686a03544d9e8a3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Mar 9 16:33:06 2015 +0000

    sna: Strengthen assertions that batches are idle before overwriting
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index a5571aa..d75822f 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3249,7 +3249,9 @@ kgem_batch_write(struct kgem *kgem,
 	char *ptr;
 	int ret;
 
-	ASSERT_IDLE(kgem, bo->handle);
+	assert(bo->exec == NULL);
+	assert(bo->rq == NULL);
+	assert(!__kgem_busy(kgem, bo->handle));
 
 #if DBG_NO_EXEC
 	{
commit f7c4bc7c5f5a194e1794644c0641eb735f97b297
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Mar 7 21:09:39 2015 +0000

    sna/gen6+: Demote priority of COPY_LAST for copy boxes
    
    Even if we expect to flush at the end of the operation, we still want to
    consider semaphores before overriding the engine selection.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index 49e241f..b619714 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -49,9 +49,6 @@ inline static bool can_switch_to_blt(struct sna *sna,
 	if (NO_RING_SWITCH(sna))
 		return false;
 
-	if (flags & COPY_LAST)
-		return true;
-
 	if (bo && RQ_IS_BLT(bo->rq))
 		return true;
 
@@ -61,6 +58,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
 	if (bo && RQ_IS_RENDER(bo->rq))
 		return false;
 
+	if (flags & COPY_LAST)
+		return true;
+
 	return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
 }
 


More information about the xorg-commit mailing list