From fef2f6357b40b238ae01c4c80b0d29b17b839686 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 13 Jan 2015 15:08:38 -0800 Subject: [PATCH] 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 Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- hw/xfree86/drivers/modesetting/vblank.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c index 711f6edb3..a342662a7 100644 --- a/hw/xfree86/drivers/modesetting/vblank.c +++ b/hw/xfree86/drivers/modesetting/vblank.c @@ -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