[PATCH xf86-video-amdgpu] DRI2: Don't ignore rotated CRTCs in amdgpu_dri2_drawable_crtc

Alex Deucher alexdeucher at gmail.com
Thu Jul 9 08:13:42 PDT 2015


On Thu, Jul 9, 2015 at 4:58 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> 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.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/amdgpu_dri2.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
> index bde36de..bbf286c 100644
> --- a/src/amdgpu_dri2.c
> +++ b/src/amdgpu_dri2.c
> @@ -425,18 +425,11 @@ xf86CrtcPtr amdgpu_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled)
>  {
>         ScreenPtr pScreen = pDraw->pScreen;
>         ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
> -       xf86CrtcPtr crtc;
>
> -       crtc = amdgpu_pick_best_crtc(pScrn, consider_disabled,
> +       return amdgpu_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
> --
> 2.1.4
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list