All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Starkey <brian.starkey@arm.com>
To: intel-gfx@lists.freedesktop.org
Cc: liviu.dudau@arm.com
Subject: [PATCH i-g-t RESEND 1/7] lib/igt_kms: Fix erroneous assert
Date: Tue, 25 Apr 2017 17:45:07 +0100	[thread overview]
Message-ID: <1493138713-2319-2-git-send-email-brian.starkey@arm.com> (raw)
In-Reply-To: <1493138713-2319-1-git-send-email-brian.starkey@arm.com>

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>
---
 lib/igt_kms.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9bfa0e1d0695..5837a9f112a6 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1789,11 +1789,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;
 
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-25 16:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 16:45 [PATCH i-g-t 0/7] Misc fixes and cleanup Brian Starkey
2017-04-25 16:45 ` Brian Starkey [this message]
2017-04-25 16:45 ` [PATCH i-g-t 2/7] lib/igt_kms: Fix override_mode handling Brian Starkey
2017-04-25 16:45 ` [PATCH i-g-t 3/7] lib: Stop igt_get_all_cairo_formats memory leak Brian Starkey
2017-04-25 17:43   ` Gabriel Krisman Bertazi
2017-04-25 19:29     ` Brian Starkey
2017-04-25 16:45 ` [PATCH i-g-t 4/7] lib/igt_debugfs: Remove igt_debugfs_t Brian Starkey
2017-04-25 16:45 ` [PATCH i-g-t 5/7] lib/igt_debugfs: Only use valid values in igt_crc_to_str() Brian Starkey
2017-04-25 16:45 ` [PATCH i-g-t 6/7] igt: lib/igt_crc: Split out CRC functionality Brian Starkey
2017-04-25 16:45 ` [PATCH i-g-t 7/7] lib/igt_kms: Use kernel command line mode if specified Brian Starkey
2017-04-25 16:58   ` Ville Syrjälä
2017-04-25 17:06     ` Brian Starkey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493138713-2319-2-git-send-email-brian.starkey@arm.com \
    --to=brian.starkey@arm.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=liviu.dudau@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.