Posted Sep 11, 2013 20:27 UTC (Wed) by kugel (subscriber, #70540)
Parent article: Intel and XMir
I'm undecided.
On the one hand I feel that any driver is not in the position to make such a move. The driver should enable to use the hardware on whatever platform the costumer of the hardware wants to use it on (where feasible, but this 300 line change is feasible).
On the other hand I can understand that a project doesn't want code (and the associated maintenance burden) when the code doesn't align with the maintainers interests (or even work against them).
But there is one thing that I totally don't understand: why does a device driver and/or mesa even require display specific code in the first place. To my understanding a driver should pretty agnostic to whatever client code. The client code (display server) is calling the driver's APIs (even generic stuff like OpenGL in this case), not the other way around. This situation I find strange and I think Intel shouldn't even be in the position that requires a decision (technical or political).
Is the mesa architecture just bad in this detail or am I missing something?
Posted Sep 12, 2013 6:17 UTC (Thu) by kugel (subscriber, #70540)
[Link]
Ah, so there was my confusion. So this all is about the driver for X which needs to modified to work with non-X systems?
Okay, these were probably design with X (and only X) in mind and that simplified the driver development back then. But I still think that a proper thing would be a generic driver API X/Wayland/Mir should be backed by.
Intel and XMir
Posted Sep 12, 2013 8:56 UTC (Thu) by Frej (subscriber, #4165)
[Link]
A more unified driver interface is what you get, when all this is done (10+ years?). Wayland does not have device specific drivers. Instead you need a kernel drm driver and some user space part in mesa (or your own GL implementation).
I think there is some tiny integration needed between Wayland and mesa(or similar) for EGL to work (and similar Mir). But EGL is just another windowing API instead of GLX, not the core parts of opengl itself. Windows has WGL, osx has CGL, EGL is supposed to be portable API.
Intel and XMir
Posted Sep 12, 2013 17:24 UTC (Thu) by glisse (subscriber, #44837)
[Link]
It's not a driver for X that needs to be modified for non X system. It's a driver for X that need to be modified so X emulation in Mir can work.
So right now you have XApp talking to Xserver talk to Xdriver (xf86-video-intel in this case).
When running Xapp inside Mir you have Xapp talking to modified Xserver that talk to Mir and to modified Xdriver (xf86-video-intel in this case).
The modified Xdriver also talk to Mir and to the hardware. Mir in itself needs another completely different driver than xf86-video-intel. In this case a GL driver.
So a native mir app would talk to mir server and to a graphic driver (GL being the obvious and only choice at the moment). Mir server itself would talk to a GL driver.
I tried to make ascii schematic but lwn just swallow space.
Same logic apply to wayland and to allow an Xapp to run on top of modified Xserver that talk to wayland server and to wayland modified Xdriver.
Intel and XMir
Posted Sep 15, 2013 12:59 UTC (Sun) by krake (subscriber, #55996)
[Link]
Do you know if this is a short term hack?
I.e. until fully implemented Mir/Wayland "drivers" forXorg exists or a new X server on top of Mir/Wayland have been written?
Or is it unlikely that XMir/XWayland will ever be just normal clients of their respective display server?
Intel and XMir
Posted Sep 16, 2013 9:15 UTC (Mon) by dgm (subscriber, #49227)
[Link]
I'm not sure about Mir, but under Wayland X11 works exactly the same as under Windows or OS X, that is, X11 should implement the drawing primitives using the drawing API at hand. Under Windows that would be GDI and Quartz under OS X. As Wayland does not force you to use any particular drawing API, you could use OpenGL/EGL or a software renderer or whatever.
If Mir does something different it probably means (wild speculation) that they are cutting corers in the name of shipping earlier. But don't quote me on that.
Intel and XMir
Posted Sep 16, 2013 9:32 UTC (Mon) by krake (subscriber, #55996)
[Link]
This was my initial understanding as well.
However, when I asked about this on another site's comment section, someone pointed out that the xwayland branch of the driver contains a similar change: http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/...
Hence the uncertainty whether this is a short time hack (and removed before merged) or whether it will stay that way for a longer time.
Intel and XMir
Posted Sep 16, 2013 15:58 UTC (Mon) by dgm (subscriber, #49227)
[Link]
Interesting. Thanks for pointing this out.
Intel and XMir
Posted Sep 12, 2013 5:18 UTC (Thu) by Kayden (subscriber, #89093)
[Link]
As Frej mentioned, this controversy is about xf86-video-intel, not Mesa.
However, since you brought it up...Mesa's EGL implementation needs to know about the underlying window system (X11, Wayland, Mir, surfaceflinger, etc.), since that's sort of EGL's job. The rest of Mesa doesn't know or care.
The Mesa patches haven't been upstreamed yet either. As far as I know, xf86-video-intel was the only thing that ever had support (if briefly).