mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-20 08:10:07 +01:00
linux-dmabuf: no buffer errors on device disappearance
This was prompted by the discussion from https://lists.freedesktop.org/archives/dri-devel/2020-May/266611.html which is not the final wording. When a DRM device is hot-unplugged, particularly if it is the Wayland compositor's compositing GPU, EGL may start returning errors from trying to use the client's dmabuf. Or, if the client is rendering on another GPU which gets hot-unplugged, the dmabuf the compositor already has may start failing. Hot-unplug is an abrupt global action, and there is no way a client or a compositor could ensure they clean up before things start failing. It is not the client's fault, so the client should not get disconnected if already existing wl_buffer objects start failing. This patch add the wording to the protocol to this effect. The intention is that the compositor replaces the failed buffers with some placeholder content. There is no way this could be glitch-free. In its own pace the client should discover the DRM device is gone, clean up, and perhaps use something else. How exactly that should happen depends on the rendering API the client is using. This is a tiny step towards making DRM device hot-unplug not crash applications that wish to handle the unplug gracefully. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
d10d18f3d4
commit
f899eff0a7
1 changed files with 6 additions and 0 deletions
|
|
@ -55,6 +55,12 @@
|
||||||
at any time use those fds to import the dmabuf into any kernel
|
at any time use those fds to import the dmabuf into any kernel
|
||||||
sub-system that might accept it.
|
sub-system that might accept it.
|
||||||
|
|
||||||
|
However, when the underlying graphics stack fails to deliver the
|
||||||
|
promise, because of e.g. a device hot-unplug which raises internal
|
||||||
|
errors, after the wl_buffer has been successfully created the
|
||||||
|
compositor must not raise protocol errors to the client when dmabuf
|
||||||
|
import later fails.
|
||||||
|
|
||||||
To create a wl_buffer from one or more dmabufs, a client creates a
|
To create a wl_buffer from one or more dmabufs, a client creates a
|
||||||
zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params
|
zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params
|
||||||
request. All planes required by the intended format are added with
|
request. All planes required by the intended format are added with
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue