diff options
author | Pekka Paalanen <pekka.paalanen@collabora.com> | 2020-06-01 16:47:40 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.com> | 2021-02-16 11:32:58 +0200 |
commit | f899eff0a7da3db1e47b95c648848a50e38cc29c (patch) | |
tree | 6f8816db9a1cd0fce61c5af45fce3fee7fc3bfb0 /unstable/linux-dmabuf | |
parent | d10d18f3d49374d2e3eb96d63511f32795aab5f7 (diff) |
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>
Diffstat (limited to 'unstable/linux-dmabuf')
-rw-r--r-- | unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml b/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml index 4b1dd74..85e99ba 100644 --- a/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml +++ b/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml @@ -55,6 +55,12 @@ at any time use those fds to import the dmabuf into any kernel 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 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 |