xf86-video-intel: 4 commits - src/sna/blt.c src/sna/gen6_common.h src/sna/gen9_render.c src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Apr 15 18:38:16 UTC 2016
src/sna/blt.c | 22 ++++++++++++----------
src/sna/gen6_common.h | 8 ++++----
src/sna/gen9_render.c | 2 +-
src/sna/sna_display.c | 10 ++++++++--
4 files changed, 25 insertions(+), 17 deletions(-)
New commits:
commit c3dc8310575acdbbef4565f53644384c7ce4a6f5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 15 19:34:15 2016 +0100
sna: Mark the transformed cursor image as dirty
So that when we size from transformed cursors to non-transformed, we
remember to clear the entire area.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index ff80a4e..3b5ae87 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5684,8 +5684,14 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc)
cursor->rotation = rotation;
cursor->transformed = transformed;
cursor->serial = sna->cursor.serial;
- cursor->last_width = width;
- cursor->last_height = height;
+ if (transformed) {
+ /* mark the transformed rectangle as dirty, not input */
+ cursor->last_width = size;
+ cursor->last_height = size;
+ } else {
+ cursor->last_width = width;
+ cursor->last_height = height;
+ }
return cursor;
}
commit d30d276aeebe666e2c71a275bb2c71781c75448b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 15 19:26:34 2016 +0100
sna/blt: Reuse computed partial tile offset in copy_from_tiled
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/blt.c b/src/sna/blt.c
index e82647e..c1ac166 100644
--- a/src/sna/blt.c
+++ b/src/sna/blt.c
@@ -721,13 +721,16 @@ memcpy_from_tiled_x__swizzle_0__sse2(const void *src, void *dst, int bpp,
width *= cpp;
assert(dst_stride >= width);
if (src_x & tile_mask) {
- dst_stride -= width;
offset_x = (src_x & tile_mask) * cpp;
length_x = min(tile_width - offset_x, width);
+ dst_stride -= width;
dst_stride += (width - length_x) & 15;
- } else
+ } else {
+ offset_x = 0;
dst_stride -= width & ~15;
+ }
assert(dst_stride >= 0);
+ src_x = (src_x >> tile_shift) * tile_size;
while (height--) {
unsigned w = width;
@@ -735,17 +738,16 @@ memcpy_from_tiled_x__swizzle_0__sse2(const void *src, void *dst, int bpp,
tile_row += src_y / tile_height * src_stride * tile_height;
tile_row += (src_y & (tile_height-1)) * tile_width;
+ tile_row += src_x;
src_y++;
- if (src_x) {
- tile_row += (src_x >> tile_shift) * tile_size;
- if (src_x & tile_mask) {
- memcpy(dst, tile_row + offset_x, length_x);
- tile_row += tile_size;
- dst = (uint8_t *)dst + length_x;
- w -= length_x;
- }
+ if (offset_x) {
+ memcpy(dst, tile_row + offset_x, length_x);
+ tile_row += tile_size;
+ dst = (uint8_t *)dst + length_x;
+ w -= length_x;
}
+
if ((uintptr_t)dst & 15) {
while (w >= tile_width) {
from_sse128xNu(dst,
commit bb69256b5270b6ff64a87db4eb308f1cc856679c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 15 15:16:00 2016 +0100
sna/gen6: Encourage migration of small BLT operations
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index 898cda8..83adc7d 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -46,9 +46,6 @@ inline static bool can_switch_to_blt(struct sna *sna,
if (sna->kgem.ring != KGEM_RENDER)
return true;
- if (NO_RING_SWITCH(sna))
- return false;
-
if (bo && RQ_IS_BLT(bo->rq))
return true;
@@ -61,6 +58,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
if (bo && RQ_IS_RENDER(bo->rq))
return false;
+ if (NO_RING_SWITCH(sna))
+ return false;
+
if (flags & COPY_LAST)
return true;
@@ -207,7 +207,7 @@ prefer_blt_fill(struct sna *sna, struct kgem_bo *bo, unsigned flags)
if (!prefer_blt_ring(sna, bo, 0))
return false;
} else {
- if (can_switch_to_blt(sna, bo, 0))
+ if (can_switch_to_blt(sna, bo, COPY_LAST))
return true;
}
commit 0d38419cbeaae5f8b5260e4d4dd9cfa0d2694eae
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 15 14:58:57 2016 +0100
sna/gen9: Update mocs selection
Since the choice is now boolean (use PTE or use WB), remove the third
uncached condition.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen9_render.c b/src/sna/gen9_render.c
index 889cded..3c1f07a 100644
--- a/src/sna/gen9_render.c
+++ b/src/sna/gen9_render.c
@@ -1427,7 +1427,7 @@ gen9_bind_bo(struct sna *sna,
domains = I915_GEM_DOMAIN_RENDER << 16 |I915_GEM_DOMAIN_RENDER;
} else
domains = I915_GEM_DOMAIN_SAMPLER << 16;
- ss[1] = (is_dst && is_uncached(sna, bo)) ? 0 : is_scanout ? MOCS_PTE << 24 : MOCS_WB << 24;
+ ss[1] = (is_scanout || (is_dst && is_uncached(sna, bo))) ? MOCS_PTE << 24 : MOCS_WB << 24;
ss[2] = ((width - 1) << SURFACE_WIDTH_SHIFT |
(height - 1) << SURFACE_HEIGHT_SHIFT);
ss[3] = (bo->pitch - 1) << SURFACE_PITCH_SHIFT;
More information about the xorg-commit
mailing list