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

Kenneth Graunke kenneth at whitecape.org
Fri Sep 29 19:52:45 UTC 2017


On Friday, September 29, 2017 3:25:07 AM PDT Chris Wilson wrote:
> 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>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> ---
>  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 bd1365f232..22d9f19298 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -2516,6 +2516,17 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
>  
>     intel_screen_init_surface_formats(screen);
>  
> +   if (INTEL_DEBUG & DEBUG_SUBMIT) {

How about:

   if (INTEL_DEBUG & (DEBUG_SUBMIT | DEBUG_BAT)) {

> +      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, "  - Priority sorting enabled\n");
> +         if (caps & I915_SCHEDULER_CAP_PREEMPTION)
> +            fprintf(stderr, "  - Preemption enabled\n");
> +      }
> +   }
> +
>     return (const __DRIconfig**) intel_screen_make_configs(dri_screen);
>  }
>  
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170929/fa950139/attachment.sig>


More information about the mesa-dev mailing list