diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-08-19 18:11:45 +0900 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-08-19 18:11:45 +0900 |
commit | 1d886b526dc49f32dc6744b7a882894bdac4e846 (patch) | |
tree | 68eb7b32f9ff31997013a887a8d0877794784fda | |
parent | 270da55340766074cabff8af4258e29fe2f0fc81 (diff) |
DRI2: Don't ignore rotated CRTCs in amdgpu_dri2_drawable_crtc
Waiting for vblank interrupts works fine with rotated CRTCs. The only
case we can't handle with rotation is page flipping, which is handled
in can_exchange().
This fixes gnome-shell hanging on rotation, probably because
amdgpu_dri2_get_msc returned MSC/UST 0 for rotated CRTCs.
(Ported from amdgpu commit 7b3212e33cd36fb6f122774df27b56ec4e1a22b8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/radeon_dri2.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 7587a0cc..09a84b57 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -559,19 +559,12 @@ xf86CrtcPtr radeon_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled) { ScreenPtr pScreen = pDraw->pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); - xf86CrtcPtr crtc; - crtc = radeon_pick_best_crtc(pScrn, consider_disabled, + return radeon_pick_best_crtc(pScrn, consider_disabled, pDraw->x, pDraw->x + pDraw->width, pDraw->y, pDraw->y + pDraw->height); - - /* Make sure the CRTC is valid and this is the real front buffer */ - if (crtc != NULL && !crtc->rotatedData) - return crtc; - else - return NULL; } static void |