For APU, vram type is DDR4 and vram width is 64 For dGPU, vram type is GDDR6 and vram width is 128 Signed-off-by: Aaron Liu <aaron.liu@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index 9e6b039328df..8e30a57afe18 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c @@ -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); -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx