[Mesa-dev] [PATCH 2/3] st/dri2: Return invalid modifier when no driver support

Daniel Stone daniel at fooishbar.org
Sat Jul 22 08:00:09 UTC 2017


Hi Emil,

On 21 July 2017 at 15:23, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> I think the key issue is that the resource_get_handle() calls lack
> proper error handling.
>
> There's a single case, that was fixed not too long ago, yet everywhere
> else we consider that resource_get_handle() can fail.
> Can we address that instead? Only dri2_query_image seems to be buggy.

We can address that as well, but not instead. Drivers which aren't
aware of modifiers will return success (as they know how to export
KMS-type handles), but not initialise the modifier field (because they
aren't aware of it). So we can check for failure, but the case I was
seeing here is that resource_get_handle() was succeeding - else we
wouldn't have had a buffer to query modifiers on in the first place -
but failing to either give the correct modifier or INVALID.

Cheers,
Daniel


More information about the mesa-dev mailing list