diff options
| author | Mukul Joshi <mukul.joshi@amd.com> | 2020-09-11 17:24:14 -0400 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2020-09-15 17:52:39 -0400 | 
| commit | 62f6b1162e91a4d31c17ed13ff7c2dcc86eda501 (patch) | |
| tree | 2388ccbe501e254ccf36855e6d9a1b3cca3dca6a /drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | |
| parent | 6d90a208cfff94c519caaecbc5da3af3929bf374 (diff) | |
drm/amdgpu: Enable SDMA utilization for Arcturus
SDMA utilization calculations are enabled/disabled by
writing to SDMAx_PUB_DUMMY_REG2 register. Currently,
enable this only for Arcturus.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 856c50386c86..edea8743f26e 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1063,6 +1063,15 @@ static void sdma_v4_0_ctx_switch_enable(struct amdgpu_device *adev, bool enable)  			WREG32_SDMA(i, mmSDMA0_PHASE2_QUANTUM, phase_quantum);  		}  		WREG32_SDMA(i, mmSDMA0_CNTL, f32_cntl); + +		/* +		 * Enable SDMA utilization. Its only supported on +		 * Arcturus for the moment and firmware version 14 +		 * and above. +		 */ +		if (adev->asic_type == CHIP_ARCTURUS && +		    adev->sdma.instance[i].fw_version >= 14) +			WREG32_SDMA(i, mmSDMA0_PUB_DUMMY_REG2, enable);  	}  } | 
