1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="weston_direct_display"> 3 4 <copyright> 5 Copyright © 2019 Collabora Ltd. 6 7 Permission is hereby granted, free of charge, to any person obtaining a 8 copy of this software and associated documentation files (the "Software"), 9 to deal in the Software without restriction, including without limitation 10 the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 and/or sell copies of the Software, and to permit persons to whom the 12 Software is furnished to do so, subject to the following conditions: 13 14 The above copyright notice and this permission notice (including the next 15 paragraph) shall be included in all copies or substantial portions of the 16 Software. 17 18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 DEALINGS IN THE SOFTWARE. 25 </copyright> 26 27 <interface name="weston_direct_display_v1" version="1"> 28 <description summary="weston direct display"> 29 Weston extension to instruct the compositor to avoid any import 30 of the dmabuf created by 'linux-dmabuf' protocol other than the display 31 controller. 32 33 Compositors are already going to use direct scan-out as much as possible but 34 there's no assurance that while doing so, they won't first import the dmabuf 35 in to the GPU. This extension assures the client that the compositor will 36 never attempt to import in to the GPU and pass it directly to the display 37 controller. 38 39 Clients can make use of this extension to pass the dmabuf buffer to the 40 display controller, potentially increasing the performance and lowering the 41 bandwidth usage. 42 43 Lastly, clients can make use of this extension in tandem with content-protection 44 one thus avoiding any GPU interaction and providing a secure-content path. 45 Also, in some cases, the memory where dmabuf are allocated are in specially 46 crafted memory zone which would be seen as an illegal memory access when the 47 GPU will attempt to read it. 48 49 WARNING: This interface by design might break screenshoting functionality 50 as compositing might be involved while doing that. Also, do note, that in 51 case the dmabufer provided can't be imported by KMS, the client connection 52 will be terminated. 53 54 WARNING: This extension requires 'linux-dmabuf' protocol and 55 'zwp_linux_buffer_params_v1' be already created by 'zwp_linux_buffer_v1'. 56 </description> 57 58 <request name="enable"> 59 <description summary="forward buffer to display controller"> 60 This request tells the compositor not to import the dmabuf to the GPU 61 in order to bypass it entirely, such that the buffer will be directly 62 scanned-out by the display controller. If HW is not capable/or there 63 aren't any available resources to directly scan-out the buffer, a 64 placeholder should be installed in-place by the compositor. The 65 compositor may perform checks on the dmabuf and refuse to create a 66 wl_buffer if the dmabuf seems unusable for being used directly. 67 68 Assumes that 'zwp_linux_buffer_params_v1' was already created 69 by 'zwp_linux_dmabuf_v1_create_params'. 70 </description> 71 <arg name="dmabuf" type="object" interface="zwp_linux_buffer_params_v1" 72 summary="enable direct-display for dmabuf buffer"/> 73 </request> 74 75 <request name="destroy" type="destructor"> 76 <description summary="destroy factory object"> 77 Destroys the factory object, but does not affect any other objects. 78 </description> 79 </request> 80 </interface> 81 82</protocol> 83