[Intel-gfx] [PATCH igt 27/28] lib/display: Fix assertion in set_plane()

Damien Lespiau damien.lespiau at intel.com
Fri Feb 7 15:49:11 CET 2014


When cycling throuth planes, we still want to reach the cursor plane. We
have to special case IGT_PLANE_CURSOR as a shorthand to select the
cursor plane (the last plane on the pipe).

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 862d8ba..2e5a8cb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1121,7 +1121,7 @@ static igt_plane_t *igt_pipe_get_plane(igt_pipe_t *pipe, enum igt_plane plane)
 	if (plane == IGT_PLANE_CURSOR)
 		idx = pipe->n_planes - 1;
 	else {
-		igt_assert_f(plane >= 0 && plane < (pipe->n_planes - 1),
+		igt_assert_f(plane >= 0 && plane < (pipe->n_planes),
 			     "plane=%d\n", plane);
 		idx = plane;
 	}
-- 
1.8.3.1




More information about the Intel-gfx mailing list