summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2019-03-29 15:59:13 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2019-04-01 12:43:34 -0700
commit1695d3fe15855259e6ed43b81a1142e7c572a001 (patch)
tree0433e99812a396319879a002e4cc66c0591a9de4 /lib
parent4383f7f7e0932ff652823db0ab8b80acf43a20e5 (diff)
tests/plane_lowres: Test each plane individually
ICL has some many planes per pipe that it is causing this test to skip due bandwidth limitation when combined with 4K displays. The objective of this test is test the visibility of the planes when switching between high and low resolution, more information in the patch that added this test 12e34d8c909a ("tests/kms_plane_lowres: Plane visibility after atomic modesets"). So it was setting all the planes the tested pipe in the bottom left of the display using the height of high resolution, checking the visibility and then switching to the low resolution mode and checking again the visibility and now it is expected that all planes would be invisible. So to overcome ICL bandwidth issues, here it is testing each plane individually. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c21
-rw-r--r--lib/igt_kms.h2
2 files changed, 7 insertions, 16 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index ce9fe152..1e2415bf 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1634,27 +1634,18 @@ static void kmstest_get_crtc(int device, enum pipe pipe, struct kmstest_crtc *cr
*
* Asserts only if the plane's visibility state matches the status being passed by @visibility
*/
-void igt_assert_plane_visible(int fd, enum pipe pipe, bool visibility)
+void igt_assert_plane_visible(int fd, enum pipe pipe, int plane_index, bool visibility)
{
struct kmstest_crtc crtc;
- int i;
- bool visible;
+ bool visible = true;
kmstest_get_crtc(fd, pipe, &crtc);
- visible = true;
- for (i = 0; i < crtc.n_planes; i++) {
- if (crtc.planes[i].type == DRM_PLANE_TYPE_PRIMARY)
- continue;
+ igt_assert(plane_index < crtc.n_planes);
- if (crtc.planes[i].pos_x > crtc.width) {
- visible = false;
- break;
- } else if (crtc.planes[i].pos_y > crtc.height) {
- visible = false;
- break;
- }
- }
+ if (crtc.planes[plane_index].pos_x > crtc.width ||
+ crtc.planes[plane_index].pos_y > crtc.height)
+ visible = false;
free(crtc.planes);
igt_assert_eq(visible, visibility);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index e392e0ef..38bdc08f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -228,7 +228,7 @@ void *kmstest_dumb_map_buffer(int fd, uint32_t handle, uint64_t size,
void kmstest_dumb_destroy(int fd, uint32_t handle);
void kmstest_wait_for_pageflip(int fd);
unsigned int kmstest_get_vblank(int fd, int pipe, unsigned int flags);
-void igt_assert_plane_visible(int fd, enum pipe pipe, bool visibility);
+void igt_assert_plane_visible(int fd, enum pipe pipe, int plane_index, bool visibility);
/*
* A small modeset API