[PATCH xf86-video-ati] Don't enable micro-tiling for scanout buffers on pre-R600

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Tuesday, July 12, 2016 2:58 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-ati] Don't enable micro-tiling for scanout buffers
> on pre-R600
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> The display engine didn't support it.
> 
> Fixes display corruption with options "TearFree" and "ShadowPrimary"
> (and rotation or transforms with current xserver) on pre-R600.
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

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

> ---
>  src/drmmode_display.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 2555465..b4f4f1a 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -539,10 +539,11 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
>  			      int width, int height)
>  {
>  	ScrnInfoPtr pScrn = crtc->scrn;
> +	RADEONInfoPtr info = RADEONPTR(pScrn);
>  	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
>  	drmmode_ptr drmmode = drmmode_crtc->drmmode;
>  	struct radeon_surface surface;
> -	uint32_t tiling;
> +	uint32_t tiling = RADEON_CREATE_PIXMAP_TILING_MACRO;
>  	int ret;
>  	int pitch;
> 
> @@ -553,11 +554,11 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
>  		drmmode_crtc_scanout_destroy(drmmode, scanout);
>  	}
> 
> +	if (info->ChipFamily >= CHIP_FAMILY_R600)
> +		tiling |= RADEON_CREATE_PIXMAP_TILING_MICRO;
>  	scanout->bo = radeon_alloc_pixmap_bo(pScrn, width, height, pScrn-
> >depth,
> -
> RADEON_CREATE_PIXMAP_TILING_MACRO |
> -
> RADEON_CREATE_PIXMAP_TILING_MICRO,
> -					     pScrn->bitsPerPixel, &pitch,
> -					     &surface, &tiling);
> +					     tiling, pScrn->bitsPerPixel,
> +					     &pitch, &surface, &tiling);
>  	if (scanout->bo == NULL)
>  		return NULL;
> 
> --
> 2.8.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux