Commit 18462e89 authored by Marius Vlad's avatar Marius Vlad

backend-drm: Further checks to skip plane assignment to HW planes

Mode change from mixed-mode to renderer-only means we should no longer
try to place views in HW planes (as we composite everything into the
primary plane) thus we should avoid that whenever that happens.

In the same time we need to be able to place in mixed-mode/renderer-only
mode the cursor view into the cursor plane (if one is available).

This patch adds a further check to skip plane assignment when disabling
overlay support (when we switch to renderer-only mode), when drivers do
not have atomic-modeset or it has been disabled intentionally.
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent 48bc5efa
......@@ -691,6 +691,24 @@ drm_output_prepare_plane_view(struct drm_output_state *state,
}
}
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY &&
(plane->type == WDRM_PLANE_TYPE_OVERLAY ||
plane->type == WDRM_PLANE_TYPE_PRIMARY)) {
drm_debug(b, "\t\t\t\t[plane] not adding plane %d to "
"candidate list: renderer-only mode\n",
plane->plane_id);
continue;
}
if (plane->type != WDRM_PLANE_TYPE_CURSOR &&
b->sprites_are_broken) {
drm_debug(b, "\t\t\t\t[plane] not adding plane %d, type %s to "
"candidate list: sprites are broken!\n",
plane->plane_id,
drm_output_get_plane_type_name(plane));
continue;
}
if (!drm_output_plane_view_has_valid_format(plane, state, ev, fb)) {
drm_debug(b, "\t\t\t\t[plane] not adding plane %d to "
"candidate list: invalid pixel format\n",
......
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