i965: Record the presence of the kernel scheduler
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 27 Sep 2017 15:14:33 +0000 (16:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Oct 2017 10:28:17 +0000 (11:28 +0100)
Mention to the debug log if the kernel scheduler is enabled; and in
particular if it has preemption enabled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_screen.c

index ea04a72e8604b2e0ef4c26cb717b967dd2197ce3..28e83cf9b21aadf60b0bba2afde49a77d8b8b6db 100644 (file)
@@ -2518,6 +2518,17 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
 
    intel_screen_init_surface_formats(screen);
 
+   if (INTEL_DEBUG & (DEBUG_BATCH | DEBUG_SUBMIT)) {
+      unsigned int caps = intel_get_integer(screen, I915_PARAM_HAS_SCHEDULER);
+      if (caps) {
+         fprintf(stderr, "Kernel scheduler detected: %08x\n", caps);
+         if (caps & I915_SCHEDULER_CAP_PRIORITY)
+            fprintf(stderr, "  - User priority sorting enabled\n");
+         if (caps & I915_SCHEDULER_CAP_PREEMPTION)
+            fprintf(stderr, "  - Preemption enabled\n");
+      }
+   }
+
    return (const __DRIconfig**) intel_screen_make_configs(dri_screen);
 }