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 <marius.vlad@collabora.com>
dev
Marius Vlad 5 years ago
parent 48bc5efa7c
commit 18462e8924
  1. 18
      libweston/backend-drm/state-propose.c

@ -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)) { 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 " drm_debug(b, "\t\t\t\t[plane] not adding plane %d to "
"candidate list: invalid pixel format\n", "candidate list: invalid pixel format\n",

Loading…
Cancel
Save