Commit 057fef20 authored by Victor Lu's avatar Victor Lu Committed by Alex Deucher
Browse files

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.

Signed-off-by: default avatarVictor Lu <victorchengchi.lu@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 20c34e5c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
{
	uint64_t value;

	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);

	if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
		/* 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);