From b5c8efe4309248e62d94d80b37a70775284ae985 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 28 Aug 2012 08:33:00 +0100 Subject: [PATCH] sna: Make sure we reset the domain tracking when exporting DRI bo Signed-off-by: Chris Wilson --- src/sna/kgem.c | 2 ++ src/sna/sna_dri.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index cd16ffee..520f0b24 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3905,6 +3905,8 @@ uint32_t kgem_bo_flink(struct kgem *kgem, struct kgem_bo *bo) /* The bo is outside of our control, so presume it is written to */ bo->needs_flush = true; + if (bo->domain != DOMAIN_GPU) + bo->domain = DOMAIN_NONE; /* Henceforth, we need to broadcast all updates to clients and * flush our rendering before doing so. diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 8967ed9a..06a940b2 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -426,6 +426,8 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo) kgem_bo_destroy(&sna->kgem, priv->gpu_bo); priv->gpu_bo = ref(bo); + if (bo->domain != DOMAIN_GPU) + bo->domain = DOMAIN_NONE; /* Post damage on the new front buffer so that listeners, such * as DisplayLink know take a copy and shove it over the USB.