diff options
author | Jane Jian <Jane.Jian@amd.com> | 2023-03-15 13:59:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 13:36:57 +0300 |
commit | b934a3752fbcc7c7791e504f9d8df787b37678e6 (patch) | |
tree | 283890fb21937e3f281dcdbceb880732214913f6 /drivers/gpu/drm/amd | |
parent | d711999534c40d9d7501cf4d9a94d6256e521d37 (diff) | |
download | linux-b934a3752fbcc7c7791e504f9d8df787b37678e6.tar.xz |
drm/amdgpu/gfx: set cg flags to enter/exit safe mode
[ Upstream commit e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd ]
sriov needs to enter/exit safe mode in update umd p state
add the cg flag to let it enter or exit while needed
Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index c748d92cec8e..ddb7b8651ab4 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -1315,6 +1315,11 @@ static int gfx_v11_0_sw_init(void *handle) break; } + /* Enable CG flag in one VF mode for enabling RLC safe mode enter/exit */ + if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(11, 0, 3) && + amdgpu_sriov_is_pp_one_vf(adev)) + adev->cg_flags = AMD_CG_SUPPORT_GFX_CGCG; + /* EOP Event */ r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP, GFX_11_0_0__SRCID__CP_EOP_INTERRUPT, |