drm/amdgpu/gfx: set cg flags to enter/exit safe mode
authorjsg <jsg@openbsd.org>
Fri, 21 Apr 2023 03:45:40 +0000 (03:45 +0000)
committerjsg <jsg@openbsd.org>
Fri, 21 Apr 2023 03:45:40 +0000 (03:45 +0000)
From Jane Jian
8c1e247907b999fbd3bbcb0ad2074949fb0f55ae in linux-6.1.y/6.1.25
e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd in mainline linux

sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c

index e08d046..5c2050d 100644 (file)
@@ -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,