aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorFeifei Xu <Feifei.Xu@amd.com>2018-08-14 14:53:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 12:10:50 -0400
commitbfcea5204287b0a09dac71fa56a5d066d94d9bb1 (patch)
tree382de7f2b8da1e81233578e352817e840532dc14 /drivers/gpu/drm
parentd4e838431d56ac132a7f387b34e5c9f227dce428 (diff)
drm/amdgpu:change VEGA booting with firmware loaded by PSP
With PSP firmware loading, TMR mc address is supposed to be used. Signed-off-by: James Zhu <James.Zhu@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
index 79cb3787a282..a289f6a20b6b 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
@@ -671,9 +671,14 @@ static void uvd_v7_0_mc_resume(struct amdgpu_device *adev)
671 continue; 671 continue;
672 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { 672 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
673 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW, 673 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
674 lower_32_bits(adev->firmware.ucode[AMDGPU_UCODE_ID_UVD].mc_addr)); 674 i == 0 ?
675 adev->firmware.ucode[AMDGPU_UCODE_ID_UVD].tmr_mc_addr_lo:
676 adev->firmware.ucode[AMDGPU_UCODE_ID_UVD1].tmr_mc_addr_lo);
675 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH, 677 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
676 upper_32_bits(adev->firmware.ucode[AMDGPU_UCODE_ID_UVD].mc_addr)); 678 i == 0 ?
679 adev->firmware.ucode[AMDGPU_UCODE_ID_UVD].tmr_mc_addr_hi:
680 adev->firmware.ucode[AMDGPU_UCODE_ID_UVD1].tmr_mc_addr_hi);
681 WREG32_SOC15(UVD, i, mmUVD_VCPU_CACHE_OFFSET0, 0);
677 offset = 0; 682 offset = 0;
678 } else { 683 } else {
679 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW, 684 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
@@ -681,10 +686,10 @@ static void uvd_v7_0_mc_resume(struct amdgpu_device *adev)
681 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH, 686 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
682 upper_32_bits(adev->uvd.inst[i].gpu_addr)); 687 upper_32_bits(adev->uvd.inst[i].gpu_addr));
683 offset = size; 688 offset = size;
689 WREG32_SOC15(UVD, i, mmUVD_VCPU_CACHE_OFFSET0,
690 AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
684 } 691 }
685 692
686 WREG32_SOC15(UVD, i, mmUVD_VCPU_CACHE_OFFSET0,
687 AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
688 WREG32_SOC15(UVD, i, mmUVD_VCPU_CACHE_SIZE0, size); 693 WREG32_SOC15(UVD, i, mmUVD_VCPU_CACHE_SIZE0, size);
689 694
690 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW, 695 WREG32_SOC15(UVD, i, mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW,