summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 4819dd6f..ac634887 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -297,6 +297,14 @@ static inline bool kgem_ring_is_idle(struct kgem *kgem, int ring)
return __kgem_ring_is_idle(kgem, ring);
}
+static inline bool kgem_is_idle(struct kgem *kgem)
+{
+ if (!kgem->need_retire)
+ return true;
+
+ return kgem_ring_is_idle(kgem, kgem->ring);
+}
+
void _kgem_submit(struct kgem *kgem);
static inline void kgem_submit(struct kgem *kgem)
{