xf86-video-intel: src/sna/sna_blt.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Sep 23 13:46:00 PDT 2012


 src/sna/sna_blt.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit c6008068372709c73034163eddc902b47bf87d24
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Sep 23 21:42:31 2012 +0100

    sna: Check against op->dst.bo rather than priv->cpu_bo for composite upload
    
    In this case, we may also be handling an unattached pixmap, so avoid the
    deferences of the sna_pixmap unless we are sure it will exist.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index b5d7ea7..94b5f4a 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1871,19 +1871,19 @@ clear:
 				goto put;
 		}
 	} else {
-		struct sna_pixmap *priv;
-
 put:
-		priv = sna_pixmap(tmp->dst.pixmap);
-		if (priv->cpu_bo && tmp->dst.bo == priv->cpu_bo) {
-			assert(kgem_bo_is_busy(tmp->dst.bo));
-			tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable,
-							  FORCE_GPU | PREFER_GPU,
-							  &dst_box,
-							  &tmp->damage);
+		if (tmp->dst.bo) {
+			struct sna_pixmap *priv = sna_pixmap(tmp->dst.pixmap);
 			if (tmp->dst.bo == priv->cpu_bo) {
-				DBG(("%s: forcing the stall to overwrite a busy CPU bo\n", __FUNCTION__));
-				tmp->dst.bo = NULL;
+				assert(kgem_bo_is_busy(tmp->dst.bo));
+				tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable,
+								  FORCE_GPU | PREFER_GPU,
+								  &dst_box,
+								  &tmp->damage);
+				if (tmp->dst.bo == priv->cpu_bo) {
+					DBG(("%s: forcing the stall to overwrite a busy CPU bo\n", __FUNCTION__));
+					tmp->dst.bo = NULL;
+				}
 			}
 		}
 


More information about the xorg-commit mailing list