summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-01-18 11:26:12 -0500
committerRobert Foss <robert.foss@collabora.com>2017-01-31 16:19:35 -0500
commit260df259ce3b7e56adbb8fd223a5de2e84774c14 (patch)
tree2f59c2f6f25abef60dab705c7b16dd7413299e78 /lib
parent9de635976c426b4c835083792c7d4d6e32aec615 (diff)
lib/igt_kms: Rename kmstest properties nplanes and plane
Rename these properties to have them use the same naming convention as the igt_*_t structs. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c16
-rw-r--r--lib/igt_kms.h4
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 382b0864..a073c8c3 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1348,11 +1348,13 @@ void kmstest_get_crtc(enum pipe pipe, struct kmstest_crtc *crtc)
crtc->active = true;
parse_crtc(tmp, crtc);
- crtc->nplanes = parse_planes(fid, NULL);
- crtc->plane = calloc(crtc->nplanes, sizeof(*crtc->plane));
+ crtc->n_planes = parse_planes(fid, NULL);
+ crtc->planes = calloc(crtc->n_planes, sizeof(*crtc->planes));
+ igt_assert_f(crtc->planes, "Failed to allocate memory for %d planes\n", crtc->n_planes);
+
fseek(fid, 0, SEEK_END);
fseek(fid, 0, SEEK_SET);
- parse_planes(fid, crtc->plane);
+ parse_planes(fid, crtc->planes);
if (crtc->pipe != pipe)
crtc = NULL;
@@ -1378,14 +1380,14 @@ void igt_assert_plane_visible(enum pipe pipe, bool visibility)
kmstest_get_crtc(pipe, &crtc);
visible = true;
- for (i = 0; i < crtc.nplanes; i++) {
- if (crtc.plane[i].type == DRM_PLANE_TYPE_PRIMARY)
+ for (i = 0; i < crtc.n_planes; i++) {
+ if (crtc.planes[i].type == DRM_PLANE_TYPE_PRIMARY)
continue;
- if (crtc.plane[i].pos_x > crtc.width) {
+ if (crtc.planes[i].pos_x > crtc.width) {
visible = false;
break;
- } else if (crtc.plane[i].pos_y > crtc.height) {
+ } else if (crtc.planes[i].pos_y > crtc.height) {
visible = false;
break;
}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 635702b6..4e298f89 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -149,8 +149,8 @@ struct kmstest_crtc {
bool active;
int width;
int height;
- int nplanes;
- struct kmstest_plane *plane;
+ int n_planes;
+ struct kmstest_plane *planes;
};
/**