Skip to contentSkip to conversation

drm/amdgpu: correct vram type and width for emulation mode

PATCH New Aaron Liu 1 participant 1 message Jul 7, 2020

Subsystems (2)
lore
Share & tools
lore

Aaron Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: correct vram type and width for emulation mode

For APU, vram type is DDR4 and vram width is 64 For dGPU, vram type is GDDR6 and vram width is 128

---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +4 -4
index 9e6b039328df..8e30a57afe18 100644
@@ -846,12 +846,12 @@ static int gmc_v10_0_sw_init(void *handle)
 
 	spin_lock_init(&adev->gmc.invalidate_lock);
 
-	if (amdgpu_emu_mode == 1) {
-		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_GDDR6;
-		adev->gmc.vram_width = 1 * 128; /* numchan * chansize */
-	} else if (adev->asic_type == CHIP_VANGOGH && amdgpu_emu_mode == 1){
+	if ((adev->flags & AMD_IS_APU) && amdgpu_emu_mode == 1) {
 		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_DDR4;
 		adev->gmc.vram_width = 64;
+	} else if (amdgpu_emu_mode == 1) {
+		adev->gmc.vram_type = AMDGPU_VRAM_TYPE_GDDR6;
+		adev->gmc.vram_width = 1 * 128; /* numchan * chansize */
 	} else {
 		r = amdgpu_atomfirmware_get_vram_info(adev,
 				&vram_width, &vram_type, &vram_vendor);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx