[Mesa-dev] [PATCH] i965: Record the presence of the kernel scheduler

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 27 15:18:21 UTC 2017


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 at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Ben Widawsky <ben at bwidawsk.net>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 42acdb3303..3b2697499f 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -2530,6 +2530,17 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
 
    intel_screen_init_surface_formats(screen);
 
+   if (INTEL_DEBUG & 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 & 0x2)
+            fprintf(stderr, "  - Priority sorting enabled\n");
+         if (caps & 0x4)
+            fprintf(stderr, "  - Preemption enabled\n");
+      }
+   }
+
    return (const __DRIconfig**) intel_screen_make_configs(dri_screen);
 }
 
-- 
2.14.1



More information about the mesa-dev mailing list