Mir

Code review comment for lp:~cemil-azizoglu/mir/use-options-to-probe

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

OK as an intermediate step, as long as it gets properly combined with the probing approach of mir-on-x11 (which I think was the plan anyway).

In the end this is how I think the logic should look like:

kms: if (use_vt_option || can_get_drm_master) return best; else return unsupported;
x11: if (xopendisplay_succeeds) return supported; else return unsupported;

> Couldn't we have a mesa-specific option:
> ./mir_demo_server --x11-display :0.0
> so that the host platforms are just the option-less versions?

I think the idea is to make the most reasonable choice at any time, which is in order:

1. Regardless of where we are, if --vt is used, use kms
2. If we are in a VT (= we can get drm master) use kms
3. If we are in an X11 session (= XOpenDisplay succeeds), use X11

There is also the choice of: Regardless of where we are (e.g. we could be in a VT), if DISPLAY is set use X11. However, that's difficult to implement without messing up the other rules. It is much easier to add --x11-display as you suggest, to force using X11, but I don't consider it critical.

review: Approve

« Back to merge proposal