sna: Don't force a migration from CPU rendering for a DRI2 flushed pixmap

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-30 15:43:05 +00:00
parent 60a3b370ae
commit 6312f58014
1 changed files with 6 additions and 7 deletions

View File

@ -1579,8 +1579,7 @@ skip_inplace_map:
DBG(("%s: try to operate inplace (GTT)\n", __FUNCTION__));
assert(priv->cpu == false);
pixmap->devPrivate.ptr =
kgem_bo_map(&sna->kgem, priv->gpu_bo);
pixmap->devPrivate.ptr = kgem_bo_map(&sna->kgem, priv->gpu_bo);
priv->mapped = pixmap->devPrivate.ptr != NULL;
if (priv->mapped) {
pixmap->devKind = priv->gpu_bo->pitch;
@ -1820,11 +1819,6 @@ static inline bool region_inplace(struct sna *sna,
return false;
}
if (priv->flush) {
DBG(("%s: yes, exported via dri, will flush\n", __FUNCTION__));
return true;
}
if (priv->cpu) {
DBG(("%s: no, preferring last action of CPU\n", __FUNCTION__));
return false;
@ -1835,6 +1829,11 @@ static inline bool region_inplace(struct sna *sna,
return !IS_CPU_MAP(priv->gpu_bo->map);
}
if (priv->flush) {
DBG(("%s: yes, exported via dri, will flush\n", __FUNCTION__));
return true;
}
if (DAMAGE_IS_ALL(priv->gpu_damage)) {
DBG(("%s: yes, already wholly damaged on the GPU\n", __FUNCTION__));
return true;