drm: Check if underlays are present before trying to use them

Trying to use an underlay will always fail if the output doesn't support
them, so add a quick check here.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2026-03-20 13:23:14 -05:00
parent 7833a01b4d
commit 1f900aa553

View file

@ -728,7 +728,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
* only have underlay planes available, so it could use one
* anyway.
*/
if (!need_underlay) {
if (!need_underlay && output->has_underlay) {
uint64_t tmp_next_lowest_zpos;
if (current_lowest_zpos == DRM_PLANE_ZPOS_INVALID_PLANE)
tmp_next_lowest_zpos = plane->zpos_max;