monitor-manager: Take drm-connector panel-orientation property into account
Some x86 clamshell design devices use portrait tablet LCD panels while they should use a landscape panel, resoluting in a 90 degree rotated picture. Newer kernels detect this and rotate the fb console in software to compensate. These kernels also export their knowledge of the LCD panel orientation vs the casing in a "panel orientation" drm_connector property. This commit adds support to mutter for reading the "panel orientation" and transparently (from a mutter consumer's pov) fixing this by applying a (hidden) rotation transform to compensate for the panel orientation. Related: https://bugs.freedesktop.org/show_bug.cgi?id=94894 https://bugzilla.gnome.org/show_bug.cgi?id=782294
This commit is contained in:

committed by
Jonas Ådahl

parent
2b3040d04f
commit
7917b083cb
@ -2342,8 +2342,12 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaMonitor *main_monitor;
|
||||
MetaOutput *main_output;
|
||||
MetaMonitorTransform crtc_transform;
|
||||
main_monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
||||
main_output = meta_monitor_get_main_output (main_monitor);
|
||||
crtc_transform =
|
||||
meta_monitor_logical_to_crtc_transform (main_monitor,
|
||||
logical_monitor->transform);
|
||||
|
||||
/*
|
||||
* Pick any monitor and output and check; all CRTCs of a logical monitor will
|
||||
@ -2352,10 +2356,10 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
||||
|
||||
if (meta_monitor_manager_is_transform_handled (monitor_manager,
|
||||
main_output->crtc,
|
||||
logical_monitor->transform))
|
||||
crtc_transform))
|
||||
return META_MONITOR_TRANSFORM_NORMAL;
|
||||
else
|
||||
return logical_monitor->transform;
|
||||
return crtc_transform;
|
||||
}
|
||||
|
||||
static MetaRendererView *
|
||||
|
Reference in New Issue
Block a user