Author: arekm                        Date: Sun May 29 07:38:26 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; replace nvidia hack with proper checks

---- Files affected:
packages/xorg-xserver-server:
   xorg-xserver-server-nvidia-randr.patch (1.1 -> 1.2) , 
xorg-xserver-server.spec (1.279 -> 1.280) 

---- Diffs:

================================================================
Index: packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch
diff -u packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch:1.1 
packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch:1.2
--- packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch:1.1     
Tue Feb  8 11:24:29 2011
+++ packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch Sun May 
29 09:38:21 2011
@@ -1,39 +1,60 @@
-From d77ffa918b2aaa3ca1deb17ed0145199d0f863da Mon Sep 17 00:00:00 2001
-From: Julien Cristau <[email protected]>
-Date: Mon, 31 Jan 2011 13:14:47 +0000
-Subject: Revert "randr: check for virtual size limits before set crtc"
+commit 50b9d3142ff90af2f7fa35b7b1bf9e5a07723dbd
+Author: Aaron Plattner <[email protected]>
+Date:   Tue May 24 16:02:42 2011 -0700
 
-Apparently these checks break rotation with the nvidia drivers:
-https://bbs.archlinux.org/viewtopic.php?pid=877761
-http://bugs.debian.org/611619
-Let's not do that in a stable branch.
+    randr: check rotated virtual size limits correctly
+    
+    Commit d1107918d4626268803b54033a07405122278e7f introduced checks to
+    the RandR path that cause RRSetScreenConfig requests to fail if the
+    size is too large.  Unfortunately, when RandR 1.1 rotation is enabled
+    it compares the rotated screen dimensions to the unrotated limits,
+    which causes 90- and 270-degree rotation to fail unless your screen
+    happens to be square:
+    
+      X Error of failed request:  BadValue (integer parameter out of range for 
operation)
+        Major opcode of failed request:  153 (RANDR)
+        Minor opcode of failed request:  2 (RRSetScreenConfig)
+        Value in failed request:  0x780
+        Serial number of failed request:  14
+        Current serial number in output stream:  14
+    
+    Fix this by moving the check above the code that swaps the dimensions
+    based on the rotation.
+    
+    Signed-off-by: Aaron Plattner <[email protected]>
+    Reviewed-by: Jeremy Huddleston <[email protected]>
+    Tested-by: Robert Hooker <[email protected]>
+    Tested-by: Kent Baxley <[email protected]>
+    Signed-off-by: Keith Packard <[email protected]>
+    (cherry picked from commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3)
 
-This reverts commit 6a6d907e77777057cadbd80572119c09732385cd.
-
-Signed-off-by: Julien Cristau <[email protected]>
----
 diff --git a/randr/rrscreen.c b/randr/rrscreen.c
-index 0fee1f5..630ff57 100644
+index 1bc1a9e..da6d48d 100644
 --- a/randr/rrscreen.c
 +++ b/randr/rrscreen.c
-@@ -921,18 +921,6 @@ ProcRRSetScreenConfig (ClientPtr client)
-       width = mode->mode.height;
-       height = mode->mode.width;
-     }
--
--    if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
--      client->errorValue = width;
--      free(pData);
--      return BadValue;
--    }
--    if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
--      client->errorValue = height;
--      free(pData);
--      return BadValue;
+@@ -910,12 +910,6 @@ ProcRRSetScreenConfig (ClientPtr client)
+      */
+     width = mode->mode.width;
+     height = mode->mode.height;
+-    if (rotation & (RR_Rotate_90|RR_Rotate_270))
+-    {
+-      width = mode->mode.height;
+-      height = mode->mode.width;
 -    }
 -
+     if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
+       client->errorValue = width;
+       free(pData);
+@@ -927,6 +921,12 @@ ProcRRSetScreenConfig (ClientPtr client)
+       return BadValue;
+     }
+ 
++    if (rotation & (RR_Rotate_90|RR_Rotate_270))
++    {
++      width = mode->mode.height;
++      height = mode->mode.width;
++    }
++
      if (width != pScreen->width || height != pScreen->height)
      {
        int     c;
---
-cgit v0.8.3-6-g21f6

================================================================
Index: packages/xorg-xserver-server/xorg-xserver-server.spec
diff -u packages/xorg-xserver-server/xorg-xserver-server.spec:1.279 
packages/xorg-xserver-server/xorg-xserver-server.spec:1.280
--- packages/xorg-xserver-server/xorg-xserver-server.spec:1.279 Sun May 29 
09:08:54 2011
+++ packages/xorg-xserver-server/xorg-xserver-server.spec       Sun May 29 
09:38:21 2011
@@ -16,7 +16,7 @@
 %define        xorg_xserver_server_videodrv_abi        10.0
 %define        xorg_xserver_server_xinput_abi          12.2
 
-%define                rel     1
+%define                rel     2
 Summary:       X.org server
 Summary(pl.UTF-8):     Serwer X.org
 Name:          xorg-xserver-server
@@ -618,6 +618,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.280  2011/05/29 07:38:21  arekm
+- rel 2; replace nvidia hack with proper checks
+
 Revision 1.279  2011/05/29 07:08:54  arekm
 - up to 1.10.2
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xorg-xserver-server/xorg-xserver-server-nvidia-randr.patch?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xorg-xserver-server/xorg-xserver-server.spec?r1=1.279&r2=1.280&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to