diff mbox

[i-g-t,v1] igt_kms: Allow pipes with no cursor plane

Message ID 20170406191837.20921-1-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss April 6, 2017, 7:18 p.m. UTC
A cursor plane may not always be available. Since there
already exist variables that signal the existance or
non-existance of cursor planes like pipe->plane_cursor and
display->has_cursor_plane, allow the pipes that have no
cursor plane.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 lib/igt_kms.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5811414f..d49e152e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1677,7 +1677,15 @@  void igt_display_init(igt_display_t *display, int drm_fd)
 		 * There should be no gaps. If there is, something happened
 		 * which we can't handle (e.g. all planes are cursors).
 		 */
-		igt_assert_eq(p, last_plane);
+                if (pipe->plane_cursor != -1) {
+                        /* Cursor plane found. */
+                        igt_assert_eq(p, last_plane);
+                } else {
+                        /* No cursor plane found. */
+                        igt_assert_lte(last_plane, p);
+                }
+
+
 
 		pipe->n_planes = n_planes;