From: Monk Liu Date: Thu, 23 Apr 2020 03:09:23 +0000 (+0800) Subject: drm/amdgpu: skip cg/pg set for SRIOV X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2f5a0a91191a5a86d81f17dd86b89dcf18e2a987;p=linux.git drm/amdgpu: skip cg/pg set for SRIOV Signed-off-by: Monk Liu Acked-by: Yintian Tao Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index e1687e408e1d2..97659be2cf36a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -7095,6 +7095,10 @@ static int gfx_v10_0_set_powergating_state(void *handle, { struct amdgpu_device *adev = (struct amdgpu_device *)handle; bool enable = (state == AMD_PG_STATE_GATE); + + if (amdgpu_sriov_vf(adev)) + return 0; + switch (adev->asic_type) { case CHIP_NAVI10: case CHIP_NAVI14: @@ -7115,6 +7119,9 @@ static int gfx_v10_0_set_clockgating_state(void *handle, { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (amdgpu_sriov_vf(adev)) + return 0; + switch (adev->asic_type) { case CHIP_NAVI10: case CHIP_NAVI14: