summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/bios
diff options
context:
space:
mode:
authorAlvin Lee <alvin.lee2@amd.com>2023-12-01 06:25:07 -0700
committerAlex Deucher <alexander.deucher@amd.com>2023-12-06 15:22:33 -0500
commit823423b8ec7b56e22dad83e171c9ca6418679169 (patch)
tree0df9e750cc664ce9c919696b69c63552403fb67a /drivers/gpu/drm/amd/display/dc/bios
parent94bbf802efd0a8f13147d6664af6e653637340a8 (diff)
downloadlinux-stable-823423b8ec7b56e22dad83e171c9ca6418679169.tar.gz
linux-stable-823423b8ec7b56e22dad83e171c9ca6418679169.tar.bz2
linux-stable-823423b8ec7b56e22dad83e171c9ca6418679169.zip
drm/amd/display: Use channel_width = 2 for vram table 3.0
VBIOS has suggested to use channel_width=2 for any ASIC that uses vram info 3.0. This is because channel_width in the vram table no longer represents the memory width Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Samson Tam <samson.tam@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios')
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 2fb804eb5702..01abc2f3081a 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -2386,7 +2386,13 @@ static enum bp_result get_vram_info_v30(
return BP_RESULT_BADBIOSTABLE;
info->num_chans = info_v30->channel_num;
- info->dram_channel_width_bytes = (1 << info_v30->channel_width) / 8;
+ /* As suggested by VBIOS we should always use
+ * dram_channel_width_bytes = 2 when using VRAM
+ * table version 3.0. This is because the channel_width
+ * param in the VRAM info table is changed in 7000 series and
+ * no longer represents the memory channel width.
+ */
+ info->dram_channel_width_bytes = 2;
return result;
}