xf86-video-intel: 3 commits - src/sna/gen6_render.c src/sna/kgem.c src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Feb 3 01:55:33 PST 2012
src/sna/gen6_render.c | 13 +++++++++++--
src/sna/kgem.c | 7 +++++++
src/sna/sna_accel.c | 5 ++++-
3 files changed, 22 insertions(+), 3 deletions(-)
New commits:
commit 4774c6b8331831e0c9f3b24f5f6e1b6ea399f628
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Feb 2 15:23:03 2012 +0000
sna: Add a couple of sanity checks that the CPU drawable is on the CPU
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 71d3f06..1d2b999 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1070,7 +1070,8 @@ done:
DBG(("%s: syncing CPU bo\n", __FUNCTION__));
kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
}
-
+ assert(pixmap->devPrivate.ptr);
+ assert(pixmap->devKind);
return true;
}
@@ -1534,6 +1535,8 @@ out:
DBG(("%s: syncing cpu bo\n", __FUNCTION__));
kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
}
+ assert(pixmap->devPrivate.ptr);
+ assert(pixmap->devKind);
return true;
}
commit 418cd98db7c4a2886c9e310f3691eb6c77421dd7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 1 19:10:41 2012 +0000
sna/gen6: Ring switching outweighs the benefits for cairo-traces
At the moment, the jury is still out on whether freely switching rings
for fills is a Good Idea. So make it easier to turn it on and off for
testing.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index ec5412a..9f799ef 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -57,6 +57,8 @@
#define NO_FILL_BOXES 0
#define NO_CLEAR 0
+#define NO_RING_SWITCH 1
+
#define GEN6_MAX_SIZE 8192
static const uint32_t ps_kernel_nomask_affine[][4] = {
@@ -2215,6 +2217,11 @@ static bool prefer_blt_ring(struct sna *sna)
return sna->kgem.ring != KGEM_RENDER;
}
+static bool can_switch_rings(struct sna *sna)
+{
+ return sna->kgem.has_semaphores && !NO_RING_SWITCH;
+}
+
static bool
is_solid(PicturePtr picture)
{
@@ -2252,7 +2259,7 @@ try_blt(struct sna *sna,
return TRUE;
}
- if (sna->kgem.has_semaphores) {
+ if (can_switch_rings(sna)) {
if (is_solid(src))
return TRUE;
}
@@ -3432,7 +3439,9 @@ gen6_emit_fill_state(struct sna *sna, const struct sna_composite_op *op)
static inline bool prefer_blt_fill(struct sna *sna,
struct kgem_bo *bo)
{
- return sna->kgem.has_semaphores || prefer_blt_ring(sna) || untiled_tlb_miss(bo);
+ return (can_switch_rings(sna) ||
+ prefer_blt_ring(sna) ||
+ untiled_tlb_miss(bo));
}
static Bool
commit 2d0e7c7ecd7371ac7b5fe3f382fc5d04792f7019
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 1 14:52:56 2012 +0000
sna: Search again for a just-large-enough mapping for inplace uploads
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index b446558..d2580e6 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -104,6 +104,8 @@ static inline void list_replace(struct list *old,
#endif
#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
+#define NUM_PAGES(x) (((x) + PAGE_SIZE-1) / PAGE_SIZE)
+
#define MAX_GTT_VMA_CACHE 512
#define MAX_CPU_VMA_CACHE INT16_MAX
#define MAP_PRESERVE_TIME 10
@@ -3215,6 +3217,8 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
old = search_linear_cache(kgem, alloc, CREATE_CPU_MAP);
if (old == NULL)
old = search_linear_cache(kgem, alloc, CREATE_INACTIVE | CREATE_CPU_MAP);
+ if (old == NULL)
+ old = search_linear_cache(kgem, NUM_PAGES(size), CREATE_INACTIVE | CREATE_CPU_MAP);
if (old) {
DBG(("%s: reusing handle=%d for buffer\n",
__FUNCTION__, old->handle));
@@ -3290,6 +3294,9 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
}
}
#endif
+ if (old == NULL)
+ old = search_linear_cache(kgem, NUM_PAGES(size),
+ CREATE_INACTIVE | CREATE_GTT_MAP);
if (old) {
DBG(("%s: reusing handle=%d for buffer\n",
__FUNCTION__, old->handle));
More information about the xorg-commit
mailing list