summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-12 15:21:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-12 15:21:27 +0100
commite28f5a2537821dc170a7ef78bf33ecbd3c032da0 (patch)
treee1f26b665ba89717febb70873c4e92b655e91a51
parent1af1dae1feefd6567017170bab241570fb528e5c (diff)
sna: Add some DBG as to why kgem_check_bo() flushes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index d6a6d283..0fabb01e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3595,14 +3595,23 @@ bool kgem_check_bo(struct kgem *kgem, ...)
if (!num_pages)
return true;
- if (kgem->aperture > kgem->aperture_low)
+ if (kgem->aperture > kgem->aperture_low && kgem_is_idle(kgem)) {
+ DBG(("%s: current aperture usage (%d) is greater than low water mark (%d)\n",
+ __FUNCTION__, kgem->aperture, kgem->aperture_low));
return false;
+ }
- if (num_pages + kgem->aperture > kgem->aperture_high)
+ if (num_pages + kgem->aperture > kgem->aperture_high) {
+ DBG(("%s: final aperture usage (%d) is greater than high water mark (%d)\n",
+ __FUNCTION__, num_pages + kgem->aperture, kgem->aperture_high));
return false;
+ }
- if (kgem->nexec + num_exec >= KGEM_EXEC_SIZE(kgem))
+ if (kgem->nexec + num_exec >= KGEM_EXEC_SIZE(kgem)) {
+ DBG(("%s: out of exec slots (%d + %d / %d)\n", __FUNCTION__,
+ kgem->nexec, num_exec, KGEM_EXEC_SIZE(kgem)));
return false;
+ }
return true;
}