Thread (4 messages) 4 messages, 3 authors, 2021-07-15

Re: [igt-dev] [i-g-t] lib/i915: Fix the check for scheduler caps for timeslicing

From: Tvrtko Ursulin <hidden>
Date: 2021-07-15 11:02:38

On 14/07/2021 12:51, Tejas Upadhyay wrote:
quoted hunk ↗ jump to hunk
Semaphore and preemption both are required and the check
was missing required check logic.

Signed-off-by: Tejas Upadhyay <redacted>
---
  lib/i915/gem_scheduler.c | 10 +++++-----
  1 file 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");
  }
Reviewed-by: Tvrtko Ursulin <redacted>

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help