Hi, On Thu, 14 Nov 2019 at 22:44, Scott Anderson <sc...@anderso.nz> wrote: > On 15/11/19 4:04 am, Drew DeVault wrote: > > I think that there would be value in being able to suggest that a > > particluar buffer be scanned out for performance reasons. But, as a > > suggestion, and not a demand, and definitely not for secrecy reasons. > > wlroots-based compositors would reserve the right to read your buffers > > whenever we want. If I want to read your buffer for a frame to take a > > screenshot, it's not going to be the end of the world for performance > > and I don't want to end up segfaulting because of it. > > > > [...] > > > > If this protocol change were for the purpose of _suggesting_ scan-out, > > I'd be on board with it. But this is not that - if it were, we would > > dispense with any ideas around enforcing it with memory protections. > > Then we could get an improvement for performance without a regression > > for usability. > > > > Rather, this just seems to be a DRM-enabling change, and the official > > policy of wlroots will always be to NACK those for the wp and xdg > > namespaces. > > I don't think a hint for "please scan me out" has any value. A Wayland > compositor that is capable of scanning out will try to scan out > everybody as often as they can anyway, making the hint meaningless. A > Wayland compositor that is not capable of scanning out is also going to > ignore the hint, also making it meaningless. > > The only situation I could possibly think of where this could make a > difference is if you have two surfaces, and the compositor's policy > would normally be to scan out the focused surface, but chooses to scan > out e.g. a video player surface with this flag instead. That only works > if the video player is not occluded.
Right. ST (the SoC vendor) originally requested this a long time ago - perhaps a few years even. They run Weston on set-top boxes, and would like to have the underlying video surface hit overlays at the cost of GPU composition of the subtitle & UI surfaces. According to them, just doing the EGLImage import of video buffers was a large enough performance hit - if I remember correctly, mostly fine but occasional hitches - that they had to be able to bypass it. I don't really see any overlap with hints here, given that hints are server -> client, and also don't prevent the buffer from being imported into the GPU in the first place. But yes, as said in the MR, the current usecase we have is a system which (for good reason) distrusts the GPU with protected content. I'm fine with just putting this in as a Weston-private extension layered on top of dmabuf. > But that's also cheapened by the fact that this flag sounds like "free > performance", and everybody would just set it. Well, 'free performance but you're very likely to also display nothing in the general case', which is a less appealing trade-off. Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel