From: jsg Date: Fri, 21 Apr 2023 03:45:40 +0000 (+0000) Subject: drm/amdgpu/gfx: set cg flags to enter/exit safe mode X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d7007fb791ad1743a8284929dc32842c2211eeed;p=openbsd drm/amdgpu/gfx: set cg flags to enter/exit safe mode From Jane Jian 8c1e247907b999fbd3bbcb0ad2074949fb0f55ae in linux-6.1.y/6.1.25 e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c index e08d046e52c..5c2050dace0 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c @@ -1316,6 +1316,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,