7d6636e
From dd0c31d6b7559bb0dda6283a5d345d537f1d6b42 Mon Sep 17 00:00:00 2001
7d6636e
From: Dave Airlie <airlied@gmail.com>
7d6636e
Date: Tue, 30 Jul 2013 13:17:45 +1000
7d6636e
Subject: [PATCH] rrcrtc: brackets are hard, lets go shopping.
7d6636e
7d6636e
Slaving two outputs on a secondary GPU to a primary GPU testing
7d6636e
picked this up, in that we'd try to resize to the totally the
7d6636e
wrong thing, then as usual segfault in the rotation code.
7d6636e
7d6636e
Signed-off-by: Dave Airlie <airlied@redhat.com>
7d6636e
---
7d6636e
 randr/rrcrtc.c | 7 ++++---
7d6636e
 1 file changed, 4 insertions(+), 3 deletions(-)
7d6636e
7d6636e
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
7d6636e
index 2f76b62..40b01f0 100644
7d6636e
--- a/randr/rrcrtc.c
7d6636e
+++ b/randr/rrcrtc.c
7d6636e
@@ -474,7 +474,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
7d6636e
 
7d6636e
     xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
9e2b258
         rrScrPrivPtr    slave_priv = rrGetScrPriv(slave);
9e2b258
-        for (c = 0; c < slave_priv->numCrtcs; c++)
9e2b258
+        for (c = 0; c < slave_priv->numCrtcs; c++) {
9e2b258
             if (slave_priv->crtcs[c] == rr_crtc) {
7d6636e
                 newbox.x1 = x;
7d6636e
                 newbox.x2 = x + w;
7d6636e
@@ -489,8 +489,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
9e2b258
                 newbox.y1 = slave_priv->crtcs[c]->y;
9e2b258
                 newbox.y2 = slave_priv->crtcs[c]->y + slave_priv->crtcs[c]->mode->mode.height;
7d6636e
             }
7d6636e
-        RegionInit(&new_crtc_region, &newbox, 1);
7d6636e
-        RegionUnion(&total_region, &total_region, &new_crtc_region);
7d6636e
+	    RegionInit(&new_crtc_region, &newbox, 1);
7d6636e
+	    RegionUnion(&total_region, &total_region, &new_crtc_region);
7d6636e
+	}
7d6636e
     }
7d6636e
 
7d6636e
     newsize = RegionExtents(&total_region);
7d6636e
-- 
7d6636e
1.8.2.1
7d6636e