xf86-video-intel: 3 commits - src/sna/kgem.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Aug 7 05:01:31 PDT 2015
src/sna/kgem.c | 9 ++++++---
src/sna/sna_dri2.c | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)
New commits:
commit d78685787a595ca68aec08074744fa23ed4f3d93
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 12:59:57 2015 +0100
sna: Fix sync'ing to the most recent request on forced cache cleanup
We picked the oldest, not most recent and so were not recovering as much
memory as desired.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index be0480c..30058dc 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4369,13 +4369,14 @@ bool kgem_cleanup_cache(struct kgem *kgem)
if (!list_is_empty(&kgem->requests[n])) {
struct kgem_request *rq;
- rq = list_first_entry(&kgem->requests[n],
- struct kgem_request,
- list);
+ rq = list_last_entry(&kgem->requests[n],
+ struct kgem_request,
+ list);
DBG(("%s: sync on cleanup\n", __FUNCTION__));
kgem_bo_wait(kgem, rq->bo);
}
+ assert(list_is_empty(&kgem->requests[n]));
}
kgem_retire(kgem);
commit 862c0d3cc9634923f4c6db987c658164e6de50da
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 12:57:31 2015 +0100
sna/dri2: Make event chaining DBG clearer
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e64c8ac..1872d0c 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2325,6 +2325,9 @@ static void chain_swap(struct sna_dri2_event *chain)
union drm_wait_vblank vbl;
struct copy tmp;
+ DBG(("%s: draw=%ld, queued?=%d, type=%d\n",
+ __FUNCTION__, (long)chain->draw->id, chain->queued, chain->type));
+
if (chain->draw == NULL) {
sna_dri2_event_free(chain);
return;
@@ -2333,8 +2336,6 @@ static void chain_swap(struct sna_dri2_event *chain)
if (chain->queued) /* too early! */
return;
- DBG(("%s: chaining draw=%ld, type=%d\n",
- __FUNCTION__, (long)chain->draw->id, chain->type));
assert(chain == dri2_chain(chain->draw));
chain->queued = true;
@@ -2583,6 +2584,7 @@ void sna_dri2_vblank_handler(struct drm_event_vblank *event)
}
if (info->chain) {
+ DBG(("%s: continuing chain\n", __FUNCTION__));
assert(info->chain != info);
assert(info->draw == draw);
sna_dri2_remove_event((WindowPtr)draw, info);
commit f1b1baa7ffe55a78537160d8b679ce0225f06d63
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Aug 7 12:45:26 2015 +0100
sna: Add a DBG for when we discard an invalid old mmapping
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index bc393ff..be0480c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2528,6 +2528,8 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
assert(list_is_empty(&bo->vma));
list_move(&bo->list, &kgem->inactive[bucket(bo)]);
if (bo->map__gtt && !kgem_bo_can_map(kgem, bo)) {
+ DBG(("%s: relinquishing old GTT mapping for handle=%d\n",
+ __FUNCTION__, bo->handle));
munmap(bo->map__gtt, bytes(bo));
bo->map__gtt = NULL;
}
More information about the xorg-commit
mailing list