Commit 788e80db authored by Marius Vlad's avatar Marius Vlad

backend-drm: Skip testing plane state if plane is not enabled

Adds a further assert() to make sure we're not checking against invalid
values. This was seen in the wild when the kernel rejects the commit for
overlay resulting in a check for invalid zpos values.

Fixes: #304
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent bd002b98
......@@ -604,6 +604,12 @@ drm_output_check_zpos_plane_states(struct drm_output_state *state)
struct wl_list *next_node = ps->link.next;
bool found_dup = false;
/* skip any plane that is not enabled */
if (!ps->fb)
continue;
assert(ps->zpos != DRM_PLANE_ZPOS_INVALID_PLANE);
/* find another plane with the same zpos value */
if (next_node == &state->plane_list)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment