Mir

Merge lp://qastaging/~vanvugt/mir/fix-1584894 into lp://qastaging/mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 3804
Proposed branch: lp://qastaging/~vanvugt/mir/fix-1584894
Merge into: lp://qastaging/mir
Diff against target: 202 lines (+66/-30)
5 files modified
src/platforms/mesa/server/kms/display_buffer.cpp (+20/-12)
src/platforms/mesa/server/kms/kms_page_flipper.cpp (+6/-0)
src/platforms/mesa/server/kms/real_kms_output.cpp (+9/-6)
tests/unit-tests/platforms/mesa/kms/test_display.cpp (+27/-8)
tests/unit-tests/platforms/mesa/kms/test_real_kms_output.cpp (+4/-4)
To merge this branch: bzr merge lp://qastaging/~vanvugt/mir/fix-1584894
Reviewer Review Type Date Requested Status
Kevin DuBois (community) Approve
Andreas Pokorny (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+309819@code.qastaging.launchpad.net

Commit message

If page flipping fails then fall back to blitting the screen
instead of crashing. This allows Mir servers to run under VirtualBox
(LP: #1584894) and also on ASpeed graphics chips.

Server-side GL rendering works fine, as do software clients. Hardware
(GL) clients presently just hang and never render, but I'm happy to
declare that outside the scope of LP: #1584894.

Description of the change

Surprisingly resizing the screen (the VirtualBox window) also works. VirtualBox simply 'unplugs' the old virtual display and plugs in a new one with the new dimensions. And Mir already supports such hotplugging.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3801
https://mir-jenkins.ubuntu.com/job/mir-ci/2097/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2697
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2760
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2752
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2752
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2752
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2726/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2726/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2726/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2726/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2726/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2726
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2726/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2097/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The lack of hardware client support is probably because DRM_CAP_PRIME is missing (returned as zero) under VirtualBox. We may need to fall back to flink to resolve that on systems that lack PRIME. I'm hoping that's all it is...

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

I tried it on a ast-drm system. But the system behaves strange compared to x11. I.e. in fingerpaint one mouse down the system freezes for a short time - or the frame rate drops to below one frame per second. I havent tried virtual box - but the vbox drm driver code claims to be a fork of ast.

Approve because it is an improvement over crashing on startup..

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fingerpaint might be driving the display too hard (since it uses swap interval 0). Maybe try the -w option to force swap interval 1. That said, there is no throttling in this code path so my VM for example renders >80FPS (according to compositor report) despite the virtual output reporting 59.8Hz.

If your ast system supports wait for vblank then we should do that (after set_crtc) to slow it down, perhaps. Or just sleep, in case the driver doesn't support wait for vblank.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

It also happens with flicker.. I will add a few reports to learn more. It would be easier if we could restrict mir to only open specific dri nodes.. I currently have to remove the amd card, because it would otherwise try to poke on the amd card.. especially then for rendering.. and the aspeed then stops working.

Revision history for this message
Kevin DuBois (kdub) wrote :

alright by me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches