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

Chris Wilson ickle at kemper.freedesktop.org
Thu Feb 7 06:07:41 PST 2013


 src/sna/kgem.h   |    1 +
 src/sna/sna_io.c |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c405dba367bdca51221bd2464213199783dc18fe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Feb 7 13:41:42 2013 +0000

    sna: Also assert that the GPU is not wedged before continuing a batch
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index d05326a..a23194f 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -382,6 +382,7 @@ static inline void _kgem_set_mode(struct kgem *kgem, enum kgem_mode mode)
 {
 	assert(kgem->mode == KGEM_NONE);
 	assert(kgem->nbatch == 0);
+	assert(!kgem->wedged);
 	kgem->context_switch(kgem, mode);
 	kgem->mode = mode;
 }
commit feeff6fcefccdca5335fea55c2fdbf8a4004c175
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Feb 7 13:33:58 2013 +0000

    sna: Force GTT readback if the GPU is wedged
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 85622bf..f89cd89 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -117,6 +117,9 @@ static void read_boxes_inplace(struct kgem *kgem,
 
 static bool download_inplace(struct kgem *kgem, struct kgem_bo *bo)
 {
+	if (unlikely(kgem->wedged))
+		return true;
+
 	if (!kgem_bo_can_map(kgem, bo))
 		return false;
 
@@ -623,7 +626,7 @@ static bool upload_inplace(struct kgem *kgem,
 			   const BoxRec *box,
 			   int n, int bpp)
 {
-	if (kgem->wedged)
+	if (unlikely(kgem->wedged))
 		return true;
 
 	if (!kgem_bo_can_map(kgem, bo) && !upload_inplace__tiled(kgem, bo))
@@ -993,7 +996,7 @@ static bool upload_inplace__xor(struct kgem *kgem,
 				const BoxRec *box,
 				int n, int bpp)
 {
-	if (kgem->wedged)
+	if (unlikely(kgem->wedged))
 		return true;
 
 	if (!kgem_bo_can_map(kgem, bo))


More information about the xorg-commit mailing list