Commit 43baf643 authored by Jonas Ådahl's avatar Jonas Ådahl
Browse files

monitor-config-manager: Only use crtc transform for assignment

The CRTC level transform (i.e. not necessarily the one set on the
hardware) is what is relevant for calculating the layout the CRTC will
have on the stage, so only use the one that can be handled by the
hardware for the CRTC assignment.

This makes the CRTC layout valid for tiled monitors.

!1199
parent 21b8ae10
...@@ -172,6 +172,7 @@ assign_monitor_crtc (MetaMonitor *monitor, ...@@ -172,6 +172,7 @@ assign_monitor_crtc (MetaMonitor *monitor,
MetaCrtc *crtc; MetaCrtc *crtc;
MetaMonitorTransform transform; MetaMonitorTransform transform;
MetaMonitorTransform crtc_transform; MetaMonitorTransform crtc_transform;
MetaMonitorTransform crtc_hw_transform;
int crtc_x, crtc_y; int crtc_x, crtc_y;
float x_offset, y_offset; float x_offset, y_offset;
float scale = 0.0; float scale = 0.0;
...@@ -200,10 +201,12 @@ assign_monitor_crtc (MetaMonitor *monitor, ...@@ -200,10 +201,12 @@ assign_monitor_crtc (MetaMonitor *monitor,
transform = data->logical_monitor_config->transform; transform = data->logical_monitor_config->transform;
crtc_transform = meta_monitor_logical_to_crtc_transform (monitor, transform); crtc_transform = meta_monitor_logical_to_crtc_transform (monitor, transform);
if (!meta_monitor_manager_is_transform_handled (data->monitor_manager, if (meta_monitor_manager_is_transform_handled (data->monitor_manager,
crtc, crtc,
crtc_transform)) crtc_transform))
crtc_transform = META_MONITOR_TRANSFORM_NORMAL; crtc_hw_transform = crtc_transform;
else
crtc_hw_transform = META_MONITOR_TRANSFORM_NORMAL;
meta_monitor_calculate_crtc_pos (monitor, mode, output, crtc_transform, meta_monitor_calculate_crtc_pos (monitor, mode, output, crtc_transform,
&crtc_x, &crtc_y); &crtc_x, &crtc_y);
...@@ -244,7 +247,7 @@ assign_monitor_crtc (MetaMonitor *monitor, ...@@ -244,7 +247,7 @@ assign_monitor_crtc (MetaMonitor *monitor,
.crtc = crtc, .crtc = crtc,
.mode = crtc_mode, .mode = crtc_mode,
.layout = crtc_layout, .layout = crtc_layout,
.transform = crtc_transform, .transform = crtc_hw_transform,
.outputs = g_ptr_array_new () .outputs = g_ptr_array_new ()
}; };
g_ptr_array_add (crtc_info->outputs, output); g_ptr_array_add (crtc_info->outputs, output);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment