Mir

Merge lp:~alan-griffiths/mir/split-mesa into lp:mir

Proposed by Alan Griffiths on 2017-05-11
Status: Merged
Approved by: Alan Griffiths on 2017-05-16
Approved revision: 4168
Merged at revision: 4169
Proposed branch: lp:~alan-griffiths/mir/split-mesa
Merge into: lp:mir
Diff against target: 738 lines (+342/-61)
21 files modified
include/platform/mir/graphics/platform_authentication.h (+12/-0)
include/renderers/gl/mir/renderer/gl/egl_platform.h (+2/-2)
src/platforms/mesa/server/CMakeLists.txt (+2/-0)
src/platforms/mesa/server/drm_native_platform.cpp (+9/-0)
src/platforms/mesa/server/drm_native_platform.h (+12/-2)
src/platforms/mesa/server/gbm_platform.cpp (+88/-0)
src/platforms/mesa/server/gbm_platform.h (+65/-0)
src/platforms/mesa/server/kms/CMakeLists.txt (+0/-1)
src/platforms/mesa/server/kms/guest_platform.cpp (+43/-33)
src/platforms/mesa/server/kms/guest_platform.h (+10/-2)
src/platforms/mesa/server/kms/platform.cpp (+4/-3)
src/platforms/mesa/server/kms/platform.h (+2/-2)
src/platforms/mesa/server/kms/platform_symbols.cpp (+38/-0)
src/platforms/mesa/server/nested_authentication.cpp (+0/-1)
src/platforms/mesa/server/x11/graphics/graphics.cpp (+45/-5)
src/platforms/mesa/server/x11/graphics/guest_platform.cpp (+3/-3)
src/platforms/mesa/server/x11/graphics/guest_platform.h (+2/-2)
src/platforms/mesa/server/x11/graphics/platform.cpp (+2/-2)
src/platforms/mesa/server/x11/graphics/platform.h (+1/-1)
src/server/graphics/nested/platform.h (+1/-1)
tests/unit-tests/platforms/mesa/kms/test_nested_authentication.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/split-mesa
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration 2017-05-11 Approve on 2017-05-16
Andreas Pokorny (community) Approve on 2017-05-16
Daniel van Vugt 2017-05-11 Abstain on 2017-05-15
Chris Halse Rogers 2017-05-11 Pending
Cemil Azizoglu 2017-05-11 Pending
Review via email: mp+323901@code.launchpad.net

This proposal supersedes a proposal from 2017-03-27.

Commit message

prepare the mesa-kms and mesa-x11 platforms for splitting mg::Platform into rendering and display components. both of these platforms share the same GBMPlatform for buffer allocation.

Description of the change

prepare the mesa-kms and mesa-x11 platforms for splitting mg::Platform into rendering and display components. both of these platforms share the same GBMPlatform for buffer allocation.

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4096
https://mir-jenkins.ubuntu.com/job/mir-ci/3252/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4379
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4466
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4456
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4456
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4456
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4411/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/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4411/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4411/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/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4411/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/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4411/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/4411
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4411/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:4097
https://mir-jenkins.ubuntu.com/job/mir-ci/3257/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4385/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4474
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4464
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4464
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4464
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4417
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4417/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/4417
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4417/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4417
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4417/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4417/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4417/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/4417
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4417/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/4417
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4417/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal

Hrm.

+mir::UniqueModulePtr<mir::graphics::RenderingPlatform> create_rendering_platform(
+ std::shared_ptr<mir::options::Option> const& options,
+ std::shared_ptr<mir::graphics::PlatformAuthentication> const& platform_authentication)

Where did this create_rendering_platform() signature come from? I thought we were going to dynamic_cast<> the DisplayPlatform?

Is there an urgent need for this MP to land, or can we fix the base API first?

(There are other issues, like the entirely unnecessary auth_fd(), but that's pre-existing)

review: Needs Information
Kevin DuBois (kdub) wrote : Posted in a previous version of this proposal

create_rendering_platform needs an update so mg::PlatformAuthentication is not used. This landed before the dynamic_cast<> plan was adopted. This will be updated in capstone branch, when I change src/server/graphics after changing all the src/platforms.

Kevin DuBois (kdub) wrote : Posted in a previous version of this proposal

> Is there an urgent need for this MP to land, or can we fix the base API first?
>
> (There are other issues, like the entirely unnecessary auth_fd(), but that's
> pre-existing)

Sure, all for additional cleanups. I'm trying to avoid scope creep while splitting out the display and rendering bits at the moment. So I'd rather that further cleanups come later (and be based on the new split system)

Cemil Azizoglu (cemil-azizoglu) wrote : Posted in a previous version of this proposal

ok by me

review: Approve
Kevin DuBois (kdub) wrote : Posted in a previous version of this proposal

^intermittent testflinger failure

Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4098
https://mir-jenkins.ubuntu.com/job/mir-ci/3282/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4431
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4523
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4513
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4513
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4513
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4463/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/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4463/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4463/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/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4463/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/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4463/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/4463
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4463/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4099
https://mir-jenkins.ubuntu.com/job/mir-ci/3298/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4460
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4575
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4565
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4565
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4565
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4565
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4492/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/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4492/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4492/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/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4492/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/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4492/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/4492
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4492/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal

OK, on the assumption that the dynamic_cast<> cleanup is coming in a later branch.

review: Approve
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1265/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4475/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1344/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4590
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4579
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4579
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4579
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4579
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4506
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4506/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/4506
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4506/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4506/console
    ABORTED: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4506/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4506/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/4506
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4506/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/4506
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4506/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4099
https://mir-jenkins.ubuntu.com/job/mir-ci/3348/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4522
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4640
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4629
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4629
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4629
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4629
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4553/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/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4553/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4553/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/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4553/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/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4553/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/4553
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4553/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1276/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4526/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1356/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4644
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4633
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4633
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4633
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4633
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4557/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/4557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4557/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4557/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4557/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/4557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4557/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/4557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4557/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4099
https://mir-jenkins.ubuntu.com/job/mir-ci/3352/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4529
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4647
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4636
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4636
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4636
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4636
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4560/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/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4560/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4560/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/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4560/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/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4560/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/4560
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4560/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Alberto Aguirre (albaguirre) wrote : Posted in a previous version of this proposal

Looks like with LTO enabled:

03:40:09 ../../../../../../../src/platforms/mesa/server/gbm_platform.h:52:26: error: ���egl_native_display��� violates the C++ One Definition Rule [-Werror=odr]
03:40:09 ../../../../../src/platforms/mesa/server/gbm_platform.cpp:85:22: note: ���egl_native_display��� was previously declared here
03:40:09 lto1: all warnings being treated as errors

Looks like an issue with different definitions of EGLNativeDisplayType ?

Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Yeah that's an old problem (with EGL itself). Last time it happened the answer was to just ensure all our code used void* for EGLNative*

Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:4100
https://mir-jenkins.ubuntu.com/job/mir-ci/3354/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4532
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4650
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4639
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4639
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4639
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4639
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4563/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/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4563/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4563/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/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4563/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/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4563/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/4563
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4563/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Oh, actually, further to Alberto's comments, that does need fixing:

+ EGLNativeDisplayType egl_native_display() const override;

because the definition of EGLNativeDisplayType can change profoundly depending on where it is included and what the assumed EGL platform is (decided a pre-processing time). Hence it fails the one-definition-rule and will occasionally cause build failures.

A good compromise I think is to write code that assumes EGLNativeDisplayType is always going to be compatible with a pointer. So please change EGLNativeDisplayType to use MirEGLNativeDisplayType (which is currently defined in mir_toolkit/client_types.h). Although it's better if we never need to return it from a function at all...

review: Needs Fixing
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4167
https://mir-jenkins.ubuntu.com/job/mir-ci/3393/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4611
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4740
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4729
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4729
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4643
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4643/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/4643
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4643/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4643
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4643/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4643
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4643/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/4643
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4643/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Daniel van Vugt (vanvugt) wrote :

Thanks for fixing EGLNativeDisplayType, but I just realized my suggestion was partially wrong. MirEGLNativeDisplayType is specifically for Mir clients, whereas in this proposal it's for the server graphics platform.

Each graphics platform is apparently free to typedef EGLNativeDisplayType to whatever they like (?). But that's not ABI-friendly (or API friendly, hence ODR).

EGL itself doesn't set a good example, requiring it to be passed by value regardless of the actual typedef:
https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglGetDisplay.xhtml

Still the right answer judging by /usr/include/EGL/eglplatform.h would be to assume the typedef is pointer-compatible. Only 'MirEGLNativeDisplayType' is the wrong name to give it...

We need a new typedef, similar to what I did in mock_egl.h to solve the same ODR problem there:

    typedef void* AnyNativeType;
    MOCK_METHOD1(eglGetDisplay, EGLDisplay(AnyNativeType));

review: Needs Fixing
Daniel van Vugt (vanvugt) wrote :

Try something like

  typedef void* MirServerEGLNativeDisplayType;

Daniel van Vugt (vanvugt) wrote :

Note there is a requirement that the definition of EGLNativeDisplayType can take an integer:

/usr/include/EGL/egl.h:#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)

So that's something at least :P

lp:~alan-griffiths/mir/split-mesa updated on 2017-05-12
4168. By Alan Griffiths on 2017-05-12

Chose a different name

Alan Griffiths (alan-griffiths) wrote :

> Note there is a requirement that the definition of EGLNativeDisplayType can
> take an integer:
>
> /usr/include/EGL/egl.h:#define EGL_DEFAULT_DISPLAY
> ((EGLNativeDisplayType)0)
>
> So that's something at least :P

LOL A C style cast doesn't impose many constraints.

Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4168
https://mir-jenkins.ubuntu.com/job/mir-ci/3395/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4613/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4742
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4731
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4731
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4645
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4645/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/4645
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4645/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4645
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4645/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4645
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4645/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4645/console

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

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

^ Seems unrelated. Logged as lp:1690358

Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4168
https://mir-jenkins.ubuntu.com/job/mir-ci/3397/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4615
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4744
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4733
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4733
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4647
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4647/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/4647
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4647/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4647
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4647/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4647
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4647/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/4647
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4647/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Daniel van Vugt (vanvugt) wrote :

Ta. I am no longer concerned about this, but also have not reviewed it in detail.

review: Abstain
Andreas Pokorny (andreas-pokorny) wrote :

Yes straight forward - and I have no opinion on the EGL typedefs

review: Approve
Mir CI Bot (mir-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/platform/mir/graphics/platform_authentication.h'
2--- include/platform/mir/graphics/platform_authentication.h 2017-04-28 03:49:54 +0000
3+++ include/platform/mir/graphics/platform_authentication.h 2017-05-12 10:00:59 +0000
4@@ -21,6 +21,7 @@
5
6 #include "mir/optional_value.h"
7 #include "mir/fd.h"
8+#include "mir/module_deleter.h"
9 #include <memory>
10 #include <vector>
11
12@@ -75,6 +76,17 @@
13 PlatformAuthentication& operator=(PlatformAuthentication const&) = delete;
14 };
15
16+class PlatformAuthenticationFactory
17+{
18+public:
19+ virtual ~PlatformAuthenticationFactory() = default;
20+ virtual UniqueModulePtr<PlatformAuthentication> create_platform_authentication() = 0;
21+protected:
22+ PlatformAuthenticationFactory() = default;
23+ PlatformAuthenticationFactory(PlatformAuthenticationFactory const&) = delete;
24+ PlatformAuthenticationFactory& operator=(PlatformAuthenticationFactory const&) = delete;
25+};
26+
27 }
28 }
29
30
31=== modified file 'include/renderers/gl/mir/renderer/gl/egl_platform.h'
32--- include/renderers/gl/mir/renderer/gl/egl_platform.h 2017-03-15 11:22:17 +0000
33+++ include/renderers/gl/mir/renderer/gl/egl_platform.h 2017-05-12 10:00:59 +0000
34@@ -19,7 +19,7 @@
35 #ifndef MIR_RENDERER_GL_EGL_PLATFORM_H_
36 #define MIR_RENDERER_GL_EGL_PLATFORM_H_
37
38-#include <EGL/egl.h>
39+typedef void* MirServerEGLNativeDisplayType;
40
41 namespace mir
42 {
43@@ -32,7 +32,7 @@
44 {
45 public:
46 virtual ~EGLPlatform() = default;
47- virtual EGLNativeDisplayType egl_native_display() const = 0;
48+ virtual MirServerEGLNativeDisplayType egl_native_display() const = 0;
49
50 protected:
51 EGLPlatform() = default;
52
53=== modified file 'src/platforms/mesa/server/CMakeLists.txt'
54--- src/platforms/mesa/server/CMakeLists.txt 2017-04-28 03:49:54 +0000
55+++ src/platforms/mesa/server/CMakeLists.txt 2017-05-12 10:00:59 +0000
56@@ -19,6 +19,8 @@
57 gbm_buffer.cpp
58 ipc_operations.cpp
59 software_buffer.cpp
60+ gbm_platform.cpp
61+ nested_authentication.cpp
62 drm_native_platform.cpp
63 )
64
65
66=== modified file 'src/platforms/mesa/server/drm_native_platform.cpp'
67--- src/platforms/mesa/server/drm_native_platform.cpp 2017-03-23 17:18:29 +0000
68+++ src/platforms/mesa/server/drm_native_platform.cpp 2017-05-12 10:00:59 +0000
69@@ -77,3 +77,12 @@
70 {
71 return {mir::Fd(IntOwnedFd{drm.fd})};
72 }
73+
74+mgm::DRMNativePlatformAuthFactory::DRMNativePlatformAuthFactory(helpers::DRMHelper& drm) : drm(drm)
75+{
76+}
77+
78+mir::UniqueModulePtr<mg::PlatformAuthentication> mgm::DRMNativePlatformAuthFactory::create_platform_authentication()
79+{
80+ return make_module_ptr<mgm::DRMNativePlatform>(drm);
81+}
82
83=== modified file 'src/platforms/mesa/server/drm_native_platform.h'
84--- src/platforms/mesa/server/drm_native_platform.h 2017-03-23 17:18:29 +0000
85+++ src/platforms/mesa/server/drm_native_platform.h 2017-05-12 10:00:59 +0000
86@@ -32,8 +32,18 @@
87 {
88 class DRMHelper;
89 }
90-class DRMNativePlatform : public graphics::NativeDisplayPlatform,
91- public graphics::PlatformAuthentication
92+
93+class DRMNativePlatformAuthFactory : public graphics::NativeDisplayPlatform,
94+ public graphics::PlatformAuthenticationFactory
95+{
96+public:
97+ DRMNativePlatformAuthFactory(helpers::DRMHelper&);
98+ UniqueModulePtr<PlatformAuthentication> create_platform_authentication() override;
99+private:
100+ helpers::DRMHelper& drm;
101+};
102+
103+class DRMNativePlatform : public graphics::PlatformAuthentication
104 {
105 public:
106 DRMNativePlatform(helpers::DRMHelper&);
107
108=== added file 'src/platforms/mesa/server/gbm_platform.cpp'
109--- src/platforms/mesa/server/gbm_platform.cpp 1970-01-01 00:00:00 +0000
110+++ src/platforms/mesa/server/gbm_platform.cpp 2017-05-12 10:00:59 +0000
111@@ -0,0 +1,88 @@
112+/*
113+ * Copyright © 2017 Canonical Ltd.
114+ *
115+ * This program is free software: you can redistribute it and/or modify it
116+ * under the terms of the GNU Lesser General Public License version 3,
117+ * as published by the Free Software Foundation.
118+ *
119+ * This program is distributed in the hope that it will be useful,
120+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
121+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122+ * GNU Lesser General Public License for more details.
123+ *
124+ * You should have received a copy of the GNU Lesser General Public License
125+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
126+ *
127+ * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
128+ */
129+
130+#include "gbm_platform.h"
131+#include "mir/graphics/platform_authentication.h"
132+#include "buffer_allocator.h"
133+#include "ipc_operations.h"
134+#include "nested_authentication.h"
135+#include <boost/throw_exception.hpp>
136+
137+namespace mg = mir::graphics;
138+namespace mgm = mir::graphics::mesa;
139+
140+mgm::GBMPlatform::GBMPlatform(
141+ BypassOption bypass_option,
142+ BufferImportMethod import_method,
143+ std::shared_ptr<mg::PlatformAuthentication> const& platform_authentication) :
144+ bypass_option(bypass_option),
145+ import_method(import_method),
146+ platform_authentication(platform_authentication),
147+ gbm{std::make_shared<mgm::helpers::GBMHelper>()},
148+ auth{std::make_shared<mgm::NestedAuthentication>(platform_authentication)}
149+{
150+ auto master = platform_authentication->drm_fd();
151+ auto auth = platform_authentication->auth_extension();
152+ if (master.is_set())
153+ {
154+ gbm->setup(master.value());
155+ }
156+ else if (auth.is_set())
157+ {
158+ gbm->setup(auth.value()->auth_fd());
159+ }
160+ else
161+ {
162+ BOOST_THROW_EXCEPTION(std::logic_error("no authentication fd to make gbm buffers"));
163+ }
164+}
165+
166+mgm::GBMPlatform::GBMPlatform(
167+ BypassOption bypass_option,
168+ BufferImportMethod import_method,
169+ std::shared_ptr<mir::udev::Context> const& udev,
170+ std::shared_ptr<mgm::helpers::DRMHelper> const& drm) :
171+ bypass_option(bypass_option),
172+ import_method(import_method),
173+ udev(udev),
174+ drm(drm),
175+ gbm{std::make_shared<mgm::helpers::GBMHelper>()},
176+ auth{drm}
177+{
178+ gbm->setup(*drm);
179+}
180+
181+mir::UniqueModulePtr<mg::GraphicBufferAllocator> mgm::GBMPlatform::create_buffer_allocator()
182+{
183+ return make_module_ptr<mgm::BufferAllocator>(gbm->device, bypass_option, import_method);
184+}
185+
186+mir::UniqueModulePtr<mg::PlatformIpcOperations> mgm::GBMPlatform::make_ipc_operations() const
187+{
188+ return make_module_ptr<mg::mesa::IpcOperations>(auth);
189+}
190+
191+mg::NativeRenderingPlatform* mgm::GBMPlatform::native_rendering_platform()
192+{
193+ return this;
194+}
195+
196+MirServerEGLNativeDisplayType mgm::GBMPlatform::egl_native_display() const
197+{
198+ return gbm->device;
199+}
200
201=== added file 'src/platforms/mesa/server/gbm_platform.h'
202--- src/platforms/mesa/server/gbm_platform.h 1970-01-01 00:00:00 +0000
203+++ src/platforms/mesa/server/gbm_platform.h 2017-05-12 10:00:59 +0000
204@@ -0,0 +1,65 @@
205+/*
206+ * Copyright © 2017 Canonical Ltd.
207+ *
208+ * This program is free software: you can redistribute it and/or modify it
209+ * under the terms of the GNU Lesser General Public License version 3,
210+ * as published by the Free Software Foundation.
211+ *
212+ * This program is distributed in the hope that it will be useful,
213+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
214+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
215+ * GNU Lesser General Public License for more details.
216+ *
217+ * You should have received a copy of the GNU Lesser General Public License
218+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
219+ *
220+ * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
221+ */
222+
223+#ifndef MIR_GRAPHICS_MESA_GBM_PLATFORM_H_
224+#define MIR_GRAPHICS_MESA_GBM_PLATFORM_H_
225+
226+#include "mir/graphics/platform.h"
227+#include "display_helpers.h"
228+#include "platform_common.h"
229+#include "mir/renderer/gl/egl_platform.h"
230+#include "buffer_allocator.h"
231+
232+namespace mir
233+{
234+namespace graphics
235+{
236+namespace mesa
237+{
238+class GBMPlatform : public graphics::RenderingPlatform,
239+ public graphics::NativeRenderingPlatform,
240+ public renderer::gl::EGLPlatform
241+{
242+public:
243+ GBMPlatform(
244+ BypassOption option,
245+ BufferImportMethod import_method,
246+ std::shared_ptr<PlatformAuthentication> const& platform_authentication);
247+ GBMPlatform(
248+ BypassOption bypass_option,
249+ BufferImportMethod import_method,
250+ std::shared_ptr<mir::udev::Context> const& udev,
251+ std::shared_ptr<helpers::DRMHelper> const& drm);
252+
253+ UniqueModulePtr<GraphicBufferAllocator> create_buffer_allocator() override;
254+ UniqueModulePtr<PlatformIpcOperations> make_ipc_operations() const override;
255+ NativeRenderingPlatform* native_rendering_platform() override;
256+ MirServerEGLNativeDisplayType egl_native_display() const override;
257+private:
258+ BypassOption const bypass_option;
259+ BufferImportMethod const import_method;
260+ std::shared_ptr<graphics::PlatformAuthentication> const platform_authentication;
261+ std::shared_ptr<mir::udev::Context> udev;
262+ std::shared_ptr<graphics::mesa::helpers::DRMHelper> drm;
263+ std::shared_ptr<helpers::GBMHelper> const gbm;
264+ std::shared_ptr<DRMAuthentication> const auth;
265+};
266+}
267+}
268+}
269+#endif /* MIR_GRAPHICS_MESA_GBM_PLATFORM_H_ */
270
271=== modified file 'src/platforms/mesa/server/kms/CMakeLists.txt'
272--- src/platforms/mesa/server/kms/CMakeLists.txt 2017-04-28 03:49:54 +0000
273+++ src/platforms/mesa/server/kms/CMakeLists.txt 2017-05-12 10:00:59 +0000
274@@ -33,7 +33,6 @@
275 page_flipper.h
276 kms_page_flipper.cpp
277 linux_virtual_terminal.cpp
278- nested_authentication.cpp
279 platform.cpp
280 kms_display_configuration.h
281 real_kms_display_configuration.cpp
282
283=== modified file 'src/platforms/mesa/server/kms/guest_platform.cpp'
284--- src/platforms/mesa/server/kms/guest_platform.cpp 2017-04-28 03:49:54 +0000
285+++ src/platforms/mesa/server/kms/guest_platform.cpp 2017-05-12 10:00:59 +0000
286@@ -53,42 +53,52 @@
287 else
288 BOOST_THROW_EXCEPTION(std::runtime_error("Nested Mir failed to set the gbm device."));
289 }
290-
291-struct AuthenticationWrapper : mg::NativeDisplayPlatform,
292- mg::PlatformAuthentication
293-{
294- AuthenticationWrapper(std::shared_ptr<PlatformAuthentication> const& auth) :
295- auth(auth)
296- {
297- }
298-
299- mir::optional_value<std::shared_ptr<mg::MesaAuthExtension>> auth_extension() override
300- {
301- return auth->auth_extension();
302- }
303-
304- mir::optional_value<std::shared_ptr<mg::SetGbmExtension>> set_gbm_extension() override
305- {
306- return auth->set_gbm_extension();
307- }
308-
309- mg::PlatformOperationMessage platform_operation(
310- unsigned int op, mg::PlatformOperationMessage const& msg) override
311- {
312- return auth->platform_operation(op, msg);
313- }
314- mir::optional_value<mir::Fd> drm_fd() override
315- {
316- return auth->drm_fd();
317- }
318- std::shared_ptr<mg::PlatformAuthentication> const auth;
319-};
320+}
321+
322+mgm::GuestPlatform::NestedAuthFactory::NestedAuthFactory(
323+ std::shared_ptr<mg::PlatformAuthentication> const& auth) :
324+ auth(auth)
325+{
326+}
327+
328+mir::UniqueModulePtr<mg::PlatformAuthentication>
329+mgm::GuestPlatform::NestedAuthFactory::create_platform_authentication()
330+{
331+ struct AuthenticationWrapper : mg::PlatformAuthentication
332+ {
333+ AuthenticationWrapper(std::shared_ptr<PlatformAuthentication> const& auth) :
334+ auth(auth)
335+ {
336+ }
337+
338+ mir::optional_value<std::shared_ptr<mg::MesaAuthExtension>> auth_extension() override
339+ {
340+ return auth->auth_extension();
341+ }
342+
343+ mir::optional_value<std::shared_ptr<mg::SetGbmExtension>> set_gbm_extension() override
344+ {
345+ return auth->set_gbm_extension();
346+ }
347+
348+ mg::PlatformOperationMessage platform_operation(
349+ unsigned int op, mg::PlatformOperationMessage const& msg) override
350+ {
351+ return auth->platform_operation(op, msg);
352+ }
353+ mir::optional_value<mir::Fd> drm_fd() override
354+ {
355+ return auth->drm_fd();
356+ }
357+ std::shared_ptr<mg::PlatformAuthentication> const auth;
358+ };
359+ return make_module_ptr<AuthenticationWrapper>(auth);
360 }
361
362 mgm::GuestPlatform::GuestPlatform(
363 std::shared_ptr<mg::PlatformAuthentication> const& platform_authentication) :
364 platform_authentication{platform_authentication},
365- auth(std::make_shared<AuthenticationWrapper>(platform_authentication))
366+ auth_factory{platform_authentication}
367 {
368 auto ext = platform_authentication->auth_extension();
369 if (!ext.is_set())
370@@ -117,7 +127,7 @@
371
372 mg::NativeDisplayPlatform* mgm::GuestPlatform::native_display_platform()
373 {
374- return auth.get();
375+ return &auth_factory;
376 }
377
378 mg::NativeRenderingPlatform* mgm::GuestPlatform::native_rendering_platform()
379@@ -125,7 +135,7 @@
380 return this;
381 }
382
383-EGLNativeDisplayType mgm::GuestPlatform::egl_native_display() const
384+MirEGLNativeDisplayType mgm::GuestPlatform::egl_native_display() const
385 {
386 return gbm.device;
387 }
388
389=== modified file 'src/platforms/mesa/server/kms/guest_platform.h'
390--- src/platforms/mesa/server/kms/guest_platform.h 2017-04-28 03:49:54 +0000
391+++ src/platforms/mesa/server/kms/guest_platform.h 2017-05-12 10:00:59 +0000
392@@ -22,6 +22,7 @@
393 #define MIR_GRAPHICS_MESA_GUEST_PLATFORM_H_
394
395 #include "mir/graphics/platform.h"
396+#include "mir/graphics/platform_authentication.h"
397 #include "mir/graphics/platform_ipc_package.h"
398 #include "mir/renderer/gl/egl_platform.h"
399 #include "display_helpers.h"
400@@ -51,11 +52,18 @@
401 std::vector<ExtensionDescription> extensions() const override;
402
403 NativeRenderingPlatform* native_rendering_platform() override;
404- EGLNativeDisplayType egl_native_display() const override;
405+ MirServerEGLNativeDisplayType egl_native_display() const override;
406
407 private:
408 std::shared_ptr<graphics::PlatformAuthentication> const platform_authentication;
409- std::shared_ptr<graphics::NativeDisplayPlatform> auth;
410+
411+ struct NestedAuthFactory : graphics::NativeDisplayPlatform,
412+ graphics::PlatformAuthenticationFactory
413+ {
414+ NestedAuthFactory(std::shared_ptr<graphics::PlatformAuthentication> const&);
415+ UniqueModulePtr<graphics::PlatformAuthentication> create_platform_authentication() override;
416+ std::shared_ptr<graphics::PlatformAuthentication> const auth;
417+ } auth_factory;
418 helpers::GBMHelper gbm;
419 };
420 }
421
422=== modified file 'src/platforms/mesa/server/kms/platform.cpp'
423--- src/platforms/mesa/server/kms/platform.cpp 2017-04-28 03:49:54 +0000
424+++ src/platforms/mesa/server/kms/platform.cpp 2017-05-12 10:00:59 +0000
425@@ -26,6 +26,7 @@
426 #include "mir/graphics/platform_operation_message.h"
427 #include "mir/graphics/platform_authentication.h"
428 #include "mir/graphics/native_buffer.h"
429+#include "mir/graphics/platform_authentication.h"
430 #include "mir/emergency_cleanup_registry.h"
431 #include "mir/udev/wrapper.h"
432 #include "mesa_extensions.h"
433@@ -83,7 +84,7 @@
434 }
435 }));
436
437- native_platform = std::make_unique<mgm::DRMNativePlatform>(*drm.front());
438+ auth_factory = std::make_unique<DRMNativePlatformAuthFactory>(*drm.front());
439 }
440
441 mir::UniqueModulePtr<mg::GraphicBufferAllocator> mgm::Platform::create_buffer_allocator()
442@@ -106,7 +107,7 @@
443
444 mg::NativeDisplayPlatform* mgm::Platform::native_display_platform()
445 {
446- return native_platform.get();
447+ return auth_factory.get();
448 }
449
450 mir::UniqueModulePtr<mg::PlatformIpcOperations> mgm::Platform::make_ipc_operations() const
451@@ -119,7 +120,7 @@
452 return this;
453 }
454
455-EGLNativeDisplayType mgm::Platform::egl_native_display() const
456+MirServerEGLNativeDisplayType mgm::Platform::egl_native_display() const
457 {
458 return gbm->device;
459 }
460
461=== modified file 'src/platforms/mesa/server/kms/platform.h'
462--- src/platforms/mesa/server/kms/platform.h 2017-04-28 03:49:54 +0000
463+++ src/platforms/mesa/server/kms/platform.h 2017-05-12 10:00:59 +0000
464@@ -56,7 +56,7 @@
465 UniqueModulePtr<PlatformIpcOperations> make_ipc_operations() const override;
466
467 NativeRenderingPlatform* native_rendering_platform() override;
468- EGLNativeDisplayType egl_native_display() const override;
469+ MirServerEGLNativeDisplayType egl_native_display() const override;
470
471 std::shared_ptr<mir::udev::Context> udev;
472 std::vector<std::shared_ptr<helpers::DRMHelper>> const drm;
473@@ -68,7 +68,7 @@
474 BypassOption bypass_option() const;
475 private:
476 BypassOption const bypass_option_;
477- std::unique_ptr<DRMNativePlatform> native_platform;
478+ std::unique_ptr<DRMNativePlatformAuthFactory> auth_factory;
479 };
480
481 }
482
483=== modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp'
484--- src/platforms/mesa/server/kms/platform_symbols.cpp 2017-04-28 03:49:54 +0000
485+++ src/platforms/mesa/server/kms/platform_symbols.cpp 2017-05-12 10:00:59 +0000
486@@ -17,6 +17,7 @@
487 */
488
489 #include "platform.h"
490+#include "gbm_platform.h"
491 #include "guest_platform.h"
492 #include "linux_virtual_terminal.h"
493 #include "mir/options/program_option.h"
494@@ -251,3 +252,40 @@
495 mir::assert_entry_point_signature<mg::CreateGuestPlatform>(&create_guest_platform);
496 return mir::make_module_ptr<mgm::GuestPlatform>(platform_authentication);
497 }
498+
499+mir::UniqueModulePtr<mir::graphics::DisplayPlatform> create_display_platform(
500+ std::shared_ptr<mo::Option> const& options,
501+ std::shared_ptr<mir::EmergencyCleanupRegistry> const& emergency_cleanup_registry,
502+ std::shared_ptr<mg::DisplayReport> const& report,
503+ std::shared_ptr<mir::logging::Logger> const&)
504+{
505+ mir::assert_entry_point_signature<mg::CreateDisplayPlatform>(&create_display_platform);
506+ // ensure mesa finds the mesa mir-platform symbols
507+ auto real_fops = std::make_shared<RealVTFileOperations>();
508+ auto real_pops = std::unique_ptr<RealPosixProcessOperations>(new RealPosixProcessOperations{});
509+ auto vt = std::make_shared<mgm::LinuxVirtualTerminal>(
510+ real_fops,
511+ std::move(real_pops),
512+ options->get<int>(vt_option_name),
513+ report);
514+
515+ auto bypass_option = mgm::BypassOption::allowed;
516+ if (!options->get<bool>(bypass_option_name))
517+ bypass_option = mgm::BypassOption::prohibited;
518+
519+ return mir::make_module_ptr<mgm::Platform>(
520+ report, vt, *emergency_cleanup_registry, bypass_option);
521+}
522+
523+mir::UniqueModulePtr<mir::graphics::RenderingPlatform> create_rendering_platform(
524+ std::shared_ptr<mir::options::Option> const& options,
525+ std::shared_ptr<mir::graphics::PlatformAuthentication> const& platform_authentication)
526+{
527+ mir::assert_entry_point_signature<mg::CreateRenderingPlatform>(&create_rendering_platform);
528+
529+ auto bypass_option = mgm::BypassOption::allowed;
530+ if (!options->get<bool>(bypass_option_name))
531+ bypass_option = mgm::BypassOption::prohibited;
532+ return mir::make_module_ptr<mgm::GBMPlatform>(
533+ bypass_option, mgm::BufferImportMethod::gbm_native_pixmap, platform_authentication);
534+}
535
536=== renamed file 'src/platforms/mesa/server/kms/nested_authentication.cpp' => 'src/platforms/mesa/server/nested_authentication.cpp'
537--- src/platforms/mesa/server/kms/nested_authentication.cpp 2017-04-28 03:49:54 +0000
538+++ src/platforms/mesa/server/nested_authentication.cpp 2017-05-12 10:00:59 +0000
539@@ -21,7 +21,6 @@
540 #include "nested_authentication.h"
541
542 #include "mir_toolkit/mesa/platform_operation.h"
543-#include "mir_toolkit/extensions/mesa_drm_auth.h"
544
545 #include <boost/exception/errinfo_errno.hpp>
546 #include <boost/throw_exception.hpp>
547
548=== renamed file 'src/platforms/mesa/server/kms/nested_authentication.h' => 'src/platforms/mesa/server/nested_authentication.h'
549=== modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp'
550--- src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-04-28 03:49:54 +0000
551+++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2017-05-12 10:00:59 +0000
552@@ -19,6 +19,8 @@
553 #include "mir/graphics/display_report.h"
554 #include "mir/options/option.h"
555 #include "platform.h"
556+#include "gbm_platform.h"
557+#include "platform_common.h"
558 #include "guest_platform.h"
559 #include "../X11_resources.h"
560 #include "mir/module_deleter.h"
561@@ -29,6 +31,7 @@
562
563 namespace mo = mir::options;
564 namespace mg = mir::graphics;
565+namespace mgm = mir::graphics::mesa;
566 namespace mx = mir::X;
567 namespace mgx = mg::X;
568 namespace geom = mir::geometry;
569@@ -56,11 +59,12 @@
570 BOOST_THROW_EXCEPTION(std::runtime_error("Malformed display size option"));
571
572 return mir::make_module_ptr<mgx::Platform>(
573- x11_resources.get_conn(),
574- geom::Size{std::stoi(display_dims_str.substr(0, pos)),
575- std::stoi(display_dims_str.substr(pos+1, display_dims_str.find(':')))},
576- report
577- );
578+ x11_resources.get_conn(),
579+ geom::Size{
580+ std::stoi(display_dims_str.substr(0, pos)),
581+ std::stoi(display_dims_str.substr(pos+1, display_dims_str.find(':')))},
582+ report
583+ );
584 }
585
586 mir::UniqueModulePtr<mg::Platform> create_guest_platform(
587@@ -117,3 +121,39 @@
588 mir::assert_entry_point_signature<mg::DescribeModule>(&describe_graphics_module);
589 return &description;
590 }
591+
592+mir::UniqueModulePtr<mir::graphics::DisplayPlatform> create_display_platform(
593+ std::shared_ptr<mo::Option> const& options,
594+ std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
595+ std::shared_ptr<mg::DisplayReport> const& report,
596+ std::shared_ptr<mir::logging::Logger> const&)
597+{
598+ mir::assert_entry_point_signature<mg::CreateDisplayPlatform>(&create_display_platform);
599+
600+ if (!x11_resources.get_conn())
601+ BOOST_THROW_EXCEPTION(std::runtime_error("Need valid x11 display"));
602+
603+ auto display_dims_str = options->get<std::string>(x11_displays_option_name);
604+ auto pos = display_dims_str.find('x');
605+ if (pos == std::string::npos)
606+ BOOST_THROW_EXCEPTION(std::runtime_error("Malformed display size option"));
607+
608+ return mir::make_module_ptr<mgx::Platform>(
609+ x11_resources.get_conn(),
610+ geom::Size{std::stoi(display_dims_str.substr(0, pos)),
611+ std::stoi(display_dims_str.substr(pos+1, display_dims_str.find(':')))},
612+ report
613+ );
614+}
615+
616+mir::UniqueModulePtr<mir::graphics::RenderingPlatform> create_rendering_platform(
617+ std::shared_ptr<mir::options::Option> const&,
618+ std::shared_ptr<mir::graphics::PlatformAuthentication> const&)
619+{
620+ mir::assert_entry_point_signature<mg::CreateRenderingPlatform>(&create_rendering_platform);
621+ auto udev = std::make_shared<mir::udev::Context>();
622+ auto drm = std::make_shared<mgm::helpers::DRMHelper>(mgm::helpers::DRMNodeToUse::render);
623+ drm->setup(udev);
624+ return mir::make_module_ptr<mgm::GBMPlatform>(
625+ mgm::BypassOption::prohibited, mgm::BufferImportMethod::dma_buf, udev, drm);
626+}
627
628=== modified file 'src/platforms/mesa/server/x11/graphics/guest_platform.cpp'
629--- src/platforms/mesa/server/x11/graphics/guest_platform.cpp 2017-04-28 03:49:54 +0000
630+++ src/platforms/mesa/server/x11/graphics/guest_platform.cpp 2017-05-12 10:00:59 +0000
631@@ -35,7 +35,7 @@
632 {
633 drm->setup(udev);
634 gbm.setup(*drm);
635- native_platform = std::make_unique<mgm::DRMNativePlatform>(*drm);
636+ auth_factory = std::make_unique<mgm::DRMNativePlatformAuthFactory>(*drm);
637 }
638
639 mir::UniqueModulePtr<mg::GraphicBufferAllocator> mgx::GuestPlatform::create_buffer_allocator()
640@@ -60,7 +60,7 @@
641
642 mg::NativeDisplayPlatform* mgx::GuestPlatform::native_display_platform()
643 {
644- return native_platform.get();
645+ return auth_factory.get();
646 }
647
648 mg::NativeRenderingPlatform* mgx::GuestPlatform::native_rendering_platform()
649@@ -68,7 +68,7 @@
650 return this;
651 }
652
653-EGLNativeDisplayType mgx::GuestPlatform::egl_native_display() const
654+MirServerEGLNativeDisplayType mgx::GuestPlatform::egl_native_display() const
655 {
656 return gbm.device;
657 }
658
659=== modified file 'src/platforms/mesa/server/x11/graphics/guest_platform.h'
660--- src/platforms/mesa/server/x11/graphics/guest_platform.h 2017-04-28 03:49:54 +0000
661+++ src/platforms/mesa/server/x11/graphics/guest_platform.h 2017-05-12 10:00:59 +0000
662@@ -50,13 +50,13 @@
663 std::vector<ExtensionDescription> extensions() const override;
664
665 NativeRenderingPlatform* native_rendering_platform() override;
666- EGLNativeDisplayType egl_native_display() const override;
667+ MirServerEGLNativeDisplayType egl_native_display() const override;
668
669 private:
670 std::shared_ptr<mir::udev::Context> udev;
671 std::shared_ptr<graphics::mesa::helpers::DRMHelper> const drm;
672 graphics::mesa::helpers::GBMHelper gbm;
673- std::unique_ptr<graphics::mesa::DRMNativePlatform> native_platform;
674+ std::unique_ptr<mesa::DRMNativePlatformAuthFactory> auth_factory;
675 };
676
677 }
678
679=== modified file 'src/platforms/mesa/server/x11/graphics/platform.cpp'
680--- src/platforms/mesa/server/x11/graphics/platform.cpp 2017-04-28 03:49:54 +0000
681+++ src/platforms/mesa/server/x11/graphics/platform.cpp 2017-05-12 10:00:59 +0000
682@@ -41,7 +41,7 @@
683
684 drm->setup(udev);
685 gbm.setup(*drm);
686- native_platform = std::make_unique<mgm::DRMNativePlatform>(*drm);
687+ auth_factory = std::make_unique<mgm::DRMNativePlatformAuthFactory>(*drm);
688 }
689
690 mir::UniqueModulePtr<mg::GraphicBufferAllocator> mgx::Platform::create_buffer_allocator()
691@@ -59,7 +59,7 @@
692
693 mg::NativeDisplayPlatform* mgx::Platform::native_display_platform()
694 {
695- return native_platform.get();
696+ return auth_factory.get();
697 }
698
699 mir::UniqueModulePtr<mg::PlatformIpcOperations> mgx::Platform::make_ipc_operations() const
700
701=== modified file 'src/platforms/mesa/server/x11/graphics/platform.h'
702--- src/platforms/mesa/server/x11/graphics/platform.h 2017-04-28 03:49:54 +0000
703+++ src/platforms/mesa/server/x11/graphics/platform.h 2017-05-12 10:00:59 +0000
704@@ -66,7 +66,7 @@
705 std::shared_ptr<DisplayReport> const report;
706 mesa::helpers::GBMHelper gbm;
707 mir::geometry::Size const size;
708- std::unique_ptr<mesa::DRMNativePlatform> native_platform;
709+ std::unique_ptr<mesa::DRMNativePlatformAuthFactory> auth_factory;
710 };
711
712 }
713
714=== modified file 'src/server/graphics/nested/platform.h'
715--- src/server/graphics/nested/platform.h 2017-04-28 03:49:54 +0000
716+++ src/server/graphics/nested/platform.h 2017-05-12 10:00:59 +0000
717@@ -54,7 +54,7 @@
718 NativeDisplayPlatform* native_display_platform() override;
719 UniqueModulePtr<PlatformIpcOperations> make_ipc_operations() const override;
720 NativeRenderingPlatform* native_rendering_platform() override;
721- EGLNativeDisplayType egl_native_display() const override;
722+ MirServerEGLNativeDisplayType egl_native_display() const override;
723 std::vector<mir::ExtensionDescription> extensions() const override;
724 private:
725 std::shared_ptr<mir::SharedLibrary> const library;
726
727=== modified file 'tests/unit-tests/platforms/mesa/kms/test_nested_authentication.cpp'
728--- tests/unit-tests/platforms/mesa/kms/test_nested_authentication.cpp 2017-04-28 03:49:54 +0000
729+++ tests/unit-tests/platforms/mesa/kms/test_nested_authentication.cpp 2017-05-12 10:00:59 +0000
730@@ -18,7 +18,7 @@
731
732 #include "mir/graphics/platform_authentication.h"
733 #include "mir/graphics/platform_operation_message.h"
734-#include "src/platforms/mesa/server/kms/nested_authentication.h"
735+#include "src/platforms/mesa/server/nested_authentication.h"
736 #include "mir_toolkit/mesa/platform_operation.h"
737 #include "mir/test/doubles/mock_drm.h"
738 #include "mir/test/doubles/mock_platform_authentication.h"

Subscribers

People subscribed via source and target branches