[Mesa-dev] [PATCH 2/3] st/dri: cleanup image_from_fd/dma_buf paths

Emil Velikov emil.l.velikov at gmail.com
Mon May 16 18:43:47 UTC 2016


Hi Stanimir,

On 15 May 2016 at 12:34, Stanimir Varbanov <stanimir.varbanov at linaro.org> wrote:
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov at linaro.org>
> ---
>  src/gallium/state_trackers/dri/dri2.c | 75 ++++++++++++++++++-----------------
>  1 file changed, 39 insertions(+), 36 deletions(-)
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
> index 8ace842b74b8..78b1b86515e0 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -832,21 +832,43 @@ dri2_create_image_from_name(__DRIscreen *_screen,
>
>  static __DRIimage *
>  dri2_create_image_from_fd(__DRIscreen *_screen,
> -                          int width, int height, int format,
> -                          int fd, int stride, void *loaderPrivate)
> +                          int width, int height, int fourcc,
> +                          int *fds, int num_fds, int *strides,
> +                          int *offsets, unsigned *error,

This patch folds the duplicated checks prior to calling
dri2_create_image_from_fd() within the function although it adds a
set-but-unused variable error.  I'd either add a comment in the
summary about it, or just introduce it where it's needed.

Thanks
Emil


More information about the mesa-dev mailing list