sna: Only mark the pixmap as GTT mapped if the private owns the pixels
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
3061382f98
commit
352f0a3ffb
|
|
@ -1914,11 +1914,13 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
|
|||
}
|
||||
|
||||
/* And mark as having a valid GTT mapping for future uploads */
|
||||
pixmap->devPrivate.ptr =
|
||||
kgem_bo_map(&sna->kgem, priv->gpu_bo, PROT_WRITE);
|
||||
if (pixmap->devPrivate.ptr) {
|
||||
priv->mapped = 1;
|
||||
pixmap->devKind = priv->gpu_bo->pitch;
|
||||
if (priv->stride) {
|
||||
pixmap->devPrivate.ptr =
|
||||
kgem_bo_map(&sna->kgem, priv->gpu_bo, PROT_WRITE);
|
||||
if (pixmap->devPrivate.ptr) {
|
||||
priv->mapped = 1;
|
||||
pixmap->devKind = priv->gpu_bo->pitch;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue