weston/libweston/backend-drm
Michael Olbrich f5a4fb5abc backend-drm: make sure all buffers are released when an output is removed
When an output is destroyed then the output state is freed immediately. In this
case, the plane state is only partially destroyed because it is the currently
active state. This includes the buffer reference.

Without the output, the plane will not be updated any more until it is used by a
different output (if possible) or the output returns and the plane is used
again.
As a result, the buffer reference is kept for a long time. This will cause some
applications to stall because weston now keeps two buffers (the one here and
another one for a different output where the application is now displayed).

To avoid this, do a synchronous commit that disables the output. The output
needs to be disabled anyways and this way the current state contains no
buffers that would remain.

`device->state_invalid = true` in drm_output_detach_crtc() is no longer
needed, because drm_output_detach_crtc() is called only when initialization
failed and the crtc was not yet used or in drm_output_deinit() when the
crtc was already disabled with the new synchronous commit.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2022-07-04 18:42:48 +00:00
..
drm-gbm.c backend-drm: get the drm device from the output 2022-06-03 09:17:49 +02:00
drm-internal.h backend-drm: set connector max bpc 2022-06-15 12:58:38 +00:00
drm-virtual.c backend-drm: check that outputs and heads are in fact ours 2022-06-10 09:27:43 +00:00
drm.c backend-drm: make sure all buffers are released when an output is removed 2022-07-04 18:42:48 +00:00
fb.c backend-drm: get the drm device from the output 2022-06-03 09:17:49 +02:00
kms-color.c Revert "backend-drm: add HDR_OUTPUT_METADATA definitions" 2022-06-07 09:35:14 +01:00
kms.c backend-drm: check that outputs are in fact ours 2022-06-23 14:00:04 +00:00
libbacklight.c libbacklight: Fix backlight never gets initialized 2022-04-11 08:38:00 +03:00
libbacklight.h backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00
meson.build Revert "backend-drm: add HDR_OUTPUT_METADATA definitions" 2022-06-07 09:35:14 +01:00
modes.c backend-drm: get the drm device from the output 2022-06-03 09:17:49 +02:00
state-helpers.c backend-drm: move drm objects from backend to drm device 2022-06-03 09:17:15 +02:00
state-propose.c build: fix possible race/error for some backends 2022-06-20 16:14:01 +03:00
vaapi-recorder.c drm/vaapi: Fix pointer-size confusion 2021-08-03 11:13:23 +00:00
vaapi-recorder.h backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00