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

Chris Wilson ickle at kemper.freedesktop.org
Mon Sep 23 13:12:38 PDT 2013


 src/sna/sna_dri.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 63a81c87b1be3607243aaa0acc4cb669fee02b4b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 23 21:08:13 2013 +0100

    sna/dri: Prevent a NULL dereference in a DBG msg
    
    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 7dfa479..56cb78f 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1468,7 +1468,6 @@ sna_dri_immediate_blit(struct sna *sna,
 static void
 sna_dri_flip_get_back(struct sna *sna, struct sna_dri_frame_event *info)
 {
-	struct dri_bo *c;
 	struct kgem_bo *bo;
 	uint32_t name;
 
@@ -1489,13 +1488,15 @@ sna_dri_flip_get_back(struct sna *sna, struct sna_dri_frame_event *info)
 
 	bo = NULL;
 	if (!list_is_empty(&info->cache)) {
-		c = list_first_entry(&info->cache, struct dri_bo, link);
-		bo = c->bo;
-		name = c->name;
-		DBG(("%s: reuse cache handle=%d,name=%d\n", __FUNCTION__,
-		     bo->handle, name));
-		list_move_tail(&c->link, &info->cache);
-		c->bo = NULL;
+		struct dri_bo *c = list_first_entry(&info->cache, struct dri_bo, link);
+		if (c->bo) {
+			bo = c->bo;
+			name = c->name;
+			DBG(("%s: reuse cache handle=%d,name=%d\n", __FUNCTION__,
+			     bo->handle, name));
+			list_move_tail(&c->link, &info->cache);
+			c->bo = NULL;
+		}
 	}
 	if (bo == NULL) {
 		DBG(("%s: allocating new backbuffer\n", __FUNCTION__));
commit 3fd116782bb1c05a140f4783e92a8ee6a57143cd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 23 21:03:07 2013 +0100

    sna/dri: Clear the clear hint upon applying DRI damage
    
    Otherwise a later call to GetImage will not notice the DRI update if it
    was already clear - and so return a blank image. One example is the use
    of x11vnc replaying xbmc.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69730
    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 2f1ccff..7dfa479 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -479,6 +479,7 @@ damage_all:
 		sna_damage_add(&priv->gpu_damage, region);
 	}
 	priv->cpu = false;
+	priv->clear = false;
 }
 
 static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
@@ -514,6 +515,7 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
 	sna_damage_destroy(&priv->cpu_damage);
 	list_del(&priv->flush_list);
 	priv->cpu = false;
+	priv->clear = false;
 
 	assert(bo->refcnt);
 	if (priv->gpu_bo != bo) {


More information about the xorg-commit mailing list