GNOME Bugzilla – Bug 779745
Relevant patches from wip/monitor-config
Last modified: 2017-03-09 02:22:52 UTC
wip/monitor-config[0] will not land for 3.24, but there are some things there that can be usefyl still. These include: Make run-test work again: 86b1dd4 tests: Make test backend inherit MetaBackendX11Nested Various bug fixes and changes needed: 3fde521 logical-monitor: Don't set the CRTC logical monitor if not assigned c640c94 monitor-tiled: Generate non-tiled monitor modes 97c2332 monitor-manager: Split logical monitor creation fed854e monitor-tiled: Derive the dimension from what was configured A couple of tablet input settings fixes: 9e483d4 input-settings: Don't use screen limits when keeping aspect ratio 9eedc8e input-settings: Use logical monitors instead of outputs Add features to the dummy backend, meant to make it possible to test monitor configuration without having the actual hardware. By starting mutter nested inside a nested D-Bus session it's possible to configure the dummy backend with GNOME Control Center. With these patches it's now possible to * change resolution (it advertises 1024x786 and 800x600) * emulate tiled monitors * emulate a GPU which doesn't support rotation (i.e. trigger offscreen path) d81e9e5 monitor-manager-dummy: Don't set up state at the wrong time 11616a2 clutter/stage-view: Add getter for getting the offscreen blit transform 86f0d90 monitor-manager-dummy: Refactor monitor generation 6dffe4c monitor-manager-dummy: Add non-preferred mode a97bc91 monitor-manager-dummy: Add way to emulate tiled monitors 11c84e6 monitor-manager: Expose whether the backend handles a transform 2039cde backend/x11/nested: Enable emulating offscreen transform framebuffer
Created attachment 347450 [details] [review] tests: Make test backend inherit MetaBackendX11Nested The test backend must inherit the nested backend, as MetaBackendX11 is not complete.
Created attachment 347451 [details] [review] monitor-manager-dummy: Don't set up state at the wrong time Don't set the CRTC rect and screen size at in read_current(), as those depends on how the configuration is done. Instead, don't set the CRTC rect at all, and update the screen dimensions when being configured.
Created attachment 347452 [details] [review] logical-monitor: Don't set the CRTC logical monitor if not assigned When adding a monitor and all its outputs, don't try to set the logical monitor of the outputs CRTC if none was assigned. This might happen if a tiled monitor only uses a subset of the connectors it are connected via.
Created attachment 347453 [details] [review] monitor-tiled: Generate non-tiled monitor modes Add support for non-tiled monitor modes on tiled monitors. This is done by adding all the other supported modes, except the modes with the same resolution as the tile dimensions.
Created attachment 347454 [details] [review] monitor-manager: Split logical monitor creation Split up logical monitor cration into derived (when derived from current underlying configuration) and non-derived (when creating from a logical monitor configuration). This avoids that type of logic in the logical monitor creation function.
Created attachment 347455 [details] [review] clutter/stage-view: Add getter for getting the offscreen blit transform This will be used to invert the transform in the nested mode, making it possible to test offscreen texture based transform using the nested backend.
Created attachment 347456 [details] [review] monitor-manager-dummy: Refactor monitor generation Refactor monitor generation by splitting the generation of modes, CRTCs and outputs into a separate function. A side effect is that each output will have its own set of possible modes.
Created attachment 347457 [details] [review] monitor-manager-dummy: Add non-preferred mode Add an extra mode besides the preferred one. This makes it possible to test monitor configuration paths when running nested.
Created attachment 347458 [details] [review] monitor-manager-dummy: Add way to emulate tiled monitors By setting the environment variable MUTTER_DEBUG_TILED_DUMMY_MONITORS to "1", the dummy MetaMonitorManager backend used when running mutter nested will create tiled monitors instead of single-output/CRTC monitors. This makes it possible to test tiled monitor configuration.
Created attachment 347459 [details] [review] monitor-tiled: Derive the dimension from what was configured Previously, the size of the logical monitor was derived directly from the tiling information. This works fine until we add transformations, or set modes with a dimension different from the resulting resolution when tiled. Fix this by traversing the assigned CRTC rects, as these are already transformed by the configuration system.
Created attachment 347460 [details] [review] monitor-manager: Expose whether the backend handles a transform Expose via a new API whether the transform on a logical monitor is handled by the backend. This was previously only exposed only in the native backend. This will be used to emulate not supporting transforms in the backend in the nested backend.
Created attachment 347461 [details] [review] backend/x11/nested: Enable emulating offscreen transform framebuffer Enable the usage of an offscreen transform texture, as used in the native backend when the GPU doesn't support the transform configured.
Created attachment 347462 [details] [review] input-settings: Don't use screen limits when keeping aspect ratio When no output was specified, the screen limit was used to calculate the aspect ratio. The screen limit, however, is either just an arbitrary number if no screen limit is applicable, or a hardware graphics buffer limit, which has nothing to do with anything actually displayed. Change it to use the screen size instead, to get something that makes more sense when no output is found.
Created attachment 347463 [details] [review] input-settings: Use logical monitors instead of outputs A MetaOutput is a connector, not exactly a monitor or a region on the stage; for example tiled monitors are split up into multiple outputs, and for what is used in input settings, that makes no sense. Change this to use logical monitors instead of outputs.
Review of attachment 347463 [details] [review]: lgtm
Review of attachment 347462 [details] [review]: right
Review of attachment 347461 [details] [review]: seems fine
Review of attachment 347460 [details] [review]: looks fine
Review of attachment 347459 [details] [review]: right
Review of attachment 347458 [details] [review]: lgtm
Review of attachment 347457 [details] [review]: ++
Review of attachment 347456 [details] [review]: ok
Review of attachment 347455 [details] [review]: sure
Review of attachment 347454 [details] [review]: seems good
Review of attachment 347453 [details] [review]: looks fine
Review of attachment 347452 [details] [review]: yep
Review of attachment 347451 [details] [review]: ok
Review of attachment 347450 [details] [review]: ++
Attachment 347450 [details] pushed as e20e607 - tests: Make test backend inherit MetaBackendX11Nested Attachment 347451 [details] pushed as 979bc43 - monitor-manager-dummy: Don't set up state at the wrong time Attachment 347452 [details] pushed as 7967cee - logical-monitor: Don't set the CRTC logical monitor if not assigned Attachment 347453 [details] pushed as df068a3 - monitor-tiled: Generate non-tiled monitor modes Attachment 347454 [details] pushed as 615587c - monitor-manager: Split logical monitor creation Attachment 347455 [details] pushed as c5dc0f4 - clutter/stage-view: Add getter for getting the offscreen blit transform Attachment 347456 [details] pushed as 8f2daed - monitor-manager-dummy: Refactor monitor generation Attachment 347457 [details] pushed as 3ace913 - monitor-manager-dummy: Add non-preferred mode Attachment 347458 [details] pushed as 4f386e5 - monitor-manager-dummy: Add way to emulate tiled monitors Attachment 347459 [details] pushed as 4cfcd4b - monitor-tiled: Derive the dimension from what was configured Attachment 347460 [details] pushed as 944339f - monitor-manager: Expose whether the backend handles a transform Attachment 347461 [details] pushed as 1039386 - backend/x11/nested: Enable emulating offscreen transform framebuffer Attachment 347462 [details] pushed as a48c9d6 - input-settings: Don't use screen limits when keeping aspect ratio Attachment 347463 [details] pushed as cdedd01 - input-settings: Use logical monitors instead of outputs