[PATCH xserver] xfree86: Choose the largest output as primary for xf86TargetFallback()
Chris Wilson
chris at chris-wilson.co.uk
Fri Oct 21 11:23:42 UTC 2016
With all things equal (i.e. same output preferences), use the largest
output as the primary. From the primary, we choose compatible modes for
the others, and given that we are configuring an extended desktop, we
have greater freedom in our selection and may as well base our choice on
the largest mode available.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
hw/xfree86/modes/xf86Crtc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 966a168..048c3b2 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2413,7 +2413,10 @@ xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) +
((default_mode->type & M_T_USERPREF) != 0));
- if (default_preferred > target_preferred || !target_mode) {
+ if (!target_mode ||
+ default_preferred > target_preferred ||
+ (default_preferred == target_preferred &&
+ biggestMode(default_mode, target_mode))) {
target_mode = default_mode;
target_preferred = default_preferred;
target_rotation = config->output[o]->initial_rotation;
--
2.9.3
More information about the xorg-devel
mailing list