1
0
Fork 0
Commit graph

69 commits

Author SHA1 Message Date
Jonas Ådahl
615587cd06 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.

https://bugzilla.gnome.org/show_bug.cgi?id=779745
2017-03-09 10:17:30 +08:00
Jonas Ådahl
df068a3649 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.

https://bugzilla.gnome.org/show_bug.cgi?id=779745
2017-03-09 10:17:30 +08:00
Jonas Ådahl
e8197e8e05 monitor-config-manager: Add underscanning to MetaMonitorConfig
Set the underscanning state via the monitor config struct so that it
can be configured.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
1ad386bc28 Introduce MetaMonitorConfigStore
MetaMonitorConfigStore provides an XML storage mechanism for
MetaMonitorConfigManager. It stores configuration files defined in the
same level as the MetaMonitorsConfig format, i.e. refers to high level
"monitors" and "monitor modes" instead of connectors and CRTCs.

Only reading custom files are implemented and so far unused.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
f607b03456 monitor: Add API to query suggested position
Adds an API to get the position suggested by the backend. This
translates to position advertised by some VM:s, used to hint at a
position making the position more natural (i.e. placed similarly to how
it may be placed on the host desktop).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
644ee666f6 Introduce new monitor configuration system
The new monitor configuration system (MetaMonitorConfigManager) aims to
replace the current MetaMonitorConfig. The main difference between the
two is that MetaMonitorConfigManager works with higher level input
(MetaMonitor, MetaMonitorMode) instead of directly looking at the CRTC
and connector state. It still produces CRTC and connector configuration
later applied by the respective backends.

Other difference the new system aims to introduce is that the
configuration system doesn't manipulate the monitor manager state; that
responsibility is left for the monitor manager to handle (it only
manages configuration and creates CRTC/connector assignments, it
doesn't apply anything).

The new configuration system allows backends to not rely on deriving the
current configuration from the CRTC/connector state, as this may no longer be
possible (i.e. when using KMS and multiple framebuffers).

The MetaMonitorConfigManager system is so far disabled by default, as
it does not yet have all the features of the old system, but eventually
it will replace MetaMonitorConfig which will at that point be removed.
This will make it possible to remove old hacks introduced due to
limitations in the old system.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
9ceeddd952 monitor: Track current monitor mode
Track what monitor mode is the current. This is derived from the mode
of the corresponding CRTC's.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
e1849ccbfa monitor: Add getter for vendor and serial
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
6262b46928 wayland/output: Pass 'unknown' subpixel order when mismatch
When a logical monitor constains monitors with different subpixel
ordering, make the wl_output have the subpixel order 'unknown' so that
clients don't make assumptions given only a subset of the monitors of
the given region.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
4c1b48d0cc monitor: Add API to get monitor mode from spec
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
be13d0f8ee monitor: Allow monitor mode foreach crtc iterator failable
Allow the function used to iterate over the CRTC modes of a monitor
mode to fail, causing the iteration to fail as well.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
0177ab45af MetaMonitor: Add _is_laptop_panel() helper
Add a helper to determine whether the monitor is the laptop panel or
not. To be used by the configuration system.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
bc951557e8 monitor: Add monitor spec object
A monitor spec object is meant to be used to identify a certain monitor
on a certain output. The spec is unique per actual monitor and connector,
meaning that a monitor that changes from one connector from another
(e.g. HDMI1 to HDMI2) will not be identified as the same. It is meant
to associate for example a configuration entry with an actual monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
2c32d94e1d monitor: Determine preferred monitor mode
Determine the preferred monitor mode given what the preferred CRTC mode
is, and expose it via the API.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
5d9e2d8d2e MetaMonitor: Add mode spec concept
Add a "mode spec" concept, meaning to be used as a identifier for an
actual monitor mode. It consists of details making a mode unique, i.e.
the total resolution and refresh rate. This will later be used to get
the actual monitor mode (set of one or more CRTC modes).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
a6f464a600 monitor: Add monitor modes abstraction
Add "monitor modes" abstracting the modes set on a monitor. On normal
monitors, this directly maps to the CRTC modes, but on tiled monitors,
a monitor mode can consist modes per tiled output.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
78799e58d2 monitor-manager: Make tiled Xrandr monitors based on monitors
Don't deal with adding/removing tiled Xrandr monitors in the generic
backend, but leave it to the Xrandr backend. The tiled monitor will
itself notify the backend when such a monitor is added and removed.

Tiled Xrandr monitors are now based no MetaMonitor instead of
MetaLogicalMonitor. This means that mirrored tiled monitors will now be
represented correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
bf8b4e9927 monitor-manager: Generate logical monitors from monitors
Instead of using crtcs and outputs to generate logical monitors, use
the ready made monitor abstraction that hides irrelevant things such as
monitor tiling etc.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
d9a0f2a88d monitor-manager: Generate a monitor abstraction from outputs and crtcs
Generate a set of "monitors" abstracting the physical concepts. Each
monitor is built up of one or more outputs; multiple outputs being
tiled monitors. Logical monitors will later be built from these.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00