Merge lp:~cemil-azizoglu/mir/use-options-to-probe into lp:mir
- use-options-to-probe
- Merge into development-branch
Status: | Rejected |
---|---|
Rejected by: | Cemil Azizoglu |
Proposed branch: | lp:~cemil-azizoglu/mir/use-options-to-probe |
Merge into: | lp:mir |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~cemil-azizoglu/mir/use-options-to-probe |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Needs Resubmitting | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Chris Halse Rogers | Approve | ||
Alexandros Frantzis (community) | Approve | ||
Kevin DuBois (community) | Needs Information | ||
Review via email: mp+263447@code.launchpad.net |
Commit message
Use command line options during platform probe.
Description of the change
Use command line options during platform probe.
Return best when a platform-specific option is passed in. This will help in differentiating between Mesa and X11 platforms when the server is launched from an xterm depending on the presence of the "--vt" option.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2721
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2721
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kevin DuBois (kdub) wrote : | # |
IIUC, currently we have:
host platforms:
./mir_demo_server
guest platforms:
./mir_demo_server --host-server
./mir_demo_server --offscreen
With this branch, it becomes a bit more special-cased:
host platforms:
[android] ./mir_demo_server
[mesa] ./mir_demo_server --vt X
guest platforms:
[mesa] ./mir_demo_server
./mir_demo_server --host-server
./mir_demo_server --offscreen
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?
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_
> 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.
Chris Halse Rogers (raof) wrote : | # |
Not what I was expecting, but this seems equally sensible :).
+1 for Alexandros' expectations for how this will evolve in the mir-on-x11 branch.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2721
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2722
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2723
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Alberto Aguirre (albaguirre) wrote : | # |
Well this is weird:
"3: Unknown package: debian/control contains versioned package python-
3: The package list in this script needs to be updated
3/15 Test #3: package-abis .......
I don't get this on my local machine.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2725
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2727
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2728
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
There are possibly better solutions...
Example 1: mplayer/mencoder with its countless built-in drivers and codecs each with their own options, makes it more obvious when a codec-specific option is specific. e.g...
mencoder -ovc lavc -lavcopts ...
This states clearly that I want to use video codec "lavc" and it has specific options of its own.
Example 2: In Mesa, graphics drivers have custom options of their own which you pass according to naming convention of environment variables: http://
In both of these examples it's much clearer that an option is platform or driver specific. Similarly, I think we should make driver-specific options more explicit. Like...
<some_
or
<some_
Most importantly that means there is only _one_ option you need to look at to force the choice of graphics driver (--driver). Or if that's not provided then auto-detect. As an added bonus, my proposal also means that each driver does not need to be coupled to the ugly options interface, but instead just gets an option string of its own interpretation. It would also be a bonus if we went back onto the path of supporting graphics drivers written in C without requiring C++ from everyone (which limits driver compatibility).
But now I've proposed that what we have already needs to be changed too... More pragmatically I think there should only be one single server option to force the choice of graphics driver. It should not be implied by context. Once that is in place, it would syntactically not be possible to have the ambiguous:
env DISPLAY=:0 <some_mir_server> --vt 1
because it would be replaced by:
env DISPLAY=:0 <some_mir_server> --driver kms --kms-opts vt=1
which unambiguously selects KMS over X11.
Daniel van Vugt (vanvugt) wrote : | # |
Another bonus of my proposal is that we could then avoid loading all the drivers twice on start-up. You don't need to know driver-specific options in advance, unless the user explicitly asked about them:
some_mir_server --driver kms --kms-opts help
This is a pretty common pattern you will find in a lot of software and it would solve much of our problems nicely.
Alexandros Frantzis (afrantzis) wrote : | # |
> Similarly, I think we should make driver-specific options more explicit.
Seems like a good idea. I would go for:
--driver mesa-kms|
--driver-opts mesa-kms:
Where driver-opts can be used even without an explicit driver setting. The reason is to allow invocations to work across platforms without change. So a script that wants to run everywhere, but wants to use VT 1 on mesa-kms can just use:
unity-system-
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
> 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?
With this branch we can reliably differentiate between mesa and x11. So I don't think this is needed. It doesn't bring any value. Besides what would it mean when you do "./mir_demo_server --x11-display :0.0" from a vt? It wouldn't make sense.
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
> > Similarly, I think we should make driver-specific options more explicit.
>
> Seems like a good idea. I would go for:
>
> --driver mesa-kms|
> --driver-opts mesa-kms:
> opt=3
>
> Where driver-opts can be used even without an explicit driver setting. The
> reason is to allow invocations to work across platforms without change. So a
> script that wants to run everywhere, but wants to use VT 1 on mesa-kms can
> just use:
>
> unity-system-
alf, duflu, I'm not sure what problem we are trying to solve here? My code is based on what we have which uses implicit (autodetection) method of choosing a driver. You seem to be questioning the underlying plumbing.
That said, I don't see any reason to change what we have. We are reliably differentiating between drivers. And with this branch and mir-on-x, we continue to do that.
Daniel van Vugt (vanvugt) wrote : | # |
Indeed I am questioning existing logic outside of this proposal too. If the existing logic needs changing then building on it further is just growing the problem.
What I propose requires less code, and also would fix bug 1454105.
It's not a massive issue if this branch lands. However that would make the problem larger and make it difficult to remove all this stuff, given we think we might want to.
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
> Indeed I am questioning existing logic outside of this proposal too. If the
> existing logic needs changing then building on it further is just growing the
> problem.
>
> What I propose requires less code, and also would fix bug 1454105.
>
> It's not a massive issue if this branch lands. However that would make the
> problem larger and make it difficult to remove all this stuff, given we think
> we might want to.
Choosing a driver explicitly is already supported - you just have to provide the '--platform-
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2729
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
I no longer feel strongly enough to be the sole blocker here.
We bump the platform ABI often enough that changing it again after this lands would not be unusual.
Daniel van Vugt (vanvugt) wrote : | # |
This branch landed but then got reverted due to critical bug 1474720.
Please fix and resubmit (you'll likely need to use a new branch name or LP gets confused).
FAILED: Continuous integration, rev:2720 jenkins. qa.ubuntu. com/job/ mir-ci/ 4237/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/3060/ console jenkins. qa.ubuntu. com/job/ mir-clang- wily-amd64- build/580 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/3008/ console jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 393 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 393/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3008/console
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4237/ rebuild
http://