summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-08-26 14:29:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-08-26 14:29:41 +0100
commit0c15824a8143a288716d2eacf03252cc54eb9466 (patch)
tree754c240e96d5d38726102f05f0271dd058ceb963
parentd432983421286d343f7c487c12c7244b711f5a66 (diff)
sna: Add some DBG to kgem_is_idle()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c6
-rw-r--r--src/sna/kgem.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 825caa76..568d1200 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1763,9 +1763,13 @@ bool __kgem_is_idle(struct kgem *kgem)
assert(!list_is_empty(&kgem->requests));
rq = list_last_entry(&kgem->requests, struct kgem_request, list);
- if (kgem_busy(kgem, rq->bo->handle))
+ if (kgem_busy(kgem, rq->bo->handle)) {
+ DBG(("%s: last requests handle=%d still busy\n",
+ __FUNCTION__, rq->bo->handle));
return false;
+ }
+ DBG(("%s: gpu idle\n", __FUNCTION__));
kgem_retire__requests(kgem);
assert(list_is_empty(&kgem->requests));
return true;
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index d085a2f0..d8018b80 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -261,8 +261,10 @@ bool kgem_retire(struct kgem *kgem);
bool __kgem_is_idle(struct kgem *kgem);
static inline bool kgem_is_idle(struct kgem *kgem)
{
- if (list_is_empty(&kgem->requests))
+ if (list_is_empty(&kgem->requests)) {
+ DBG(("%s: no outstanding requests\n", __FUNCTION__));
return true;
+ }
return __kgem_is_idle(kgem);
}