drm/radeon/kms: fix scanout of 2D tiled buffers on EG/CM
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43191 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
6eebd6bb5f
commit
392e37229f
@@ -1107,9 +1107,40 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (tiling_flags & RADEON_TILING_MACRO)
|
||||
if (tiling_flags & RADEON_TILING_MACRO) {
|
||||
if (rdev->family >= CHIP_CAYMAN)
|
||||
tmp = rdev->config.cayman.tile_config;
|
||||
else
|
||||
tmp = rdev->config.evergreen.tile_config;
|
||||
|
||||
switch ((tmp & 0xf0) >> 4) {
|
||||
case 0: /* 4 banks */
|
||||
fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_4_BANK);
|
||||
break;
|
||||
case 1: /* 8 banks */
|
||||
default:
|
||||
fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_8_BANK);
|
||||
break;
|
||||
case 2: /* 16 banks */
|
||||
fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_16_BANK);
|
||||
break;
|
||||
}
|
||||
|
||||
switch ((tmp & 0xf000) >> 12) {
|
||||
case 0: /* 1KB rows */
|
||||
default:
|
||||
fb_format |= EVERGREEN_GRPH_TILE_SPLIT(EVERGREEN_ADDR_SURF_TILE_SPLIT_1KB);
|
||||
break;
|
||||
case 1: /* 2KB rows */
|
||||
fb_format |= EVERGREEN_GRPH_TILE_SPLIT(EVERGREEN_ADDR_SURF_TILE_SPLIT_2KB);
|
||||
break;
|
||||
case 2: /* 4KB rows */
|
||||
fb_format |= EVERGREEN_GRPH_TILE_SPLIT(EVERGREEN_ADDR_SURF_TILE_SPLIT_4KB);
|
||||
break;
|
||||
}
|
||||
|
||||
fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1);
|
||||
else if (tiling_flags & RADEON_TILING_MICRO)
|
||||
} else if (tiling_flags & RADEON_TILING_MICRO)
|
||||
fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1);
|
||||
|
||||
switch (radeon_crtc->crtc_id) {
|
||||
|
Reference in New Issue
Block a user