diff options
author | Robert Foss <robert.foss@collabora.com> | 2017-01-18 11:25:39 -0500 |
---|---|---|
committer | Robert Foss <robert.foss@collabora.com> | 2017-01-31 16:19:35 -0500 |
commit | fdced48860ddf632536d212baad09814ce7ee08f (patch) | |
tree | 265fc77cb1e6f7070c9e095beda5c1ed0df6266b /lib/igt_kms.c | |
parent | 79c6a84ca85ba76c6a67a7eb35b36237f42c427e (diff) |
lib/igt_kms: Add index property to kmstest_plane struct
Add an index property which helps accessing the corresponding
igt_plane_t structure through the igt_*_get_plane() functions.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 35a6bc4d..188b0ceb 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1282,21 +1282,21 @@ static int parse_planes(FILE *fid, struct kmstest_plane *plane) { char tmp[256]; int nplanes; - int ovl; - ovl = 0; nplanes = 0; while (fgets(tmp, 256, fid) != NULL) { igt_assert_neq(nplanes, IGT_MAX_PLANES); if (strstr(tmp, "type=PRI") != NULL) { - get_plane(tmp, IGT_PLANE_PRIMARY, &plane[nplanes]); + get_plane(tmp, DRM_PLANE_TYPE_PRIMARY, &plane[nplanes]); + plane[nplanes].index = nplanes; nplanes++; } else if (strstr(tmp, "type=OVL") != NULL) { - get_plane(tmp, IGT_PLANE_2 + ovl, &plane[nplanes]); - ovl++; + get_plane(tmp, DRM_PLANE_TYPE_OVERLAY, &plane[nplanes]); + plane[nplanes].index = nplanes; nplanes++; } else if (strstr(tmp, "type=CUR") != NULL) { - get_plane(tmp, IGT_PLANE_CURSOR, &plane[nplanes]); + get_plane(tmp, DRM_PLANE_TYPE_CURSOR, &plane[nplanes]); + plane[nplanes].index = nplanes; nplanes++; break; } |