Mir

Merge lp://qastaging/~kdub/mir/n10-support into lp://qastaging/mir

Proposed by Kevin DuBois
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 1228
Proposed branch: lp://qastaging/~kdub/mir/n10-support
Merge into: lp://qastaging/mir
Diff against target: 2330 lines (+686/-615)
36 files modified
include/shared/mir/graphics/android/mir_native_window.h (+1/-0)
include/test/mir_test_doubles/mock_display_device.h (+1/-2)
include/test/mir_test_doubles/mock_framebuffer_bundle.h (+50/-0)
include/test/mir_test_doubles/mock_hwc_composer_device_1.h (+20/-4)
include/test/mir_test_doubles/stub_display_device.h (+4/-2)
src/server/graphics/android/CMakeLists.txt (+1/-1)
src/server/graphics/android/android_buffer_allocator.cpp (+1/-1)
src/server/graphics/android/android_graphic_buffer_allocator.h (+1/-1)
src/server/graphics/android/display_device.h (+4/-3)
src/server/graphics/android/fb_device.cpp (+18/-13)
src/server/graphics/android/fb_device.h (+5/-1)
src/server/graphics/android/framebuffer_bundle.h (+16/-11)
src/server/graphics/android/framebuffers.cpp (+116/-10)
src/server/graphics/android/framebuffers.h (+18/-13)
src/server/graphics/android/graphic_buffer_allocator.h (+1/-1)
src/server/graphics/android/hwc10_device.cpp (+6/-12)
src/server/graphics/android/hwc10_device.h (+6/-4)
src/server/graphics/android/hwc11_device.cpp (+27/-81)
src/server/graphics/android/hwc11_device.h (+8/-5)
src/server/graphics/android/hwc_layerlist.cpp (+8/-0)
src/server/graphics/android/hwc_layerlist.h (+3/-0)
src/server/graphics/android/resource_factory.cpp (+8/-14)
src/server/graphics/android/server_render_window.cpp (+6/-10)
src/server/graphics/android/server_render_window.h (+1/-4)
src/shared/graphics/android/mir_native_window.cpp (+9/-3)
tests/integration-tests/client/test_client_render.cpp (+4/-4)
tests/integration-tests/graphics/android/test_display_integration.cpp (+7/-0)
tests/unit-tests/client/android/test_android_native_window.cpp (+7/-3)
tests/unit-tests/graphics/android/test_fb_device.cpp (+31/-59)
tests/unit-tests/graphics/android/test_fb_simple_swapper.cpp (+179/-106)
tests/unit-tests/graphics/android/test_hwc10_device.cpp (+17/-15)
tests/unit-tests/graphics/android/test_hwc11_device.cpp (+62/-166)
tests/unit-tests/graphics/android/test_hwc_device.cpp (+2/-2)
tests/unit-tests/graphics/android/test_hwc_layerlist.cpp (+24/-3)
tests/unit-tests/graphics/android/test_resource_factory.cpp (+2/-33)
tests/unit-tests/graphics/android/test_server_interpreter.cpp (+12/-28)
To merge this branch: bzr merge lp://qastaging/~kdub/mir/n10-support
Reviewer Review Type Date Requested Status
Daniel van Vugt manual testing Approve
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Approve
Alan Griffiths Approve
Review via email: mp+195323@code.qastaging.launchpad.net

Commit message

graphics: android:
1) change hwc1.1 to make use of sync fences during the compositor's gl renderloop. Note that we no longer wait for the render to complete, we pass this responsibility to the driver and the kernel.

2) support nexus 10

Description of the change

graphics: android:
1) change hwc1.1 to make use of sync fences during the compositor's gl renderloop. Note that we no longer wait for the render to complete, we pass this responsibility to the driver and the kernel.

2) support nexus 10

The big change in this review is the management of the android framebuffers state tracking. Previously, we simply had the framebuffers be owned in the dubiously-named FBSimpleSwapper, which was owned by the EGLNativeWindowType. This caused some problems because we had the native window, the state tracker and the display poster all having to keep track of the buffer state.

Furthermore, buffer fences are passed from the GL driver right to the HWC, and then from the HWC right to the GL driver. We never have to wait in mir for the GL fences in the composition/post new frame loop. This lets the mir better parallelize the gpu and cpu without waiting as much.

The astute reviewer might note that mga::DisplayDevice has become quite a strange... All the implementations of mga::DisplayDevice take a mga::FramebufferBundle and simply passthrough the functions. I made note of this in line 199. My plan is to remove the four noted functions from mga::DisplayDevice at the same that I address the strange mga::DisplayBufferFactory class. After addressing all that, the mga::DisplayBuffer will own a mga::FramebuffeBundle, which it will use to manage the framebuffers, and it will also have a mga::DisplayDevice class that is solely in change of posting a buffer and turning on/off the display. (no more buffer tracking in DisplayDevice)

NB: i still haven't gotten the unity-mir stack tested on top of these changes on both the nexus 4 and nexus 10. The basic test programs look good though. Please don't land until we can get unity tested.

NB: this will let us drop the patches to hwc on the nexus 4 (that codepath is no longer hit)

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I don't understand all the detail but I'm happy with what I do follow.

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

> I don't understand all the detail but I'm happy with what I do follow.

Likewise.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's hard to judge the GL performance improvement as we're limited to vsync on Android. But confirmed software framerates are improved dramatically by this proposal. Bug 1252173 fixed!

I expect GL will benefit similarly.

review: Approve (manual testing)

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