After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779745 - Relevant patches from wip/monitor-config
Relevant patches from wip/monitor-config
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-08 09:15 UTC by Jonas Ådahl
Modified: 2017-03-09 02:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Make test backend inherit MetaBackendX11Nested (3.06 KB, patch)
2017-03-08 09:15 UTC, Jonas Ådahl
committed Details | Review
monitor-manager-dummy: Don't set up state at the wrong time (4.65 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
logical-monitor: Don't set the CRTC logical monitor if not assigned (1.18 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-tiled: Generate non-tiled monitor modes (6.98 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-manager: Split logical monitor creation (16.66 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
clutter/stage-view: Add getter for getting the offscreen blit transform (2.45 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-manager-dummy: Refactor monitor generation (6.64 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-manager-dummy: Add non-preferred mode (2.16 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-manager-dummy: Add way to emulate tiled monitors (5.71 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-tiled: Derive the dimension from what was configured (2.02 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
monitor-manager: Expose whether the backend handles a transform (13.98 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
backend/x11/nested: Enable emulating offscreen transform framebuffer (6.26 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
input-settings: Don't use screen limits when keeping aspect ratio (2.44 KB, patch)
2017-03-08 09:16 UTC, Jonas Ådahl
committed Details | Review
input-settings: Use logical monitors instead of outputs (19.34 KB, patch)
2017-03-08 09:17 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2017-03-08 09:15:53 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
Comment 1 Jonas Ådahl 2017-03-08 09:15:59 UTC
Created attachment 347450 [details] [review]
tests: Make test backend inherit MetaBackendX11Nested

The test backend must inherit the nested backend, as MetaBackendX11 is
not complete.
Comment 2 Jonas Ådahl 2017-03-08 09:16:03 UTC
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.
Comment 3 Jonas Ådahl 2017-03-08 09:16:08 UTC
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.
Comment 4 Jonas Ådahl 2017-03-08 09:16:13 UTC
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.
Comment 5 Jonas Ådahl 2017-03-08 09:16:17 UTC
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.
Comment 6 Jonas Ådahl 2017-03-08 09:16:22 UTC
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.
Comment 7 Jonas Ådahl 2017-03-08 09:16:27 UTC
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.
Comment 8 Jonas Ådahl 2017-03-08 09:16:32 UTC
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.
Comment 9 Jonas Ådahl 2017-03-08 09:16:37 UTC
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.
Comment 10 Jonas Ådahl 2017-03-08 09:16:42 UTC
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.
Comment 11 Jonas Ådahl 2017-03-08 09:16:47 UTC
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.
Comment 12 Jonas Ådahl 2017-03-08 09:16:52 UTC
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.
Comment 13 Jonas Ådahl 2017-03-08 09:16:57 UTC
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.
Comment 14 Jonas Ådahl 2017-03-08 09:17:02 UTC
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.
Comment 15 Rui Matos 2017-03-08 17:04:39 UTC
Review of attachment 347463 [details] [review]:

lgtm
Comment 16 Rui Matos 2017-03-08 17:04:42 UTC
Review of attachment 347462 [details] [review]:

right
Comment 17 Rui Matos 2017-03-08 17:04:44 UTC
Review of attachment 347461 [details] [review]:

seems fine
Comment 18 Rui Matos 2017-03-08 17:04:46 UTC
Review of attachment 347460 [details] [review]:

looks fine
Comment 19 Rui Matos 2017-03-08 17:04:50 UTC
Review of attachment 347459 [details] [review]:

right
Comment 20 Rui Matos 2017-03-08 17:04:51 UTC
Review of attachment 347458 [details] [review]:

lgtm
Comment 21 Rui Matos 2017-03-08 17:04:53 UTC
Review of attachment 347457 [details] [review]:

++
Comment 22 Rui Matos 2017-03-08 17:04:55 UTC
Review of attachment 347456 [details] [review]:

ok
Comment 23 Rui Matos 2017-03-08 17:04:55 UTC
Review of attachment 347456 [details] [review]:

ok
Comment 24 Rui Matos 2017-03-08 17:04:57 UTC
Review of attachment 347455 [details] [review]:

sure
Comment 25 Rui Matos 2017-03-08 17:04:59 UTC
Review of attachment 347454 [details] [review]:

seems good
Comment 26 Rui Matos 2017-03-08 17:05:01 UTC
Review of attachment 347453 [details] [review]:

looks fine
Comment 27 Rui Matos 2017-03-08 17:05:03 UTC
Review of attachment 347452 [details] [review]:

yep
Comment 28 Rui Matos 2017-03-08 17:05:05 UTC
Review of attachment 347451 [details] [review]:

ok
Comment 29 Rui Matos 2017-03-08 17:05:08 UTC
Review of attachment 347450 [details] [review]:

++
Comment 30 Jonas Ådahl 2017-03-09 02:21:53 UTC
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