Skip to contentSkip to conversation

lib/igt_kms: Fix erroneous assert

PATCH New Brian Starkey 1 participant 1 message Mar 18, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/igt_kms: Fix erroneous assert

In trying to fix igt_display_init() for devices without cursors, I actually made matters worse. Fix the assert.

Fixes 545aa3398223 lib/igt_kms: Remove redundant cursor code
---
 lib/igt_kms.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
lib/igt_kms.c +5 -5
index e12ed7232fb2..c199c2ad2cd6 100644
@@ -1679,11 +1679,11 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 		 */
 		igt_assert_eq(pipe->plane_primary, 0);
 
-		/*
-		 * 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);
+		/* Check that we filled every slot exactly once */
+		if (display->has_cursor_plane)
+			igt_assert_eq(p, last_plane);
+		else
+			igt_assert_eq(p, n_planes);
 
 		pipe->n_planes = n_planes;
 
Signature · 6 lines
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx