drm: Move fence check before underlay check

There's no need to evaluate these in any particular order, but I'm
going to refactor all the check unrelated to underlays into a single
place shortly.

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

View file

@ -723,6 +723,16 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
continue;
}
/* If the surface buffer has an in-fence fd, but the plane doesn't
* support fences, we can't place the buffer on this plane. */
if (ev->surface->acquire_fence_fd >= 0 &&
plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) {
drm_debug(b, "\t\t\t\t[%s] not placing view %s on %s: "
"no in-fence support\n",
p_name, ev->internal_name, p_name);
continue;
}
/* The paint node isn't occluded by the renderer, so it doesn't
* unconditionally need an underlay plane. However, we may
* only have underlay planes available, so it could use one
@ -750,16 +760,6 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
continue;
}
/* If the surface buffer has an in-fence fd, but the plane doesn't
* support fences, we can't place the buffer on this plane. */
if (ev->surface->acquire_fence_fd >= 0 &&
plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) {
drm_debug(b, "\t\t\t\t[%s] not placing view %s on %s: "
"no in-fence support\n",
p_name, ev->internal_name, p_name);
continue;
}
if (!output->has_underlay && mm_underlay_only) {
drm_debug(b, "\t\t\t\t[plane] not adding plane %d to "
"candidate list: plane is below the primary "