Originally posted by mppix
View Post
Originally posted by mppix
View Post
GBM by design is about sharing buffers between the display driver and the linux kernel, this is not going to work with the NVidia driver given that NVidia blob (the one that is shared amongst all OS's) is controlling the buffer work and abstracts it away in a black box, it can only be accessible indirectly by the interface.
And this is the issue, they way NVidia drivers do memory management/buffers is completely different to how GBM is designed, so actually yes I am completely right when I say that NVidia would have to completely rewrite their driver to make it work on Wayland (at least with decent performance). NVidia proposed EGLStreams because difference interface that largely more agnostic to underlying graphics driver (and ofc they also explored other options). They did a presentation on this (see https://www.reddit.com/r/linuxquesti...m_medium=web2x, https://lobste.rs/s/cfatri/nvidia_sucks_i_m_sick_it) which I am trying to find, but the summary is they would have to redo the entire driver just for Linux.
This is also the same reason why NVidia is trying to come up with alternatives for GBM (i.e. see https://www.phoronix.com/scan.php?pa...Allocator-2019https://www.phoronix.com/scan.php?pa...Allocator-2019 ). The current design of GBM is too limited and linux specific, this is fine if you have drivers explicitly written for Linux but if you have a driver design like NVidia's, GBM either doesn't work or the performance overhead of having to translate all of the buffers in a format that GBM understands would be prohibitive to the driver getting any decent performance.
NVidia is most likely never going to support GBM with their closed source driver (at least with the current design of GPM). The performance would be much lower with GBM and the whole point of their current approach to drivers is that they deliver the best performance on all platforms (this is why they stuck to their cloesd source blob, its the only way they can guarantee a standard of performance for all OS's).
Originally posted by mppix
View Post
Honestly you need to attribute Hanlon's razor here, NVidia isn't doing EGLStreams out of spite or malice but out of necessity from initially being stupid when they didn't participate in discussions over interfaces like 6 or 7 years ago with the Linux community. The design of GBM was never going to work with NVidia's current driver because they are designed in completely different ways. It was a stupid decision on NVidia to never participate in such discussions, maybe they thought Wayland would flop so it would be a waste of time, or maybe they were just waiting to see what would happen, who knows?
Also do note that EGLStreams is actually an open cross playform specification designed by Khronos. So if you remove all of the "NVidia is proposing EGLStreams so we have to hate on NVidia" from the discussion then there is nothing from a design space that prevents Wayland from using EGLStreams, Wayland isn't supposed to be tied to a specific driver interface (its just a protocol). Other linux based platforms (such as Android) also use similar solutions to EGL Streams.
The critical point here is that GBM was designed specifically as a Linux only interface with a very Linux way of doing/viewing things, so unless closed source drivers happen to be designed with the same assumptions that GBM has, GBM is just not going to work with such drivers and this is the case with NVidia's driver. Linux could have gone two paths, make a display driver more similar to Windows which makes it very easy to integrate for both closed and open source drivers or have a solution like GBM, and they picked GBM. Note that you can see this with AMD as well, their code path for Windows is now completely different to the Linux one since they abandoned their old fglrx.
Honestly do your own research in this area, its quite enlightening in explaining whats happening in this saga.
Comment