xf86-video-intel: 4 commits - src/sna/kgem.c src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Aug 7 07:21:48 PDT 2015
src/sna/kgem.c | 16 ++++++++++++----
src/sna/sna_accel.c | 9 +++++++++
2 files changed, 21 insertions(+), 4 deletions(-)
New commits:
commit 3f128867d957e30690218404337b00bb327e647b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 15:19:17 2015 +0100
sna: Skip a no-op copy
If the source has no contents, the destination is equally undefined.
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 a816b77..c624d9e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6445,6 +6445,15 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
assert(region_num_rects(region));
+ if (src_priv &&
+ src_priv->gpu_damage == NULL &&
+ src_priv->cpu_damage == NULL) {
+ /* Rare but still happens, nothing to copy */
+ DBG(("%s: src pixmap=%ld is empty\n",
+ __FUNCTION__, src_pixmap->drawable.serialNumber));
+ return;
+ }
+
if (src_pixmap == dst_pixmap)
return sna_self_copy_boxes(src, dst, gc,
region, dx, dy,
commit a3ac461a302498335fc7b03ec3a59e9a2fd61a75
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 15:18:49 2015 +0100
sna: Add a handle=%d to a DBG for consistency
Helps with grepping if the DBG are consistent.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 86356af..34893d7 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4339,7 +4339,7 @@ bool kgem_expire_cache(struct kgem *kgem)
count++;
size += bytes(bo);
kgem_bo_free(kgem, bo);
- DBG(("%s: expiring %d\n",
+ DBG(("%s: expiring handle=%d\n",
__FUNCTION__, bo->handle));
}
}
commit 5ef9d68043dac2628695b145846e724c2fa98abc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 14:04:31 2015 +0100
sna: More simple DBG tracing around cleanup/retire handling
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 064853c..86356af 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -661,10 +661,11 @@ static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
struct local_i915_gem_mmap arg;
int err;
-retry:
VG_CLEAR(arg);
- arg.handle = bo->handle;
arg.offset = 0;
+
+retry:
+ arg.handle = bo->handle;
arg.size = bytes(bo);
if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
DBG(("%s: failed %d, throttling/cleaning caches\n",
@@ -2518,6 +2519,8 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
if (bucket(bo) >= NUM_CACHE_BUCKETS) {
if (bo->map__gtt) {
+ DBG(("%s: relinquishing large GTT mapping for handle=%d\n",
+ __FUNCTION__, bo->handle));
munmap(bo->map__gtt, bytes(bo));
bo->map__gtt = NULL;
}
@@ -3381,8 +3384,10 @@ static void kgem_close_inactive(struct kgem *kgem)
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(kgem->inactive); i++)
+ for (i = 0; i < ARRAY_SIZE(kgem->inactive); i++) {
kgem_close_list(kgem, &kgem->inactive[i]);
+ assert(list_is_empty(&kgem->inactive[i]));
+ }
}
static void kgem_finish_buffers(struct kgem *kgem)
commit fd0236bb8e2e15665d72b8eb7f5ff15571a5c60b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 13:48:38 2015 +0100
sna: Release the reference on the rq->bo during forced cleanup
Since the switch to preallocating the batch buffer, the request owns its
reference to the rq->bo. However, dropping that reference was missed
during the cleanup.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 33f9f7e..064853c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3594,6 +3594,9 @@ static void kgem_cleanup(struct kgem *kgem)
kgem_bo_free(kgem, bo);
}
+ if (--rq->bo->refcnt == 0)
+ kgem_bo_free(kgem, rq->bo);
+
__kgem_request_free(rq);
}
}
More information about the xorg-commit
mailing list