diff options
author | Brian Starkey <brian.starkey@arm.com> | 2017-02-20 11:02:48 +0000 |
---|---|---|
committer | Robert Foss <robert.foss@collabora.com> | 2017-02-21 10:02:25 -0500 |
commit | 545aa339822306e93bf01069175f252cd4feb579 (patch) | |
tree | b6178b15871ad41c020fbbda910837005b88801d /lib/igt_kms.c | |
parent | c2254c4fa68526760f8c95e72a676a708421da27 (diff) |
lib/igt_kms: Remove redundant cursor code
The dynamic plane support means that there should never be gaps in the
pipe->planes array. This means we should never need to move the cursor
plane from the last slot to another.
Remove the unnecessary code, and add an assert that makes sure nothing
strange happened that broke the assignment logic.
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 60c4c260..8751c97f 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1679,20 +1679,11 @@ void igt_display_init(igt_display_t *display, int drm_fd) */ igt_assert_eq(pipe->plane_primary, 0); - if (display->has_cursor_plane) { - /* - * Cursor was put in the last slot. If we have 0 or - * only 1 sprite, that's the wrong slot and we need to - * move it down. - */ - if (p != last_plane) { - pipe->planes[p] = - pipe->planes[last_plane]; - pipe->planes[p].index = p; - memset(&pipe->planes[last_plane], 0, - sizeof *plane); - } - } + /* + * 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); pipe->n_planes = n_planes; |