From: Chris Wilson Date: Wed, 27 Sep 2017 15:14:33 +0000 (+0100) Subject: i965: Record the presence of the kernel scheduler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21023954f898bf871696e6e0eae2848e019fb2f9;p=mesa.git i965: Record the presence of the kernel scheduler Mention to the debug log if the kernel scheduler is enabled; and in particular if it has preemption enabled. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Ben Widawsky Reviewed-by: Joonas Lahtinen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index ea04a72e860..28e83cf9b21 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -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); }