mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 16:38:33 +02:00
drm: fix a few dma-buf feedback failure reasons
There are a few points in the code where we are wrongly using
FAILURE_REASONS_ADD_FB_FAILED, probably because we didn't have so many
"failure reasons" previously. This update such cases to use enum's that
make sense.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
(cherry picked from commit 3210cec531)
This commit is contained in:
parent
8f1a089917
commit
6445af1ead
2 changed files with 10 additions and 9 deletions
|
|
@ -163,11 +163,12 @@ enum try_view_on_plane_failure_reasons {
|
|||
FAILURE_REASONS_INADEQUATE_CONTENT_PROTECTION = 1 << 6,
|
||||
FAILURE_REASONS_INCOMPATIBLE_TRANSFORM = 1 << 7,
|
||||
FAILURE_REASONS_NO_BUFFER = 1 << 8,
|
||||
FAILURE_REASONS_BUFFER_TYPE = 1 << 9,
|
||||
FAILURE_REASONS_GLOBAL_ALPHA = 1 << 10,
|
||||
FAILURE_REASONS_NO_GBM = 1 << 11,
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED = 1 << 12,
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED = 1 << 13,
|
||||
FAILURE_REASONS_BUFFER_TOO_BIG = 1 << 9,
|
||||
FAILURE_REASONS_BUFFER_TYPE = 1 << 10,
|
||||
FAILURE_REASONS_GLOBAL_ALPHA = 1 << 11,
|
||||
FAILURE_REASONS_NO_GBM = 1 << 12,
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED = 1 << 13,
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED = 1 << 14,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
/* check view for valid buffer, doesn't make sense to even try */
|
||||
if (!weston_view_has_valid_buffer(ev)) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
FAILURE_REASONS_NO_BUFFER;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -431,12 +431,12 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
buffer = ev->surface->buffer_ref.buffer;
|
||||
if (buffer->type == WESTON_BUFFER_SOLID) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
FAILURE_REASONS_BUFFER_TYPE;
|
||||
return NULL;
|
||||
} else if (buffer->type == WESTON_BUFFER_SHM) {
|
||||
if (!output->cursor_plane || device->cursors_are_broken) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
FAILURE_REASONS_BUFFER_TYPE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
"(buffer (%dx%d) too large for cursor plane)\n",
|
||||
ev, buffer->width, buffer->height);
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
FAILURE_REASONS_BUFFER_TOO_BIG;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue