summaryrefslogtreecommitdiff
path: root/src/i830_uxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_uxa.c')
-rw-r--r--src/i830_uxa.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index db8a5048..6e2e7b52 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -537,8 +537,15 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
priv = i830_get_pixmap_intel(pixmap);
+ if (priv == NULL && bo == NULL)
+ return;
+
if (priv != NULL) {
- if (list_is_empty(&priv->batch)) {
+ if (priv->bo == bo)
+ return;
+
+ if (list_is_empty(&priv->batch) ||
+ !drm_intel_bo_is_reusable(priv->bo)) {
dri_bo_unreference(priv->bo);
} else {
list_add(&priv->in_flight, &intel->in_flight);