drm/radeon: fix display tiling setup on SI
Subsystems (2)
PATCH 1/1 drm/radeon: fix display tiling setup on SI
Apply the same logic as CI to SI for setting up the display tiling parameters. The num banks may vary per tiling index just like CI.
Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=71488
https://bugs.freedesktop.org/show_bug.cgi?id=73946
https://bugs.freedesktop.org/show_bug.cgi?id=74927
--- drivers/gpu/drm/radeon/atombios_crtc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +7 -6
@@ -1176,7 +1176,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,evergreen_tiling_fields (tiling_flags, &bankw, &bankh, &mtaspect, &tile_split);/* Set NUM_BANKS. */ -if (rdev->family >=CHIP_BONAIRE ) { +if (rdev->family >=CHIP_TAHITI ) {unsigned tileb, index, num_banks, tile_split_bytes;/* Calculate the macrotile mode index. */
@@ -1194,13 +1194,14 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,return -EINVAL ; } - num_banks = (rdev->config.cik.macrotile_mode_array[index] >>6 ) &0x3 ; +if (rdev->family >=CHIP_BONAIRE ) + num_banks = (rdev->config.cik.macrotile_mode_array[index] >>6 ) &0x3 ; +else + num_banks = (rdev->config.si.tile_mode_array[index] >>20 ) &0x3 ; fb_format |=EVERGREEN_GRPH_NUM_BANKS (num_banks); }else { -/* SI and older. */ -if (rdev->family >=CHIP_TAHITI ) - tmp = rdev->config.si.tile_config; -else if (rdev->family >=CHIP_CAYMAN ) +/* NI and older. */ +if (rdev->family >=CHIP_CAYMAN ) tmp = rdev->config.cayman.tile_config;else tmp = rdev->config.evergreen.tile_config;
Signature · 1 line
1.8.3.1
Are you sure the index to si.tile_mode_array is correct? I wrote it for CI and I'm not sure if the index can be used for SI in this way too.
Marek
Quoted 55 lines · Alex Deucher
Apply the same logic as CI to SI for setting up the display tiling parameters. The num banks may vary per tiling index just like CI.
Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=71488
https://bugs.freedesktop.org/show_bug.cgi?id=73946
https://bugs.freedesktop.org/show_bug.cgi?id=74927Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/atombios_crtc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/gpu/drm/radeon/atombios_crtc.c +7
-7@@ -1176,7 +1176,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,evergreen_tiling_fields (tiling_flags, &bankw, &bankh, &mtaspect, &tile_split);/* Set NUM_BANKS. */ -if (rdev->family >=CHIP_BONAIRE ) { +if (rdev->family >=CHIP_TAHITI ) {unsigned tileb, index, num_banks, tile_split_bytes;/* Calculate the macrotile mode index. */ @@ -1194,13 +1194,14 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,return -EINVAL ; } - num_banks = (rdev->config.cik.macrotile_mode_array[index] >>6 ) &0x3 ; +if (rdev->family >=CHIP_BONAIRE ) + num_banks = (rdev->config.cik.macrotile_mode_array[index] >>6 ) &0x3 ; +else + num_banks = (rdev->config.si.tile_mode_array[index] >>20 ) &0x3 ; fb_format |=EVERGREEN_GRPH_NUM_BANKS (num_banks); }else { -/* SI and older. */ -if (rdev->family >=CHIP_TAHITI ) - tmp = rdev->config.si.tile_config; -else if (rdev->family >=CHIP_CAYMAN ) +/* NI and older. */ +if (rdev->family >=CHIP_CAYMAN ) tmp = rdev->config.cayman.tile_config;else tmp = rdev->config.evergreen.tile_config; --1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Deucher, Alexander
maintainerQuoted 10 lines
-----Original Message-----
From: Marek Olšák [mailto:[email protected]]
Sent: Tuesday, February 18, 2014 5:04 AM
To: Alex Deucher
Cc: dri-devel; Deucher, Alexander; [email protected]
Subject: Re: [PATCH] drm/radeon: fix display tiling setup on SIAre you sure the index to si.tile_mode_array is correct? I wrote it for CI and I'm not sure if the index can be used for SI in this way too.
I'll double check. I think some of the indices may be different on SI, but I don't think the display ones are. The patch fixes tiling on the oland card I just got.
Alex
Quoted 66 lines
Marek
Quoted 9 lines · Alex Deucher
Apply the same logic as CI to SI for setting up the display tiling parameters. The num banks may vary per tiling index just like CI.
Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=71488
https://bugs.freedesktop.org/show_bug.cgi?id=73946
https://bugs.freedesktop.org/show_bug.cgi?id=74927Review
Quoted 7 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/atombios_crtc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/radeon/atombios_crtc.cdrivers/gpu/drm/radeon/atombios_crtc.c static int dce4_crtc_do_set_base(struct drm_crtc
Quoted 4 lines
index f0d409d..0d19f4f9 100644
drivers/gpu/drm/radeon/atombios_crtc.c +0
-0@@ -1176,7 +1176,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc*crtc,
drivers/gpu/drm/radeon/atombios_crtc.c static int dce4_crtc_do_set_base(struct drm_crtc · line 1176
Quoted 1 line
drivers/gpu/drm/radeon/atombios_crtc.c +0
-0evergreen_tiling_fields(tiling_flags, &bankw, &bankh, &mtaspect,
&tile_split);drivers/gpu/drm/radeon/atombios_crtc.c static int dce4_crtc_do_set_base(struct
Quoted 8 lines
drivers/gpu/drm/radeon/atombios_crtc.c +1
-1/* Set NUM_BANKS. */ -if (rdev->family >=CHIP_BONAIRE ) { +if (rdev->family >=CHIP_TAHITI ) {unsigned tileb, index, num_banks, tile_split_bytes;/* Calculate the macrotile mode index. */ @@ -1194,13 +1194,14 @@ static int dce4_crtc_do_set_base(struct
drm_crtc*crtc,drivers/gpu/drm/radeon/atombios_crtc.c static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
Quoted 10 lines
drivers/gpu/drm/radeon/atombios_crtc.c +4
-1return -EINVAL ; } - num_banks = (rdev->config.cik.macrotile_mode_array[index] > 6) & 0x3; +if (rdev->family >=CHIP_BONAIRE ) + num_banks = (rdev- config.cik.macrotile_mode_array[index] >>6 ) &0x3 ; +else + num_banks = (rdev->config.si.tile_mode_array[index] >>20) &
0x3;Quoted 18 lines
drivers/gpu/drm/radeon/atombios_crtc.c +2
-4fb_format |=EVERGREEN_GRPH_NUM_BANKS (num_banks); }else { -/* SI and older. */ -if (rdev->family >=CHIP_TAHITI ) - tmp = rdev->config.si.tile_config; -else if (rdev->family >=CHIP_CAYMAN ) +/* NI and older. */ +if (rdev->family >=CHIP_CAYMAN ) tmp = rdev->config.cayman.tile_config;else tmp = rdev->config.evergreen.tile_config;--
1.8.3.1_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel