drm/amdgpu: Remove redundant logic in GC v9.4.3
authorLijo Lazar <lijo.lazar@amd.com>
Mon, 17 Feb 2025 05:11:56 +0000 (10:41 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Feb 2025 16:43:59 +0000 (11:43 -0500)
GFXOFF check is not needed for GC v9.4.3. Also, save/restore list is
available by default.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

index 91c1b2f9fe88bf8d6c50b6dba21b516a957e1f32..50eb856249d57abe2c4aa510d30474ed2ab7954e 100644 (file)
@@ -563,17 +563,6 @@ out:
        return err;
 }
 
-static bool gfx_v9_4_3_should_disable_gfxoff(struct pci_dev *pdev)
-{
-       return true;
-}
-
-static void gfx_v9_4_3_check_if_need_gfxoff(struct amdgpu_device *adev)
-{
-       if (gfx_v9_4_3_should_disable_gfxoff(adev->pdev))
-               adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
-}
-
 static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
                                          const char *chip_name)
 {
@@ -600,8 +589,6 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
        adev->gfx.mec2_fw_version = adev->gfx.mec_fw_version;
        adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;
 
-       gfx_v9_4_3_check_if_need_gfxoff(adev);
-
 out:
        if (err)
                amdgpu_ucode_release(&adev->gfx.mec_fw);
@@ -1362,10 +1349,8 @@ static void gfx_v9_4_3_xcc_init_pg(struct amdgpu_device *adev, int xcc_id)
 {
        /*
         * Rlc save restore list is workable since v2_1.
-        * And it's needed by gfxoff feature.
         */
-       if (adev->gfx.rlc.is_rlc_v2_1)
-               gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
+       gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
 }
 
 static void gfx_v9_4_3_xcc_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id)