diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-01-18 19:33:57 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-16 18:38:00 +0200 |
commit | 98f7614bd725afaae48f7b70d18329149075661b (patch) | |
tree | 74ff5a79d79070332c0414310775d66cb0156e7a /lib/igt_kms.h | |
parent | 2db6d5007fee63f6dceb0c9ee9d8cb4f77308841 (diff) |
lib: Parse plane IN_FORMATS blobifiers into a nicer form
Maintain straight up arrays of format+modifier tuples for each plane,
and also collect up a similar device wide array. These will make it
easy to confirm whether each plane (or the whole device) supports a
specific format+modifier pair.
v2: s/igt_hweight64/igt_hweight/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r-- | lib/igt_kms.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 672930e9..1ea3be99 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -262,6 +262,7 @@ enum igt_atomic_plane_properties { IGT_PLANE_IN_FENCE_FD, IGT_PLANE_TYPE, IGT_PLANE_ROTATION, + IGT_PLANE_IN_FORMATS, IGT_NUM_PLANE_PROPS }; @@ -309,6 +310,10 @@ typedef struct { uint64_t changed; uint32_t props[IGT_NUM_PLANE_PROPS]; uint64_t values[IGT_NUM_PLANE_PROPS]; + + uint64_t *modifiers; + uint32_t *formats; + int format_mod_count; } igt_plane_t; struct igt_pipe { @@ -357,6 +362,10 @@ struct igt_display { bool has_cursor_plane; bool is_atomic; bool first_commit; + + uint64_t *modifiers; + uint32_t *formats; + int format_mod_count; }; void igt_display_init(igt_display_t *display, int drm_fd); @@ -671,4 +680,7 @@ bool igt_hotplug_detected(struct udev_monitor *mon, void igt_flush_hotplugs(struct udev_monitor *mon); void igt_cleanup_hotplug(struct udev_monitor *mon); +bool igt_display_has_format_mod(igt_display_t *display, uint32_t format, uint64_t modifier); +bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format, uint64_t modifier); + #endif /* __IGT_KMS_H__ */ |