xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Jul 7 02:09:21 PDT 2012
src/sna/kgem.c | 7 ++++++-
src/sna/sna_accel.c | 6 ++----
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 5d2f88fd9972c62c87098ddc7fee7b6f0cea0fdb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Jul 7 10:07:51 2012 +0100
sna: Add a couple of DBG flags to control upload buffers
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 2ace6ca..2578ff9 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -60,6 +60,8 @@ search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
#define DBG_NO_LLC 0
#define DBG_NO_SEMAPHORES 0
#define DBG_NO_MADV 0
+#define DBG_NO_UPLOAD_CACHE 0
+#define DBG_NO_UPLOAD_ACTIVE 0
#define DBG_NO_MAP_UPLOAD 0
#define DBG_NO_RELAXED_FENCING 0
#define DBG_DUMP 0
@@ -1682,7 +1684,8 @@ static void kgem_finish_partials(struct kgem *kgem)
if (bo->mmapped) {
assert(!bo->need_io);
- if (bo->used + PAGE_SIZE <= bytes(&bo->base) &&
+ if (!DBG_NO_UPLOAD_ACTIVE &&
+ bo->used + PAGE_SIZE <= bytes(&bo->base) &&
(kgem->has_llc || !IS_CPU_MAP(bo->base.map))) {
DBG(("%s: retaining partial upload buffer (%d/%d)\n",
__FUNCTION__, bo->used, bytes(&bo->base)));
@@ -3793,6 +3796,7 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
if (kgem->has_llc)
flags &= ~KGEM_BUFFER_INPLACE;
+#if !DBG_NO_UPLOAD_CACHE
list_for_each_entry(bo, &kgem->batch_partials, base.list) {
assert(bo->base.io);
assert(bo->base.refcnt >= 1);
@@ -3863,6 +3867,7 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
}
}
}
+#endif
#if !DBG_NO_MAP_UPLOAD
/* Be a little more generous and hope to hold fewer mmappings */
commit 18b3090381ac0fb61df96a7c6b2f12aacf180ee8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Jul 7 00:06:36 2012 +0100
sna: Fixup USE_INPLACE debug hint
After we enabled inplace readback, we can just apply the INPLACE hint to
all fallbacks, but instead apply it to the automatic testing for a
potential inplace operation.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 794086c..e553baf 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1065,7 +1065,7 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
priv->gpu_bo ? priv->gpu_bo->handle : 0,
priv->gpu_damage, priv->cpu_damage, priv->clear));
- if ((flags & MOVE_READ) == 0) {
+ if (USE_INPLACE && (flags & MOVE_READ) == 0) {
assert(flags & MOVE_WRITE);
DBG(("%s: no readbck, discarding gpu damage [%d], pending clear[%d]\n",
__FUNCTION__, priv->gpu_damage != NULL, priv->clear));
@@ -1485,7 +1485,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
return _sna_pixmap_move_to_cpu(pixmap, flags);
}
- if ((flags & MOVE_READ) == 0) {
+ if (USE_INPLACE && (flags & MOVE_READ) == 0) {
DBG(("%s: no read, checking to see if we can stream the write into the GPU bo\n",
__FUNCTION__));
assert(flags & MOVE_WRITE);
@@ -2001,8 +2001,6 @@ inline static unsigned drawable_gc_flags(DrawablePtr draw,
__FUNCTION__, drawable_gc_inplace_hint(draw, gc)));
flags = MOVE_WRITE;
- if (USE_INPLACE)
- flags |= MOVE_INPLACE_HINT;
if (read) {
DBG(("%s: partial write\n", __FUNCTION__));
flags |= MOVE_READ;
More information about the xorg-commit
mailing list