xf86-video-intel: src/sna/kgem.h src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Mar 4 03:56:56 PST 2013
src/sna/kgem.h | 3 +++
src/sna/sna_accel.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 4be725333c11804a45c80a4bc45852e81ea57ed5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 4 11:55:16 2013 +0000
sna: Ensure we do not attempt to operate inplace on a very large pixmap
Otherwise we will fail to map it into the GTT. In theory, this should
just result in the same fallback paths, but pushing that knowledge up
further should help us make better decisions.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index a23194f..d6940af 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -519,6 +519,9 @@ static inline bool __kgem_bo_is_mappable(struct kgem *kgem,
bo->presumed_offset & (kgem_bo_fenced_size(kgem, bo) - 1))
return false;
+ if (kgem->has_llc && bo->tiling == I915_TILING_NONE)
+ return true;
+
if (!bo->presumed_offset)
return kgem_bo_size(bo) <= kgem->aperture_mappable / 4;
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 730beaf..3d17209 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1372,11 +1372,14 @@ static inline bool pixmap_inplace(struct sna *sna,
return false;
if (priv->mapped)
- return !IS_CPU_MAP(priv->gpu_bo->map);
+ return !IS_CPU_MAP(priv->gpu_bo->map) || sna->kgem.has_llc;
if (!write_only && priv->cpu_damage)
return false;
+ if (priv->gpu_bo && !kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo))
+ return false;
+
return (pixmap->devKind * pixmap->drawable.height >> 12) >
sna->kgem.half_cpu_cache_pages;
}
More information about the xorg-commit
mailing list