Commit 8d6a5230 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/gmc9: get vram width from atom for Raven

Get it from the system info table.
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 21f6bcb6
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/firmware.h> #include <linux/firmware.h>
#include "amdgpu.h" #include "amdgpu.h"
#include "gmc_v9_0.h" #include "gmc_v9_0.h"
#include "amdgpu_atomfirmware.h"
#include "vega10/soc15ip.h" #include "vega10/soc15ip.h"
#include "vega10/HDP/hdp_4_0_offset.h" #include "vega10/HDP/hdp_4_0_offset.h"
...@@ -442,6 +443,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) ...@@ -442,6 +443,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
u32 tmp; u32 tmp;
int chansize, numchan; int chansize, numchan;
adev->mc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);
if (!adev->mc.vram_width) {
/* hbm memory channel size */ /* hbm memory channel size */
chansize = 128; chansize = 128;
...@@ -479,6 +482,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) ...@@ -479,6 +482,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
break; break;
} }
adev->mc.vram_width = numchan * chansize; adev->mc.vram_width = numchan * chansize;
}
/* Could aper size report 0 ? */ /* Could aper size report 0 ? */
adev->mc.aper_base = pci_resource_start(adev->pdev, 0); adev->mc.aper_base = pci_resource_start(adev->pdev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment