summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-05-12 14:55:04 -0700
committerKeith Packard <keithp@keithp.com>2014-05-12 14:55:04 -0700
commit01e18af17f8dc91451fbd0902049045afd1cea7e (patch)
tree8b3af50ab0004f65f992dcf49f52481f40174e6b /randr
parent6dd86f3cba7cca67f3a9102db2e90722d32a34cb (diff)
rrcrtc: brackets are hard, lets go shopping.
Slaving two outputs on a secondary GPU to a primary GPU testing picked this up, in that we'd try to resize to the totally the wrong thing, then as usual segfault in the rotation code. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrcrtc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 6da698ea0..69b3ecf0f 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -476,7 +476,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
rrScrPrivPtr slave_priv = rrGetScrPriv(slave);
- for (c = 0; c < slave_priv->numCrtcs; c++)
+ for (c = 0; c < slave_priv->numCrtcs; c++) {
if (slave_priv->crtcs[c] == rr_crtc) {
newbox.x1 = x;
newbox.x2 = x + w;
@@ -491,8 +491,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
newbox.y1 = slave_priv->crtcs[c]->y;
newbox.y2 = slave_priv->crtcs[c]->y + slave_priv->crtcs[c]->mode->mode.height;
}
- RegionInit(&new_crtc_region, &newbox, 1);
- RegionUnion(&total_region, &total_region, &new_crtc_region);
+ RegionInit(&new_crtc_region, &newbox, 1);
+ RegionUnion(&total_region, &total_region, &new_crtc_region);
+ }
}
newsize = RegionExtents(&total_region);