summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Charles <daniel.charles@intel.com>2016-11-21 16:23:27 -0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-11-22 12:43:17 +0800
commitce55d7e514bd9fb3103312dd75ced16247c4eff5 (patch)
treebce1f8ce39ea71572b150b58794c8ac70d68edf8
parent83da9f12b8aeddb2aae71e9d08490018fd71b752 (diff)
i965_GetDisplayAttributes: propagate flags from src to dst
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@intel.com>
-rw-r--r--src/i965_drv_video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbb6407..2b0684e 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -3739,10 +3739,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;