diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-04 18:28:21 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-20 11:43:55 +0200 |
commit | 4ac36e605ab65e9253f932f43787406b79070933 (patch) | |
tree | 492964cf80c58b49a6e2eab6425cde6eb0793d80 /lib/igt_kms.h | |
parent | 2f7519a8f09315abc3db42e7dfe90821058a3583 (diff) |
lib/igt_kms: Add igt_$obj_get_prop functions
Some tests need to get the current kernel value for properties
as part of the test. Add get_prop functions that will retrieve
the current kernel value.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r-- | lib/igt_kms.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 916cd359..fda94cb6 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -503,6 +503,8 @@ igt_plane_has_prop(igt_plane_t *plane, enum igt_atomic_plane_properties prop) return plane->props[prop]; } +uint64_t igt_plane_get_prop(igt_plane_t *plane, enum igt_atomic_plane_properties prop); + #define igt_plane_is_prop_changed(plane, prop) \ (!!((plane)->changed & (1 << (prop)))) @@ -536,6 +538,8 @@ igt_output_has_prop(igt_output_t *output, enum igt_atomic_connector_properties p return output->props[prop]; } +uint64_t igt_output_get_prop(igt_output_t *output, enum igt_atomic_connector_properties prop); + #define igt_output_is_prop_changed(output, prop) \ (!!((output)->changed & (1 << (prop)))) #define igt_output_set_prop_changed(output, prop) \ @@ -568,6 +572,26 @@ igt_pipe_obj_has_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop) return pipe->props[prop]; } +uint64_t igt_pipe_obj_get_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop); + +/** + * igt_pipe_get_prop - Return current value on a pipe for a given property. + * + * @display: Pointer to display. + * @pipe: Target pipe. + * @prop: Property to return. + * + * Returns: The value the property is set to, if this + * is a blob, the blob id is returned. This can be passed + * to drmModeGetPropertyBlob() to get the contents of the blob. + */ +static inline uint64_t +igt_pipe_get_prop(igt_display_t *display, enum pipe pipe, + enum igt_atomic_crtc_properties prop) +{ + return igt_pipe_obj_get_prop(&display->pipes[pipe], prop); +} + /** * igt_pipe_has_prop - Check whether pipe supports a given property. * |