From 2f7519a8f09315abc3db42e7dfe90821058a3583 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 4 Oct 2017 16:29:51 +0200 Subject: lib/igt_kms: Add igt_$obj_has_prop functions, v2. This allows test to test whether a property is supported, in a nice and clean way. It removes the need for special case functions like igt_plane_supports_rotation. Convert the users of igt_plane_supports_rotation and remove the extra check in drm_plane_commit, this is already checked below when setting plane properties. Changes since v1: - Use the correct has_prop in kms_crtc_background_color.c Signed-off-by: Maarten Lankhorst Reviewed-by: Mika Kahola --- tests/kms_rotation_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/kms_rotation_crc.c') diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index b8327dfa..27d1f806 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -351,7 +351,7 @@ static void test_plane_rotation(data_t *data, int plane_type) igt_output_set_pipe(output, pipe); plane = igt_output_get_plane_type(output, plane_type); - igt_require(igt_plane_supports_rotation(plane)); + igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION)); prepare_crtc(data, output, pipe, plane, commit); @@ -438,7 +438,7 @@ static void test_plane_rotation_ytiled_obj(data_t *data, int ret; plane = igt_output_get_plane_type(output, plane_type); - igt_require(igt_plane_supports_rotation(plane)); + igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION)); if (plane_type == DRM_PLANE_TYPE_PRIMARY || plane_type == DRM_PLANE_TYPE_CURSOR) commit = COMMIT_UNIVERSAL; @@ -504,7 +504,7 @@ static void test_plane_rotation_exhaust_fences(data_t *data, int i, ret; plane = igt_output_get_plane_type(output, plane_type); - igt_require(igt_plane_supports_rotation(plane)); + igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION)); if (plane_type == DRM_PLANE_TYPE_PRIMARY || plane_type == DRM_PLANE_TYPE_CURSOR) commit = COMMIT_UNIVERSAL; -- cgit v1.2.3