[PATCH] unstable/linux-dmabuf: Add 'direct_display' flag

Drew DeVault sir at cmpwn.com
Thu Nov 14 15:04:53 UTC 2019


On Fri Nov 15, 2019 at 12:39 AM, Scott Anderson wrote:
> > A hint is merely a hint. The compositor can abide or not by that.
> > This flag will explicitly close the client connection if the buffer
> > can't be scanned out when this flag is passed.
>
> This flag doesn't sound like a hint to me, but a hard requirement. From 
> the discussion I saw on the MR [1], if we don't abide, we risk being killed.

I agree: that's not a hint, it's a demand.

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.

> But without the excuse for performance, that also raises another issue 
> for me about content-protection living in a "wp" protocol. The 
> governance thing hasn't officially been applied yet, and I wouldn't even 
> be the official spokesperson for wlroots, but I would personally NACK 
> that. Content-protection is a niche use case not generally useful to 
> Wayland implementations. I think a "ext" "wl_buffer factory for 
> protected dmabufs" would be a better place for this. It means you could 
> advertise a correct list of formats+modifiers too.

As an official spokesperson for wlroots:

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.


More information about the wayland-devel mailing list