Commit a7c01da5 authored by Dave Airlie's avatar Dave Airlie

xf86: make sure rotate calcs are done on the right screen boundaries

This fixes a segfault where this code believes we are outside the screen
boundaries on a slave device, but we aren't.
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent cc02f4ef
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment