[PATCH xf86-video-amdgpu] Only handle reflection in the driver with Xorg < 1.16

Deucher, Alexander Alexander.Deucher at amd.com
Thu Jul 27 12:46:30 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Thursday, July 27, 2017 2:24 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-amdgpu] Only handle reflection in the driver
> with Xorg < 1.16
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Xorg doesn't handle the hardware cursor correctly in that case for
> rotation and general transforms, and we can't force the SW cursor.
> 
> Fixes: ba2aa0a8c12a ("Handle rotation in the driver also with Xorg
>                       1.12-1.18")
> (Cherry picked from radeon commit
> 7d7abf99b5441ddb04dbee99bc8fa7abc30d4c46)
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

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

> ---
>  src/drmmode_display.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 567d14641..9b33d4dbb 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -615,10 +615,16 @@ drmmode_handle_transform(xf86CrtcPtr crtc)
>  {
>  	Bool ret;
> 
> +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0)
>  	if (crtc->transformPresent || crtc->rotation != RR_Rotate_0)
>  	    crtc->driverIsPerformingTransform = XF86DriverTransformOutput;
>  	else
>  	    crtc->driverIsPerformingTransform = XF86DriverTransformNone;
> +#else
> +	crtc->driverIsPerformingTransform = !crtc->transformPresent &&
> +		crtc->rotation != RR_Rotate_0 &&
> +		(crtc->rotation & 0xf) == RR_Rotate_0;
> +#endif
> 
>  	ret = xf86CrtcRotate(crtc);
> 
> --
> 2.13.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list