[Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

Tapani Pälli tapani.palli at intel.com
Mon Aug 7 11:53:39 UTC 2017



On 07/31/2017 08:35 PM, Daniel Stone wrote:
> When using dmabuf import, make sure that the modifier is actually
> allowed to add planes to the base format, as implied by the comment.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>   src/egl/drivers/dri2/egl_dri2.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index b73dcd72b6..76294897a5 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -2166,8 +2166,10 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
>             *  this extension."
>             */
>            if (attrs->DMABufPlaneModifiersLo[i].IsPresent &&
> -             attrs->DMABufPlaneModifiersHi[i].IsPresent)
> +             attrs->DMABufPlaneModifiersHi[i].IsPresent) {
> +            plane_n = i + 1;


Yep, this implements what the comment there says. Just to sanity check, 
*any* given modifier gives me rights to have additional fds/planes? If 
this is fine, then:

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>


>               continue;
> +	}
>   
>            _eglError(EGL_BAD_ATTRIBUTE, "too many plane attributes");
>            return 0;
> 

// Tapani


More information about the mesa-dev mailing list