summaryrefslogtreecommitdiff
path: root/tests/kms_plane_scaling.c
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-01-10 20:14:07 -0500
committerRobert Foss <robert.foss@collabora.com>2017-01-31 16:19:35 -0500
commitca20170afc6fac81744ffa0a1479fd504706ae37 (patch)
tree3feaf26f23959ac8acce3e7ea1e108a2964d9e17 /tests/kms_plane_scaling.c
parent0239e15a048c759ea4de2f23ce9b5ecb6b4cf58d (diff)
tests/kms_plane_scaling: Add support for dynamic number of planes
Add changes reflecting the new support for dynamic number of planes per pipe. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/kms_plane_scaling.c')
-rw-r--r--tests/kms_plane_scaling.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 368da09f..18ba86c9 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -85,10 +85,10 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
* there's no way (that works) to light up a pipe with only a sprite
* plane enabled at the moment.
*/
- if (!plane->is_primary) {
+ if (plane->type != DRM_PLANE_TYPE_PRIMARY) {
igt_plane_t *primary;
- primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, &data->fb1);
}
@@ -128,10 +128,10 @@ static void cleanup_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
data->fb_id3 = 0;
}
- if (!plane->is_primary) {
+ if (plane->type != DRM_PLANE_TYPE_PRIMARY) {
igt_plane_t *primary;
- primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
}
@@ -207,7 +207,7 @@ static void test_plane_scaling(data_t *d)
igt_assert(d->fb_id3);
/* Set up display with plane 1 */
- d->plane1 = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
+ d->plane1 = igt_output_get_plane(output, 1);
prepare_crtc(d, output, pipe, d->plane1, mode, COMMIT_UNIVERSAL);
if (primary_plane_scaling) {
@@ -227,7 +227,7 @@ static void test_plane_scaling(data_t *d)
}
/* Set up fb2->plane2 mapping. */
- d->plane2 = igt_output_get_plane(output, IGT_PLANE_2);
+ d->plane2 = igt_output_get_plane(output, 2);
igt_plane_set_fb(d->plane2, &d->fb2);
/* 2nd plane windowed */
@@ -263,7 +263,7 @@ static void test_plane_scaling(data_t *d)
}
/* Set up fb3->plane3 mapping. */
- d->plane3 = igt_output_get_plane(output, IGT_PLANE_3);
+ d->plane3 = igt_output_get_plane(output, 3);
igt_plane_set_fb(d->plane3, &d->fb3);
/* 3rd plane windowed - no scaling */