xf86-video-intel: 2 commits - src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jul 6 05:06:32 PDT 2011
src/sna/kgem.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 0be47f459ba576ed3f93367de18732fb2367357a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 6 13:02:53 2011 +0100
sna: Check against an execbuffer reference before discarding partials
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 4ae50bf..dfac976 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -983,7 +983,7 @@ static void kgem_expire_partial(struct kgem *kgem)
struct kgem_partial_bo *bo, *next;
list_for_each_entry_safe(bo, next, &kgem->partial, base.list) {
- if (bo->base.refcnt > 1)
+ if (bo->base.refcnt > 1 || bo->base.exec)
continue;
DBG(("%s: discarding unused partial array: %d/%d\n",
@@ -1785,7 +1785,7 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
if (bo->write != write)
continue;
- if (bo->base.refcnt == 1)
+ if (bo->base.refcnt == 1 && bo->base.exec == NULL)
/* no users, so reset */
bo->used = 0;
commit f6573fe7577e00a1d2706dbc39179ab658c021d2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 6 12:44:08 2011 +0100
sna: Compute aligned tiled heights for gen2 correctly
We were underestimating the height of X-tiled surfaces (and less
harmfully overestimating the height of Y-tiled surfaces.)
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 805677a..4ae50bf 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -452,11 +452,14 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
return tile_width;
}
-static uint32_t kgem_aligned_height(uint32_t height, uint32_t tiling)
+static uint32_t kgem_aligned_height(struct kgem *kgem,
+ uint32_t height, uint32_t tiling)
{
uint32_t tile_height;
- switch (tiling) {
+ if (kgem->gen < 30) {
+ tile_height = tiling ? 16 : 2;
+ } else switch (tiling) {
default:
case I915_TILING_NONE:
tile_height = 2;
@@ -1311,7 +1314,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
goto skip_active_search;
for (i = 0; i <= I915_TILING_Y; i++)
- tiled_height[i] = kgem_aligned_height(height, i);
+ tiled_height[i] = kgem_aligned_height(kgem, height, i);
search = 0;
/* Best active match first */
More information about the xorg-commit
mailing list