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 <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
cc02f4ef3e
commit
a7c01da54a
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user