[Libva] [PATCH][libva-intel-driver] i965_GetDisplayAttributes: propagate flags from src to dst

Xiang, Haihao haihao.xiang at intel.com
Tue Nov 22 04:54:32 UTC 2016


LGTM, applied.

Thanks
Haihao


> flags need to be propagated for user to know which flags
> are supported by VADisplayAttribType.
> 
> When only VA_DISPLAY_ATTRIB_SETTABLE is reported as flag
> then it has to be propagated back to user.  The rest of the
> values should be left untouched
> 
> Signed-off-by: Daniel Charles <daniel.charles at intel.com>
> ---
>  src/i965_drv_video.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 04670f4..30dd433 100644
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -3734,10 +3734,15 @@ i965_GetDisplayAttributes(
>          VADisplayAttribute *src_attrib, * const dst_attrib =
> &attribs[i];
>  
>          src_attrib = get_display_attribute(ctx, dst_attrib->type);
> +
>          if (src_attrib && (src_attrib->flags &
> VA_DISPLAY_ATTRIB_GETTABLE)) {
>              dst_attrib->min_value = src_attrib->min_value;
>              dst_attrib->max_value = src_attrib->max_value;
>              dst_attrib->value     = src_attrib->value;
> +            dst_attrib->flags     = src_attrib->flags;
> +        } else if (src_attrib &&
> +                (src_attrib->flags & VA_DISPLAY_ATTRIB_SETTABLE)) {
> +            dst_attrib->flags     = src_attrib->flags;
>          }
>          else
>              dst_attrib->flags = VA_DISPLAY_ATTRIB_NOT_SUPPORTED;


More information about the Libva mailing list