mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 13:48:21 +02:00
drm: Remove cursor and scanout handles from the plane handle list
Just put the "normal" planes on that list. This will allow for some simplification later. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
8b7e72d8fa
commit
bf16894809
3 changed files with 25 additions and 12 deletions
|
|
@ -606,7 +606,8 @@ struct drm_output {
|
|||
bool dpms_off_pending;
|
||||
bool mode_switch_pending;
|
||||
|
||||
/* List of hardware planes this output can use */
|
||||
/* List of hardware planes this output can use, excluding the special
|
||||
* cursor and scanout planes. */
|
||||
struct wl_list plane_handle_list;
|
||||
|
||||
/* True, if underlay planes exist. */
|
||||
|
|
|
|||
|
|
@ -1588,7 +1588,7 @@ drm_plane_create_handle(struct drm_plane *plane, struct drm_output *output)
|
|||
handle->output = output;
|
||||
handle->plane = plane;
|
||||
|
||||
wl_list_insert(&output->plane_handle_list, &handle->link);
|
||||
wl_list_init(&handle->link);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
|
@ -2670,10 +2670,16 @@ drm_output_init_planes(struct drm_output *output)
|
|||
|
||||
handle = drm_plane_create_handle(plane, output);
|
||||
|
||||
if (plane == scanout_plane)
|
||||
if (plane == scanout_plane) {
|
||||
output->scanout_handle = handle;
|
||||
if (plane == cursor_plane)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (plane == cursor_plane) {
|
||||
output->cursor_handle = handle;
|
||||
continue;
|
||||
}
|
||||
wl_list_insert(&output->plane_handle_list, &handle->link);
|
||||
}
|
||||
|
||||
assert(output->scanout_handle);
|
||||
|
|
@ -2719,13 +2725,17 @@ drm_output_deinit_planes(struct drm_output *output)
|
|||
* We want the planes to continue to exist and be freed up
|
||||
* for other outputs.
|
||||
*/
|
||||
if (output->cursor_handle)
|
||||
if (output->cursor_handle) {
|
||||
drm_plane_reset_state(output->cursor_handle->plane);
|
||||
if (output->scanout_handle)
|
||||
drm_plane_reset_state(output->scanout_handle->plane);
|
||||
drm_plane_destroy_handle(output->cursor_handle);
|
||||
output->cursor_handle = NULL;
|
||||
}
|
||||
|
||||
output->cursor_handle = NULL;
|
||||
output->scanout_handle = NULL;
|
||||
if (output->scanout_handle) {
|
||||
drm_plane_reset_state(output->scanout_handle->plane);
|
||||
drm_plane_destroy_handle(output->scanout_handle);
|
||||
output->scanout_handle = NULL;
|
||||
}
|
||||
|
||||
wl_list_for_each_safe(handle, next_handle,
|
||||
&output->plane_handle_list, link)
|
||||
|
|
|
|||
|
|
@ -667,6 +667,8 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
FAILURE_REASONS_PLANES_REJECTED;
|
||||
return ps;
|
||||
} else {
|
||||
struct drm_plane *scanout_plane = output->scanout_handle->plane;
|
||||
|
||||
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_AND_CURSOR) {
|
||||
drm_debug(b, "\t\t\t\t[view] not assigning view %s "
|
||||
"to plane: renderer-and-cursor mode\n",
|
||||
|
|
@ -674,12 +676,12 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (drm_paint_node_transform_supported(pnode, scanout_plane))
|
||||
possible_plane_mask |= 1 << scanout_plane->plane_idx;
|
||||
|
||||
wl_list_for_each(handle, &output->plane_handle_list, link) {
|
||||
struct drm_plane *plane = handle->plane;
|
||||
|
||||
if (plane->type == WDRM_PLANE_TYPE_CURSOR)
|
||||
continue;
|
||||
|
||||
if (drm_paint_node_transform_supported(pnode, plane))
|
||||
possible_plane_mask |= 1 << plane->plane_idx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue