drm: do not pull writeback task if KMS atomic API is not supported
Since2d70bdfdcd
"drm-backend: add support to output capture writeback source", the DRM-backend was broken for KMS devices that do not support the atomic API. This fixes that. We don't support writeback screenshots without atomic modeset support. So for such devices, we never update the output capture info (weston_output_update_capture_info()) for the writeback source. The function that we use to pull writeback tasks (weston_output_pull_capture_task()) asserts that the capture providers (renderers, DRM-backend) did not forget to update the capture info (size/format) if something changed. But as we've never updated the capture info for such devices, it is zeroed, leading to an assert hit. With this patch we only pull the capture task for KMS devices that support the atomic API. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> (cherry picked from commit3226417573
)
This commit is contained in:
parent
46c94eb315
commit
8b0c2e313e
@ -553,14 +553,14 @@ drm_output_pick_writeback_capture_task(struct drm_output *output)
|
||||
int32_t height = output->base.current_mode->height;
|
||||
uint32_t format = output->format->format;
|
||||
|
||||
assert(output->device->atomic_modeset);
|
||||
|
||||
ct = weston_output_pull_capture_task(&output->base,
|
||||
WESTON_OUTPUT_CAPTURE_SOURCE_WRITEBACK,
|
||||
width, height, pixel_format_get_info(format));
|
||||
if (!ct)
|
||||
return;
|
||||
|
||||
assert(output->device->atomic_modeset);
|
||||
|
||||
if (output->base.disable_planes > 0) {
|
||||
msg = "drm: KMS planes usage is disabled for now, so " \
|
||||
"writeback capture tasks are rejected";
|
||||
@ -642,6 +642,7 @@ drm_output_repaint(struct weston_output *output_base, pixman_region32_t *damage)
|
||||
if (drm_output_ensure_hdr_output_metadata_blob(output) < 0)
|
||||
goto err;
|
||||
|
||||
if (device->atomic_modeset)
|
||||
drm_output_pick_writeback_capture_task(output);
|
||||
|
||||
drm_output_render(state, damage);
|
||||
|
Loading…
Reference in New Issue
Block a user