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