]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/powerplay: lock grbm_gfx index when changing instance
authorTom St Denis <tom.stdenis@amd.com>
Tue, 12 Sep 2017 16:29:06 +0000 (12:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Sep 2017 16:10:11 +0000 (12:10 -0400)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c

index 8c264c195e1a51aca4332f41e2625906941dd0d3..0f75af33e581b414338bf682eb94d8235c547a5e 100644 (file)
@@ -746,6 +746,7 @@ int smu7_enable_didt_config(struct pp_hwmgr *hwmgr)
            PP_CAP(PHM_PlatformCaps_TCPRamping)) {
 
                cgs_enter_safe_mode(hwmgr->device, true);
+               cgs_lock_grbm_idx(hwmgr->device, true);
                value = 0;
                value2 = cgs_read_register(hwmgr->device, mmGRBM_GFX_INDEX);
                for (count = 0; count < num_se; count++) {
@@ -785,6 +786,7 @@ int smu7_enable_didt_config(struct pp_hwmgr *hwmgr)
                        PP_ASSERT_WITH_CODE((0 == result),
                                        "Failed to enable DPM DIDT.", return result);
                }
+               cgs_lock_grbm_idx(hwmgr->device, false);
                cgs_enter_safe_mode(hwmgr->device, false);
        }