modesetting: Return the crtc for a drawable even if it's rotated

All of our checks for what crtc we are on take rotation into account so we
select the correct crtc.  The only problem is that we weren't returning it
we were rotated.  This caused X to think DRI3 apps were not on any crtc and
limit them to 1 FPS.

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Jason Ekstrand 2015-01-13 15:08:38 -08:00 committed by Keith Packard
parent 3dcd591fa9
commit fef2f6357b

View File

@ -147,20 +147,13 @@ ms_dri2_crtc_covering_drawable(DrawablePtr pDraw)
ScreenPtr pScreen = pDraw->pScreen;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
BoxRec box, crtcbox;
xf86CrtcPtr crtc;
box.x1 = pDraw->x;
box.y1 = pDraw->y;
box.x2 = box.x1 + pDraw->width;
box.y2 = box.y1 + pDraw->height;
crtc = ms_covering_crtc(pScrn, &box, NULL, &crtcbox);
/* Make sure the CRTC is valid and this is the real front buffer */
if (crtc != NULL && !crtc->rotatedData)
return crtc;
return NULL;
return ms_covering_crtc(pScrn, &box, NULL, &crtcbox);
}
static Bool