summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Starkey <brian.starkey@arm.com>2017-06-05 14:28:37 +0100
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-06-09 15:30:11 +0300
commitbf2a10392eaca70e18163dec40e8bbfcdb54c8ba (patch)
treeeaa4b5147b6719f8f495735c79b34264e20afa1a
parentb5a899316447a357e35b1cd095bdcae98fff5bcf (diff)
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 Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r--lib/igt_kms.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index c77716b4..5e2ef97b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1794,11 +1794,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;