[PATCH xserver 2/2] glamor: Propagate glamor_fds_from_pixmap error in glamor_fd_from_pixmap

Michel Dänzer michel at daenzer.net
Mon May 28 15:27:14 UTC 2018


On 2018-05-23 05:57 PM, Emil Velikov wrote:
> On 23 May 2018 at 10:43, Michel Dänzer <michel at daenzer.net> wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> glamor_fds_from_pixmap returns 0 on error, but we were treating that as
>> success, continuing with uninitialized stride and fd values.
>>
>> Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap.
>>
>> Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
>>                      BuffersFromPixmap"
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> 
> I would suggest a one-liner as below. Smaller patch, plus is reads
> easier on my end ;-)
> 
> -    if (ret > 1) {
> +    if (ret != 1 || offsets[0] != 0) {

Thanks for the suggestion.


> Regardless, the series is on point and is
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Pushed both fixes (with the above incorporated), thanks!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list