diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2019-11-15 00:25:11 +0200 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2019-11-22 17:11:36 +0200 |
commit | 788e80db77e5e86a67fca606ac61f23682a07e71 (patch) | |
tree | ae38be72c9d28006e834c0ef4a8349a99f8d5ca2 | |
parent | bd002b98841200a2425ccc8740267322b1c8788d (diff) | |
download | weston-788e80db77e5e86a67fca606ac61f23682a07e71.tar.gz weston-788e80db77e5e86a67fca606ac61f23682a07e71.tar.bz2 weston-788e80db77e5e86a67fca606ac61f23682a07e71.zip |
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 <marius.vlad@collabora.com>
-rw-r--r-- | libweston/backend-drm/state-propose.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index e45ee65a..9c7871e0 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -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; |