Commit ba02636d authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amdgpu: enable gfxoff code path for navi14

Based on navi10 gfxoff logic, enable the related code
path for navi14.
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0377b088
...@@ -998,9 +998,7 @@ static int psp_np_fw_load(struct psp_context *psp) ...@@ -998,9 +998,7 @@ static int psp_np_fw_load(struct psp_context *psp)
return ret; return ret;
/* Start rlc autoload after psp recieved all the gfx firmware */ /* Start rlc autoload after psp recieved all the gfx firmware */
if (ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM || if (ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM) {
(adev->asic_type == CHIP_NAVI14 &&
ucode->ucode_id == AMDGPU_UCODE_ID_RLC_G)) {
ret = psp_rlc_autoload(psp); ret = psp_rlc_autoload(psp);
if (ret) { if (ret) {
DRM_ERROR("Failed to start rlc autoload\n"); DRM_ERROR("Failed to start rlc autoload\n");
......
...@@ -4105,6 +4105,7 @@ static int gfx_v10_0_set_powergating_state(void *handle, ...@@ -4105,6 +4105,7 @@ static int gfx_v10_0_set_powergating_state(void *handle,
bool enable = (state == AMD_PG_STATE_GATE) ? true : false; bool enable = (state == AMD_PG_STATE_GATE) ? true : false;
switch (adev->asic_type) { switch (adev->asic_type) {
case CHIP_NAVI10: case CHIP_NAVI10:
case CHIP_NAVI14:
if (!enable) { if (!enable) {
amdgpu_gfx_off_ctrl(adev, false); amdgpu_gfx_off_ctrl(adev, false);
cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work); cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
......
...@@ -559,9 +559,6 @@ static int smu_early_init(void *handle) ...@@ -559,9 +559,6 @@ static int smu_early_init(void *handle)
smu->pm_enabled = !!amdgpu_dpm; smu->pm_enabled = !!amdgpu_dpm;
mutex_init(&smu->mutex); mutex_init(&smu->mutex);
if (adev->asic_type == CHIP_NAVI14)
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
return smu_set_funcs(adev); return smu_set_funcs(adev);
} }
......
...@@ -1359,6 +1359,7 @@ static int smu_v11_0_gfx_off_control(struct smu_context *smu, bool enable) ...@@ -1359,6 +1359,7 @@ static int smu_v11_0_gfx_off_control(struct smu_context *smu, bool enable)
case CHIP_VEGA20: case CHIP_VEGA20:
break; break;
case CHIP_NAVI10: case CHIP_NAVI10:
case CHIP_NAVI14:
if (!(adev->pm.pp_feature & PP_GFXOFF_MASK)) if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
return 0; return 0;
mutex_lock(&smu->mutex); mutex_lock(&smu->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment