diff options
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 2611e8533be1..02deb3229405 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | |||
@@ -873,6 +873,8 @@ static int gmc_v8_0_late_init(void *handle) | |||
873 | return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0); | 873 | return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0); |
874 | } | 874 | } |
875 | 875 | ||
876 | #define mmMC_SEQ_MISC0_FIJI 0xA71 | ||
877 | |||
876 | static int gmc_v8_0_sw_init(void *handle) | 878 | static int gmc_v8_0_sw_init(void *handle) |
877 | { | 879 | { |
878 | int r; | 880 | int r; |
@@ -882,7 +884,12 @@ static int gmc_v8_0_sw_init(void *handle) | |||
882 | if (adev->flags & AMD_IS_APU) { | 884 | if (adev->flags & AMD_IS_APU) { |
883 | adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; | 885 | adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; |
884 | } else { | 886 | } else { |
885 | u32 tmp = RREG32(mmMC_SEQ_MISC0); | 887 | u32 tmp; |
888 | |||
889 | if (adev->asic_type == CHIP_FIJI) | ||
890 | tmp = RREG32(mmMC_SEQ_MISC0_FIJI); | ||
891 | else | ||
892 | tmp = RREG32(mmMC_SEQ_MISC0); | ||
886 | tmp &= MC_SEQ_MISC0__MT__MASK; | 893 | tmp &= MC_SEQ_MISC0__MT__MASK; |
887 | adev->mc.vram_type = gmc_v8_0_convert_vram_type(tmp); | 894 | adev->mc.vram_type = gmc_v8_0_convert_vram_type(tmp); |
888 | } | 895 | } |