[PATCH 28/29] xf86: make sure rotate calcs are done on the right screen boundaries
Dave Airlie
airlied at gmail.com
Thu Jul 5 13:30:35 PDT 2012
From: Dave Airlie <airlied at redhat.com>
This fixes a segfault where this code believes we are outside the screen
boundaries on a slave device, but we aren't.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/xfree86/modes/xf86Rotate.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 31e0372..a393747 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -322,6 +322,12 @@ xf86CrtcFitsScreen(xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
/* When called before PreInit, the driver is
* presumably doing load detect
*/
+ if (pScrn->is_gpu) {
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+ if (pScreen->current_master)
+ pScrn = xf86ScreenToScrn(pScreen->current_master);
+ }
+
if (pScrn->virtualX == 0 || pScrn->virtualY == 0)
return TRUE;
--
1.7.10.2
More information about the xorg-devel
mailing list