diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-01-22 21:49:33 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:52:40 -0400 |
commit | ce137c04ff4bb7862a952e32d5200c301e620601 (patch) | |
tree | d8901a2063274fded4040c711756556e93581637 /drivers/gpu/drm/amd/amdgpu/vi.c | |
parent | cbabc8b343953e7bc6d70b5a22aaebbd73ae9934 (diff) |
drm/amdgpu:cg & pg shouldn't active on VF device
CG & PG function changes engine clock/gating, which is
not appropriate for VF device, because one vf doesn't know
the whole picture of engine's overall workload.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 4a785d6acfb9..7fa314c217c9 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c | |||
@@ -1391,6 +1391,9 @@ static int vi_common_set_clockgating_state(void *handle, | |||
1391 | { | 1391 | { |
1392 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 1392 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
1393 | 1393 | ||
1394 | if (amdgpu_sriov_vf(adev)) | ||
1395 | return 0; | ||
1396 | |||
1394 | switch (adev->asic_type) { | 1397 | switch (adev->asic_type) { |
1395 | case CHIP_FIJI: | 1398 | case CHIP_FIJI: |
1396 | vi_update_bif_medium_grain_light_sleep(adev, | 1399 | vi_update_bif_medium_grain_light_sleep(adev, |
@@ -1435,6 +1438,9 @@ static void vi_common_get_clockgating_state(void *handle, u32 *flags) | |||
1435 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 1438 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
1436 | int data; | 1439 | int data; |
1437 | 1440 | ||
1441 | if (amdgpu_sriov_vf(adev)) | ||
1442 | *flags = 0; | ||
1443 | |||
1438 | /* AMD_CG_SUPPORT_BIF_LS */ | 1444 | /* AMD_CG_SUPPORT_BIF_LS */ |
1439 | data = RREG32_PCIE(ixPCIE_CNTL2); | 1445 | data = RREG32_PCIE(ixPCIE_CNTL2); |
1440 | if (data & PCIE_CNTL2__SLV_MEM_LS_EN_MASK) | 1446 | if (data & PCIE_CNTL2__SLV_MEM_LS_EN_MASK) |