summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-04 16:29:51 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-20 11:43:48 +0200
commit2f7519a8f09315abc3db42e7dfe90821058a3583 (patch)
tree1ec3c851b032ccfdfd74ae835c0e4647e5f224a3 /tests
parentd04d63287056646eb5dbb5c60dc7cd7c64a38df7 (diff)
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 <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_crtc_background_color.c2
-rw-r--r--tests/kms_rotation_crc.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/kms_crtc_background_color.c b/tests/kms_crtc_background_color.c
index 659a30b9..ecd13a56 100644
--- a/tests/kms_crtc_background_color.c
+++ b/tests/kms_crtc_background_color.c
@@ -137,7 +137,7 @@ static void test_crtc_background(data_t *data)
igt_output_set_pipe(output, pipe);
plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_require(plane->pipe->props[IGT_CRTC_BACKGROUND]);
+ igt_require(igt_pipe_has_prop(display, pipe, IGT_CRTC_BACKGROUND));
prepare_crtc(data, output, pipe, plane, 1, PURPLE, BLACK64);
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;