On Fri, Feb 9, 2018 at 3:43 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote:

> From: Daniel Stone <dani...@collabora.com>
>
> Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net>
>

Ugh... I meant to take that off before sending...


> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
> b/src/mesa/drivers/dri/i965/intel_screen.c
> index 92d9e28..9a54f27 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -1369,8 +1369,14 @@ intel_from_planar(__DRIimage *parent, int plane,
> void *loaderPrivate)
>      return image;
>  }
>
> -static const __DRIimageExtension intelImageExtension = {
> -    .base = { __DRI_IMAGE, 16 },
> +static void
> +intel_image_suppress_implicit_sync(__DRIimage *image)
> +{
> +    image->bo->kflags |= EXEC_OBJECT_ASYNC;
> +}
> +
> +static __DRIimageExtension intelImageExtension = {
> +    .base = { __DRI_IMAGE, 18 },
>
>      .createImageFromName                = intel_create_image_from_name,
>      .createImageFromRenderbuffer        = intel_create_image_from_
> renderbuffer,
> @@ -1393,6 +1399,8 @@ static const __DRIimageExtension intelImageExtension
> = {
>      .queryDmaBufFormats                 = intel_query_dma_buf_formats,
>      .queryDmaBufModifiers               = intel_query_dma_buf_modifiers,
>      .queryDmaBufFormatModifierAttribs   = intel_query_format_modifier_
> attribs,
> +    .createImageFromRenderbuffer2       = NULL,
> +    .suppressImplicitSync               = NULL,
>  };
>
>  static uint64_t
> @@ -2683,6 +2691,11 @@ __DRIconfig **intelInitScreen2(__DRIscreen
> *dri_screen)
>           (ret != -1 || errno != EINVAL);
>     }
>
> +   if (intel_get_boolean(screen, I915_PARAM_HAS_EXEC_ASYNC)) {
> +      intelImageExtension.suppressImplicitSync =
> +         intel_image_suppress_implicit_sync;
>

I really don't like this.  Structs of function pointers really should be
static const.  That said, the screen is basically a singleton so maybe it
doesn't matter.

Another option would be to claim to always support and it just does nothing
on old kernels.  Prior to the scheduler landing, i915 was a FIFO anyway....


> +   }
> +
>     dri_screen->extensions = !screen->has_context_reset_notification
>        ? screenExtensions : intelRobustScreenExtensions;
>
> --
> 2.5.0.400.gff86faf
>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to