xrandr: move outputs among CRTCs as necessary (closes: #486142).

This commit is contained in:
Julien Cristau 2008-08-02 16:59:07 +02:00
parent 99b71c962b
commit 7bcd07ba5e
3 changed files with 63 additions and 0 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
x11-xserver-utils (7.3+4) UNRELEASED; urgency=low
* xrandr: move outputs among CRTCs as necessary (closes: #486142).
-- Julien Cristau <jcristau@debian.org> Sat, 02 Aug 2008 16:58:20 +0200
x11-xserver-utils (7.3+3) unstable; urgency=low
* xrdb 1.0.5

View File

@ -0,0 +1,56 @@
From 4dcc8ae1a6903434def1a2706f7c68ff9e2a17c4 Mon Sep 17 00:00:00 2001
From: Hong Liu <hong.liu@intel.com>
Date: Mon, 10 Mar 2008 21:37:09 -0700
Subject: [PATCH] Move outputs among crtcs as necessary. Fixes 14570
This patch makes new requests override existing crtc allocations. Outputs
with restricted crtc usage can now force existing outputs to switch
automatcially.
---
xrandr.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/xrandr/xrandr.c b/xrandr/xrandr.c
index e2a657f..41e15dd 100644
--- a/xrandr/xrandr.c
+++ b/xrandr/xrandr.c
@@ -1241,7 +1241,7 @@ mark_changing_crtcs (void)
* Test whether 'crtc' can be used for 'output'
*/
Bool
-check_crtc_for_output (crtc_t *crtc, output_t *output)
+check_crtc_for_output (crtc_t *crtc, output_t *output, Bool ignore_state)
{
int c;
int l;
@@ -1272,6 +1272,9 @@ check_crtc_for_output (crtc_t *crtc, output_t *output)
return False;
}
+ if (ignore_state)
+ return True;
+
if (crtc->noutput)
{
/* make sure the state matches */
@@ -1313,7 +1316,7 @@ find_crtc_for_output (output_t *output)
crtc = find_crtc_by_xid (output->output_info->crtcs[c]);
if (!crtc) fatal ("cannot find crtc 0x%x\n", output->output_info->crtcs[c]);
- if (check_crtc_for_output (crtc, output))
+ if (check_crtc_for_output (crtc, output, False))
return crtc;
}
return NULL;
@@ -1518,7 +1521,7 @@ pick_crtcs_score (output_t *outputs)
/* reset crtc allocation for following outputs */
disable_outputs (outputs);
- if (!check_crtc_for_output (crtc, output))
+ if (!check_crtc_for_output (crtc, output, True))
continue;
my_score = 1000;
--
1.5.6.3

View File

@ -1,2 +1,3 @@
01_sessreg_implement_hostname_hashing.diff -p0
02_xmodmap_manpage.diff
03_xrandr-Move-outputs-among-crtcs-as-necessary.-Fixes-14570.patch