mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-04 21:08:05 +02:00
drm: retire writeback capture task if another is in progress
Before "drm: make writeback format negotiation more robust", pulling a writeback capture task while another writeback was in progress could lead to a crash. That commit avoids the crash, but it relies on drm_output_find_compatible_writeback() to fail if a writeback task is already in progress, as the majority of hardware probably support a single writeback connector compatible with the CRTC. Although unlikely, hardware may support more than one writeback compatible with the CRTC. That would break our code, as our writeback implementation does not support simultaneous writeback tasks per output. This adds an explicit check and retires the writeback task if there's already another writeback in progress. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
35d35f31ff
commit
a222e4c44b
1 changed files with 5 additions and 0 deletions
|
|
@ -778,6 +778,11 @@ drm_output_pick_writeback_capture_task(struct drm_output *output)
|
|||
if (!ct)
|
||||
return;
|
||||
|
||||
if (output->wb_state) {
|
||||
str_printf(&msg, "drm: another writeback task already in progress");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (output->base.disable_planes > 0) {
|
||||
str_printf(&msg, "drm: KMS planes usage is disabled for now, " \
|
||||
"so writeback capture tasks are rejected");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue