Commit | Line | Data |
---|---|---|
7217e0ca ML |
1 | From dd0c31d6b7559bb0dda6283a5d345d537f1d6b42 Mon Sep 17 00:00:00 2001 |
2 | From: Dave Airlie <airlied@gmail.com> | |
3 | Date: Tue, 30 Jul 2013 13:17:45 +1000 | |
4 | Subject: [PATCH] rrcrtc: brackets are hard, lets go shopping. | |
5 | ||
6 | Slaving two outputs on a secondary GPU to a primary GPU testing | |
7 | picked this up, in that we'd try to resize to the totally the | |
8 | wrong thing, then as usual segfault in the rotation code. | |
9 | ||
10 | Signed-off-by: Dave Airlie <airlied@redhat.com> | |
11 | --- | |
12 | randr/rrcrtc.c | 7 ++++--- | |
13 | 1 file changed, 4 insertions(+), 3 deletions(-) | |
14 | ||
7217e0ca ML |
15 | --- a/randr/rrcrtc.c |
16 | +++ b/randr/rrcrtc.c | |
4db25562 | 17 | @@ -476,7 +476,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen, |
7217e0ca ML |
18 | |
19 | xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) { | |
20 | rrScrPriv(slave); | |
21 | - for (c = 0; c < pScrPriv->numCrtcs; c++) | |
22 | + for (c = 0; c < pScrPriv->numCrtcs; c++) { | |
23 | if (pScrPriv->crtcs[c] == rr_crtc) { | |
24 | newbox.x1 = x; | |
25 | newbox.x2 = x + w; | |
4db25562 | 26 | @@ -491,8 +491,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen, |
7217e0ca ML |
27 | newbox.y1 = pScrPriv->crtcs[c]->y; |
28 | newbox.y2 = pScrPriv->crtcs[c]->y + pScrPriv->crtcs[c]->mode->mode.height; | |
29 | } | |
30 | - RegionInit(&new_crtc_region, &newbox, 1); | |
31 | - RegionUnion(&total_region, &total_region, &new_crtc_region); | |
32 | + RegionInit(&new_crtc_region, &newbox, 1); | |
33 | + RegionUnion(&total_region, &total_region, &new_crtc_region); | |
34 | + } | |
35 | } | |
36 | ||
37 | newsize = RegionExtents(&total_region); |