xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_dri.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Feb 12 14:03:01 PST 2013


 src/sna/sna_accel.c |    5 +++--
 src/sna/sna_dri.c   |   10 +++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 3b82d93162b9e127c6d055d5007e75fcc31f4af8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 12 21:53:38 2013 +0000

    sna/dri: Validate that the scanout flag is set
    
    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 9a7e246..9310e98 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1085,8 +1085,10 @@ sna_dri_frame_event_info_free(struct sna *sna,
 
 	assert(info->scanout[1].bo == NULL);
 
-	if (info->scanout[0].bo)
+	if (info->scanout[0].bo) {
+		assert(info->scanout[0].bo->scanout);
 		kgem_bo_destroy(&sna->kgem, info->scanout[0].bo);
+	}
 
 	if (info->cache.bo)
 		kgem_bo_destroy(&sna->kgem, info->cache.bo);
@@ -1108,6 +1110,7 @@ sna_dri_page_flip(struct sna *sna, struct sna_dri_frame_event *info)
 	assert(sna_pixmap_get_buffer(sna->front) == info->front);
 	assert(get_drawable_pixmap(info->draw)->drawable.height * bo->pitch <= kgem_bo_size(bo));
 	assert(info->scanout[0].bo);
+	assert(info->scanout[0].bo->scanout);
 	assert(info->scanout[1].bo == NULL);
 	assert(bo->refcnt);
 
@@ -1118,6 +1121,7 @@ sna_dri_page_flip(struct sna *sna, struct sna_dri_frame_event *info)
 	info->scanout[1] = info->scanout[0];
 	info->scanout[0].bo = ref(bo);
 	info->scanout[0].name = info->back->name;
+	assert(info->scanout[0].bo->scanout);
 
 	tmp.bo = get_private(info->front)->bo;
 	tmp.name = info->front->name;
@@ -1606,9 +1610,11 @@ sna_dri_flip_continue(struct sna *sna, struct sna_dri_frame_event *info)
 		if (!info->count)
 			return false;
 
+		assert(info->scanout[0].bo->scanout);
 		info->scanout[1] = info->scanout[0];
 		info->scanout[0].bo = ref(get_private(info->front)->bo);
 		info->scanout[0].name = info->front->name;
+		assert(info->scanout[0].bo->scanout);
 		sna->dri.flip_pending = info;
 	} else {
 		if (!info->draw)
@@ -1953,6 +1959,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw,
 
 		info->scanout[0].bo = ref(get_private(front)->bo);
 		info->scanout[0].name = info->front->name;
+		assert(info->scanout[0].bo->scanout);
 
 		sna_dri_add_frame_event(draw, info);
 		sna_dri_reference_buffer(front);
@@ -2004,6 +2011,7 @@ out:
 
 	info->scanout[0].bo = ref(get_private(front)->bo);
 	info->scanout[0].name = info->front->name;
+	assert(info->scanout[0].bo->scanout);
 
 	sna_dri_add_frame_event(draw, info);
 	sna_dri_reference_buffer(front);
commit 04e4805f57fdf0581e5e75c29c275c15c79852a3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 12 21:52:35 2013 +0000

    sna: Prefer inplace readback if the GPU doesn't support cacheable BLTs
    
    As we must perform the GTT reads anyway, first see if we can copy
    directly to the destination.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 18046a6..134b72f 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4579,8 +4579,9 @@ fallback:
 						   RegionExtents(region));
 
 			mode = MOVE_READ;
-			if (src_priv->cpu_bo == NULL &&
-			    (src_priv->create & KGEM_CAN_CREATE_CPU) == 0)
+			if (!sna->kgem.can_blt_cpu ||
+			    (src_priv->cpu_bo == NULL &&
+			     (src_priv->create & KGEM_CAN_CREATE_CPU) == 0))
 				mode |= MOVE_INPLACE_HINT;
 
 			if (!sna_drawable_move_region_to_cpu(&src_pixmap->drawable,


More information about the xorg-commit mailing list