sna: Make sure we reset the domain tracking when exporting DRI bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-08-28 08:33:00 +01:00
parent 96a921487e
commit b5c8efe430
2 changed files with 4 additions and 0 deletions

View File

@ -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.

View File

@ -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.