drm/amdgpu: correct vram type and width for emulation mode
Subsystems (2)
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
Signed-off-by Aaron Liu <[email protected]>
--- 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
@@ -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