diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-07-12 15:57:28 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-07-22 19:09:48 +0900 |
commit | 6d91fb4fc701895473ff675f440a8eef655e80ca (patch) | |
tree | 9d56393665f4d131908bae5c86ed1d61088e56ee | |
parent | a37af701768b12d86868a831a79f1e02ee4968cf (diff) |
Don't enable micro-tiling for scanout buffers on pre-R600
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.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/drmmode_display.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7d2ce1fb..b39651cc 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -543,10 +543,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; @@ -557,11 +558,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; |