summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>2021-07-14 17:21:33 +0530
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2021-07-16 11:39:01 +0100
commitcd649eee0f74fa6ee71de18ff59b5ae39fd62159 (patch)
tree9c01189514916d18f6f68a65a814f92f1bf69abd
parent16e753fc5e1e51395e1df40865c569984a74c5ed (diff)
lib/i915: Fix the check for scheduler caps for timeslicing
Semaphore and preemption both are required and the check was missing required check logic. Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--lib/i915/gem_scheduler.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/i915/gem_scheduler.c b/lib/i915/gem_scheduler.c
index 6dfa3676..cdddf42a 100644
--- a/lib/i915/gem_scheduler.c
+++ b/lib/i915/gem_scheduler.c
@@ -140,9 +140,11 @@ bool gem_scheduler_has_engine_busy_stats(int fd)
*/
bool gem_scheduler_has_timeslicing(int fd)
{
- return ((gem_scheduler_capability(fd) &
+ return (((gem_scheduler_capability(fd) &
(I915_SCHEDULER_CAP_PREEMPTION |
- I915_SCHEDULER_CAP_SEMAPHORES))
+ I915_SCHEDULER_CAP_SEMAPHORES)) ==
+ (I915_SCHEDULER_CAP_PREEMPTION |
+ I915_SCHEDULER_CAP_SEMAPHORES))
|| gem_has_guc_submission(fd));
}
@@ -168,8 +170,6 @@ void gem_scheduler_print_capability(int fd)
igt_info(" - With HW semaphores enabled\n");
if (caps & I915_SCHEDULER_CAP_ENGINE_BUSY_STATS)
igt_info(" - With engine busy statistics\n");
- if ((caps & (I915_SCHEDULER_CAP_PREEMPTION
- | I915_SCHEDULER_CAP_SEMAPHORES))
- || gem_has_guc_submission(fd))
+ if (gem_scheduler_has_timeslicing(fd))
igt_info(" - With timeslicing enabled\n");
}