[PATCH xserver 2/3] modesetting/drmmode: Use glamor_pixmap_from_fds

Daniel Stone daniel at fooishbar.org
Tue Mar 27 10:35:31 UTC 2018


Hi,

On 26 March 2018 at 16:11, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 23 March 2018 at 13:50, Daniel Stone <daniels at collabora.com> wrote:
>> +    for (i = 0; i < 4 && handles[i]; i++) {
>> +        err = drmPrimeHandleToFD(drmmode->fd, handles[i], O_CLOEXEC, &fds[i]);
>> +        if (err != 0)
>> +            return 0;
> Close the existing fds ones on error?
>
> With the fd leak plugged (regardless of the nit)
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Right you are; it can also be fixed by s/out_free_fb/out_close_fds/ in
the caller's failure path (below the 'Failed to make prime FD for
handle' message).

> Aside: there's plenty of duplication in the area + some partial depth
> <> format mappings.

There sure is, but I decided to leave those as-is for now.

Cheers,
Daniel


More information about the xorg-devel mailing list