drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Subsystems (2)
PATCH v2 1/3 drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
SRIOV VF does not have write access to AGP BAR regs. Skip the writes to avoid a dmesg warning.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +5 -5
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) {uint64_t value; -/* Program the AGP BAR */ -WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_BASE,0 ); -WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_BOT, adev->gmc.agp_start >>24 ); -WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_TOP, adev->gmc.agp_end >>24 ); -if (!amdgpu_sriov_vf (adev) || adev->asic_type <=CHIP_VEGA10 ) { +/* Program the AGP BAR */ +WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_BASE,0 ); +WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_BOT, adev->gmc.agp_start >>24 ); +WREG32_SOC15_RLC (GC ,0 , mmMC_VM_AGP_TOP, adev->gmc.agp_end >>24 ); +/* Program the system aperture low logical page number. */ WREG32_SOC15_RLC (GC ,0 , mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 );
Signature · 1 line
2.34.1
PATCH v2 2/3 drm/amdgpu: Do not write to GRBM_CNTL if Aldebaran SRIOV
Aldebaran SRIOV VF does not have write permissions to GRBM_CTNL. This access can be skipped to avoid a dmesg warning.
v2: Use GC IP version check instead of asic check
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -1
@@ -2637,7 +2637,10 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)u32 tmp;int i; -WREG32_FIELD15_RLC (GC ,0 ,GRBM_CNTL ,READ_TIMEOUT ,0xff ); +if (!amdgpu_sriov_vf (adev) || +amdgpu_ip_version (adev,GC_HWIP ,0 ) !=IP_VERSION (9 ,4 ,2 )) { +WREG32_FIELD15_RLC (GC ,0 ,GRBM_CNTL ,READ_TIMEOUT ,0xff ); + }gfx_v9_0_tiling_mode_table_init (adev);
Signature · 1 line
2.34.1
PATCH v2 3/3 drm/amdgpu: Do not set power brake sequence for Aldebaran SRIOV
In reply to Victor LuAldebaran SRIOV VF cannot access the power brake feature regs. The accesses can be skipped to avoid a dmesg warning.
v2: Remove redundant asic type check
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
@@ -4045,7 +4045,8 @@ static int gfx_v9_0_hw_init(struct amdgpu_ip_block *ip_block)if (r)return r; -if (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,2 )) +if (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,2 ) && + !amdgpu_sriov_vf (adev))gfx_v9_4_2_set_power_brake_sequence (adev);return r;
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] drm/amdgpu: Do not set power brake sequence for Aldebaran SRIOV
Series is:
Quoted 28 lines · Victor Lu
Aldebaran SRIOV VF cannot access the power brake feature regs. The accesses can be skipped to avoid a dmesg warning.
v2: Remove redundant asic type check
Signed-off-by Victor Lu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-2@@ -4045,7 +4045,8 @@ static int gfx_v9_0_hw_init(struct amdgpu_ip_block *ip_block)if (r)return r; -if (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,2 )) +if (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,2 ) && + !amdgpu_sriov_vf (adev))gfx_v9_4_2_set_power_brake_sequence (adev);return r; --2.34.1