rpms/xorg-x11-server-utils/F-8 xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch, NONE, 1.1 xrandr-1.2.2-verify-crtc-against-prev-config.patch, NONE, 1.1 xorg-x11-server-utils.spec, 1.32, 1.33

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Thu Nov 29 01:38:29 UTC 2007


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-server-utils/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19272

Modified Files:
	xorg-x11-server-utils.spec 
Added Files:
	xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch 
	xrandr-1.2.2-verify-crtc-against-prev-config.patch 
Log Message:
* Thu Nov 29 2007 Dave Airlie <airlied at redhat.com> 7.3-2
- xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch
- xrandr-1.2.2-verify-crtc-against-prev-config.patch
- Patches from upstream to fix some bug in xrandr app


xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch:

--- NEW FILE xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch ---
>From f7aaf8947a0f216ffedc7040b0a1ef153b471425 Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf at suse.de>
Date: Mon, 12 Nov 2007 15:19:52 +0100
Subject: [PATCH] Always reset other outputs using the best crtc.

pick_crtcs_score() didn't set up crtcs references correctly if anything but
the last output resulted in the best score.
---
 xrandr-1.2.2/xrandr.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/xrandr-1.2.2/xrandr.c b/xrandr-1.2.2/xrandr.c
index 493badf..2ae31ee 100644
--- a/xrandr-1.2.2/xrandr.c
+++ b/xrandr-1.2.2/xrandr.c
@@ -1534,14 +1534,13 @@ pick_crtcs_score (output_t *outputs)
 	    best_score = score;
 	}
     }
+    if (output->crtc_info != best_crtc)
+	output->crtc_info = best_crtc;
     /*
      * Reset other outputs based on this one using the best crtc
      */
-    if (output->crtc_info != best_crtc)
-    {
-	output->crtc_info = best_crtc;
-	(void) pick_crtcs_score (outputs);
-    }
+    (void) pick_crtcs_score (outputs);
+
     return best_score;
 }
 
-- 
1.5.3.4


xrandr-1.2.2-verify-crtc-against-prev-config.patch:

--- NEW FILE xrandr-1.2.2-verify-crtc-against-prev-config.patch ---
>From 307f3686d3d517cb29b8e66d8ad2ff76a48748b7 Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf at suse.de>
Date: Mon, 12 Nov 2007 15:18:30 +0100
Subject: [PATCH] Verify crtc against previous config.

When selecting a crtc for an output, it doesn't check for already attached
outputs in check_crtc_for_output(), and so may select an crtc that is already
in use.
E.g. when changing from a cloned mode the displays won't be split up to
different crtcs, but the same crtc will be used, changing the resolution for
the unspecified display as well.
---
 xrandr-1.2.2/xrandr.c |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/xrandr-1.2.2/xrandr.c b/xrandr-1.2.2/xrandr.c
index 2fb1212..493badf 100644
--- a/xrandr-1.2.2/xrandr.c
+++ b/xrandr-1.2.2/xrandr.c
@@ -1284,6 +1284,20 @@ check_crtc_for_output (crtc_t *crtc, output_t *output)
 	if (crtc->rotation != output->rotation)
 	    return False;
     }
+    else if (crtc->crtc_info->noutput)
+    {
+	/* make sure the state matches the already used state */
+	XRRModeInfo *mode = find_mode_by_xid (crtc->crtc_info->mode);
+
+	if (mode != output->mode_info)
+	    return False;
+	if (crtc->crtc_info->x != output->x)
+	    return False;
+	if (crtc->crtc_info->y != output->y)
+	    return False;
+	if (crtc->crtc_info->rotation != output->rotation)
+	    return False;
+    }
     return True;
 }
 
@@ -1544,11 +1558,18 @@ pick_crtcs (void)
      */
     for (output = outputs; output; output = output->next)
     {
-	if (output->changes && output->mode_info && !output->crtc_info)
+	if (output->changes && output->mode_info)
 	{
-	    output->crtc_info = find_crtc_for_output (output);
-	    if (!output->crtc_info)
-		break;
+	    if (output->crtc_info) {
+		if (output->crtc_info->crtc_info->noutput > 0 &&
+		    (output->crtc_info->crtc_info->noutput > 1 ||
+		     output != find_output_by_xid (output->crtc_info->crtc_info->outputs[0])))
+		    break;
+	    } else {
+		output->crtc_info = find_crtc_for_output (output);
+		if (!output->crtc_info)
+		    break;
+	    }
 	}
     }
     /*
-- 
1.5.3.4



Index: xorg-x11-server-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server-utils/F-8/xorg-x11-server-utils.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- xorg-x11-server-utils.spec	24 Sep 2007 19:29:12 -0000	1.32
+++ xorg-x11-server-utils.spec	29 Nov 2007 01:37:56 -0000	1.33
@@ -3,7 +3,7 @@
 Summary: X.Org X11 X server utilities
 Name: xorg-x11-%{pkgname}
 Version: 7.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MIT/X11
 Group: User Interface/X
 URL: http://www.x.org
@@ -42,6 +42,10 @@
 #Patch1700: xvidtune-0.99.1-datadir-app-defaults-fix.patch
 Patch1700: xvidtune-1.0.1-buffer-stomp.patch
 
+# xrandr section
+Patch1900: xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch
+Patch1901: xrandr-1.2.2-verify-crtc-against-prev-config.patch
+
 # FIXME: Temporary build dep on automake, autoconf while they're still used
 # in the specfile.
 BuildRequires: autoconf, automake
@@ -93,6 +97,9 @@
 #%patch1700 -p0 -b .datadir-app-defaults-fix
 %patch1700 -p1 -b .buffer-stomp
 
+%patch1900 -p1 -b .randr-reset
+%patch1901 -p1 -b .randr-verify
+
 %build
 
 # Build all apps
@@ -204,6 +211,11 @@
 %{_mandir}/man1/xvidtune.1*
 
 %changelog
+* Thu Nov 29 2007 Dave Airlie <airlied at redhat.com> 7.3-2
+- xrandr-1.2.2-reset-other-outputs-using-best-crtc.patch
+- xrandr-1.2.2-verify-crtc-against-prev-config.patch
+- Patches from upstream to fix some bug in xrandr app
+
 * Mon Sep 24 2007 Adam Jackson <ajax at redhat.com> 7.3-1
 - sessreg 1.0.3
 - xgamma 1.0.2




More information about the fedora-extras-commits mailing list