xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/kgem.h src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Nov 4 12:50:43 CET 2013


 src/sna/kgem.c      |   20 ++++++++++----------
 src/sna/kgem.h      |    4 ++--
 src/sna/sna_accel.c |    4 +++-
 3 files changed, 15 insertions(+), 13 deletions(-)

New commits:
commit 82b646a42f5a6271c8518ad454f1603714276caf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 4 11:48:04 2013 +0000

    sna: Only use the simple stipple upload path if wholly contained
    
    If the stipple box is outside of the stipple pixmap, we need to
    carefully upload the stipple using the modulus operation.
    
    Buzilla: https://bugs.launchpad.net/bugs/1247785
    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 b8d89d6..28cdd74 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -13648,7 +13648,9 @@ sna_poly_fill_rect_stippled_blt(DrawablePtr drawable,
 							   gc, n, rect,
 							   extents, clipped);
 
-	if (extents->x2 - gc->patOrg.x - drawable->x <= stipple->drawable.width &&
+	if (extents->x1 - gc->patOrg.x - drawable->x >= 0 &&
+	    extents->x2 - gc->patOrg.x - drawable->x <= stipple->drawable.width &&
+	    extents->y1 - gc->patOrg.y - drawable->y >= 0 &&
 	    extents->y2 - gc->patOrg.y - drawable->y <= stipple->drawable.height) {
 		if (stipple->drawable.width <= 8 && stipple->drawable.height <= 8)
 			return sna_poly_fill_rect_stippled_8x8_blt(drawable, bo, damage,
commit e678cead11b53699694f5b5cf52ff3ea0e08f637
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 4 11:47:29 2013 +0000

    sna: Update DBG formats for larger BO offset integers
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index a5bb553..cf1262d 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -5074,8 +5074,8 @@ uint64_t kgem_add_reloc64(struct kgem *kgem,
 {
 	int index;
 
-	DBG(("%s: handle=%d, pos=%d, delta=%d, domains=%08x\n",
-	     __FUNCTION__, bo ? bo->handle : 0, pos, delta, read_write_domain));
+	DBG(("%s: handle=%d, pos=%d, delta=%ld, domains=%08x\n",
+	     __FUNCTION__, bo ? bo->handle : 0, pos, (long)delta, read_write_domain));
 
 	assert(kgem->gen >= 0100);
 	assert((read_write_domain & 0x7fff) == 0 || bo != NULL);
@@ -5087,8 +5087,8 @@ uint64_t kgem_add_reloc64(struct kgem *kgem,
 		assert(kgem->mode != KGEM_NONE);
 		assert(bo->refcnt);
 		while (bo->proxy) {
-			DBG(("%s: adding proxy [delta=%d] for handle=%d\n",
-			     __FUNCTION__, bo->delta, bo->handle));
+			DBG(("%s: adding proxy [delta=%ld] for handle=%d\n",
+			     __FUNCTION__, (long)bo->delta, bo->handle));
 			delta += bo->delta;
 			assert(bo->handle == bo->proxy->handle);
 			/* need to release the cache upon batch submit */
@@ -5195,8 +5195,8 @@ void *kgem_bo_map__async(struct kgem *kgem, struct kgem_bo *bo)
 {
 	void *ptr;
 
-	DBG(("%s: handle=%d, offset=%d, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
-	     bo->handle, bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
+	DBG(("%s: handle=%d, offset=%ld, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
+	     bo->handle, (long)bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
 
 	assert(bo->proxy == NULL);
 	assert(list_is_empty(&bo->list));
@@ -5234,8 +5234,8 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo)
 {
 	void *ptr;
 
-	DBG(("%s: handle=%d, offset=%d, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
-	     bo->handle, bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
+	DBG(("%s: handle=%d, offset=%ld, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
+	     bo->handle, (long)bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
 
 	assert(bo->proxy == NULL);
 	assert(list_is_empty(&bo->list));
@@ -5298,8 +5298,8 @@ void *kgem_bo_map__gtt(struct kgem *kgem, struct kgem_bo *bo)
 {
 	void *ptr;
 
-	DBG(("%s: handle=%d, offset=%d, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
-	     bo->handle, bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
+	DBG(("%s: handle=%d, offset=%ld, tiling=%d, map=%p:%p, domain=%d\n", __FUNCTION__,
+	     bo->handle, (long)bo->presumed_offset, bo->tiling, bo->map__gtt, bo->map__cpu, bo->domain));
 
 	assert(bo->exec == NULL);
 	assert(list_is_empty(&bo->list));
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 9b522e8..f2abb04 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -647,8 +647,8 @@ static inline bool kgem_bo_mapped(struct kgem *kgem, struct kgem_bo *bo)
 
 static inline bool kgem_bo_can_map(struct kgem *kgem, struct kgem_bo *bo)
 {
-	DBG(("%s: map=%p:%p, tiling=%d, domain=%d, offset=%d\n",
-	     __FUNCTION__, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain, bo->presumed_offset));
+	DBG(("%s: map=%p:%p, tiling=%d, domain=%d, offset=%ld\n",
+	     __FUNCTION__, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain, (long)bo->presumed_offset));
 
 	if (!bo->tiling && (kgem->has_llc || bo->domain == DOMAIN_CPU))
 		return true;


More information about the xorg-commit mailing list