xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Apr 3 22:17:36 PDT 2013


 hw/kdrive/fbdev/fbdev.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit 8928f8fa0bb154ce437af703ff702016f0dcf127
Author: Geert Uytterhoeven <geert at linux-m68k.org>
Date:   Mon Mar 18 21:38:10 2013 +0100

    kdrive/fbdev: revive randr new screen size logic
    
    hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig':
    hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable]
    hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable]
    
    Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index fd14afa..d6fcf1a 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -465,15 +465,19 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
     int oldheight;
     int oldmmwidth;
     int oldmmheight;
-    int newwidth, newheight;
+    int newwidth, newheight, newmmwidth, newmmheight;
 
     if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) {
         newwidth = pSize->width;
         newheight = pSize->height;
+        newmmwidth = pSize->mmWidth;
+        newmmheight = pSize->mmHeight;
     }
     else {
         newwidth = pSize->height;
         newheight = pSize->width;
+        newmmwidth = pSize->mmHeight;
+        newmmheight = pSize->mmWidth;
     }
 
     if (wasEnabled)
@@ -491,6 +495,10 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
      */
 
     scrpriv->randr = KdAddRotation(screen->randr, randr);
+    pScreen->width = newwidth;
+    pScreen->height = newheight;
+    pScreen->mmWidth = newmmwidth;
+    pScreen->mmHeight = newmmheight;
 
     fbdevUnmapFramebuffer(screen);
 
commit 808c87bff710263f5a7b3c12a7e7fec54672fecd
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Mar 25 14:51:58 2013 +1000

    Revert "kdrive: fix "set but not used" warnings"
    
    Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better
    fix coming up.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index fb6e3a2..fd14afa 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -465,6 +465,16 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
     int oldheight;
     int oldmmwidth;
     int oldmmheight;
+    int newwidth, newheight;
+
+    if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) {
+        newwidth = pSize->width;
+        newheight = pSize->height;
+    }
+    else {
+        newwidth = pSize->height;
+        newheight = pSize->width;
+    }
 
     if (wasEnabled)
         KdDisableScreen(pScreen);


More information about the xorg-commit mailing list