drm/amd/powerplay: use struct amd_pm_funcs in powerplay
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / powerplay / hwmgr / rv_hwmgr.c
index 4c7f430..603035a 100644 (file)
 #include "pp_soc15.h"
 
 #define RAVEN_MAX_DEEPSLEEP_DIVIDER_ID     5
-#define RAVEN_MINIMUM_ENGINE_CLOCK         800   //8Mhz, the low boundary of engine clock allowed on this chip
+#define RAVEN_MINIMUM_ENGINE_CLOCK         800   /* 8Mhz, the low boundary of engine clock allowed on this chip */
 #define SCLK_MIN_DIV_INTV_SHIFT         12
-#define RAVEN_DISPCLK_BYPASS_THRESHOLD     10000 //100mhz
+#define RAVEN_DISPCLK_BYPASS_THRESHOLD     10000 /* 100Mhz */
 #define SMC_RAM_END                     0x40000
 
 static const unsigned long PhwRaven_Magic = (unsigned long) PHM_Rv_Magic;
+
+
 int rv_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
                struct pp_display_clock_request *clock_req);
 
-struct phm_vq_budgeting_record rv_vqtable[] = {
-       /* _TBD
-        * CUs, SSP low, SSP High, Min Sclk Low, Min Sclk, High, AWD/non-AWD, DCLK, ECLK, Sustainable Sclk, Sustainable CUs */
-       { 8, 0, 45, 0, 0, VQ_DisplayConfig_NoneAWD, 80000, 120000, 4, 0 },
-};
 
 static struct rv_power_state *cast_rv_ps(struct pp_hw_power_state *hw_ps)
 {
@@ -70,101 +67,27 @@ static const struct rv_power_state *cast_const_rv_ps(
        return (struct rv_power_state *)hw_ps;
 }
 
-static int rv_init_vq_budget_table(struct pp_hwmgr *hwmgr)
-{
-       uint32_t table_size, i;
-       struct phm_vq_budgeting_table *ptable;
-       uint32_t num_entries = ARRAY_SIZE(rv_vqtable);
-
-       if (hwmgr->dyn_state.vq_budgeting_table != NULL)
-               return 0;
-
-       table_size = sizeof(struct phm_vq_budgeting_table) +
-                       sizeof(struct phm_vq_budgeting_record) * (num_entries - 1);
-
-       ptable = kzalloc(table_size, GFP_KERNEL);
-       if (NULL == ptable)
-               return -ENOMEM;
-
-       ptable->numEntries = (uint8_t) num_entries;
-
-       for (i = 0; i < ptable->numEntries; i++) {
-               ptable->entries[i].ulCUs = rv_vqtable[i].ulCUs;
-               ptable->entries[i].ulSustainableSOCPowerLimitLow = rv_vqtable[i].ulSustainableSOCPowerLimitLow;
-               ptable->entries[i].ulSustainableSOCPowerLimitHigh = rv_vqtable[i].ulSustainableSOCPowerLimitHigh;
-               ptable->entries[i].ulMinSclkLow = rv_vqtable[i].ulMinSclkLow;
-               ptable->entries[i].ulMinSclkHigh = rv_vqtable[i].ulMinSclkHigh;
-               ptable->entries[i].ucDispConfig = rv_vqtable[i].ucDispConfig;
-               ptable->entries[i].ulDClk = rv_vqtable[i].ulDClk;
-               ptable->entries[i].ulEClk = rv_vqtable[i].ulEClk;
-               ptable->entries[i].ulSustainableSclk = rv_vqtable[i].ulSustainableSclk;
-               ptable->entries[i].ulSustainableCUs = rv_vqtable[i].ulSustainableCUs;
-       }
-
-       hwmgr->dyn_state.vq_budgeting_table = ptable;
-
-       return 0;
-}
-
 static int rv_initialize_dpm_defaults(struct pp_hwmgr *hwmgr)
 {
        struct rv_hwmgr *rv_hwmgr = (struct rv_hwmgr *)(hwmgr->backend);
-       struct cgs_system_info sys_info = {0};
-       int result;
 
-       rv_hwmgr->ddi_power_gating_disabled = 0;
-       rv_hwmgr->bapm_enabled = 1;
        rv_hwmgr->dce_slow_sclk_threshold = 30000;
-       rv_hwmgr->disable_driver_thermal_policy = 1;
        rv_hwmgr->thermal_auto_throttling_treshold = 0;
        rv_hwmgr->is_nb_dpm_enabled = 1;
        rv_hwmgr->dpm_flags = 1;
-       rv_hwmgr->disable_smu_acp_s3_handshake = 1;
-       rv_hwmgr->disable_notify_smu_vpu_recovery = 0;
        rv_hwmgr->gfx_off_controled_by_driver = false;
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_DynamicM3Arbiter);
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_UVDPowerGating);
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_UVDDynamicPowerGating);
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_VCEPowerGating);
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_SamuPowerGating);
-
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_ACP);
+       rv_hwmgr->need_min_deep_sleep_dcefclk = true;
+       rv_hwmgr->num_active_display = 0;
+       rv_hwmgr->deep_sleep_dcefclk = 0;
 
        phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                                        PHM_PlatformCaps_SclkDeepSleep);
 
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                               PHM_PlatformCaps_GFXDynamicMGPowerGating);
-
        phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                                PHM_PlatformCaps_SclkThrottleLowNotification);
 
-       phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-                               PHM_PlatformCaps_DisableVoltageIsland);
-
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_DynamicUVDState);
-
-       sys_info.size = sizeof(struct cgs_system_info);
-       sys_info.info_id = CGS_SYSTEM_INFO_PG_FLAGS;
-       result = cgs_query_system_info(hwmgr->device, &sys_info);
-       if (!result) {
-               if (sys_info.value & AMD_PG_SUPPORT_GFX_DMG)
-                       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                                     PHM_PlatformCaps_GFXDynamicMGPowerGating);
-       }
-
+                               PHM_PlatformCaps_PowerPlaySupport);
        return 0;
 }
 
@@ -234,43 +157,34 @@ static int rv_construct_boot_state(struct pp_hwmgr *hwmgr)
        return 0;
 }
 
-static int rv_tf_set_clock_limit(struct pp_hwmgr *hwmgr, void *input,
-                               void *output, void *storage, int result)
+static int rv_set_clock_limit(struct pp_hwmgr *hwmgr, const void *input)
 {
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
        struct PP_Clocks clocks = {0};
        struct pp_display_clock_request clock_req;
 
        clocks.dcefClock = hwmgr->display_config.min_dcef_set_clk;
-       clocks.dcefClockInSR = hwmgr->display_config.min_dcef_deep_sleep_set_clk;
        clock_req.clock_type = amd_pp_dcf_clock;
        clock_req.clock_freq_in_khz = clocks.dcefClock * 10;
 
-       if (clocks.dcefClock == 0 && clocks.dcefClockInSR == 0)
-               clock_req.clock_freq_in_khz = rv_data->dcf_actual_hard_min_freq;
-
        PP_ASSERT_WITH_CODE(!rv_display_clock_voltage_request(hwmgr, &clock_req),
                                "Attempt to set DCF Clock Failed!", return -EINVAL);
 
-       if(rv_data->need_min_deep_sleep_dcefclk && 0 != clocks.dcefClockInSR)
+       if (((hwmgr->uvd_arbiter.vclk_soft_min / 100) != rv_data->vclk_soft_min) ||
+           ((hwmgr->uvd_arbiter.dclk_soft_min / 100) != rv_data->dclk_soft_min)) {
+               rv_data->vclk_soft_min = hwmgr->uvd_arbiter.vclk_soft_min / 100;
+               rv_data->dclk_soft_min = hwmgr->uvd_arbiter.dclk_soft_min / 100;
                smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
-                                       PPSMC_MSG_SetMinDeepSleepDcefclk,
-                                       clocks.dcefClockInSR / 100);
-       /*
-       if(!rv_data->isp_tileA_power_gated || !rv_data->isp_tileB_power_gated) {
-               if ((hwmgr->ispArbiter.iclk != 0) && (rv_data->ISPActualHardMinFreq != (hwmgr->ispArbiter.iclk / 100) )) {
-                       smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
-                                       PPSMC_MSG_SetHardMinIspclkByFreq, hwmgr->ispArbiter.iclk / 100);
-                       rv_read_arg_from_smc(hwmgr->smumgr, &rv_data->ISPActualHardMinFreq),
-               }
-       } */
+                       PPSMC_MSG_SetSoftMinVcn,
+                       (rv_data->vclk_soft_min << 16) | rv_data->vclk_soft_min);
+       }
 
        if((hwmgr->gfx_arbiter.sclk_hard_min != 0) &&
                ((hwmgr->gfx_arbiter.sclk_hard_min / 100) != rv_data->soc_actual_hard_min_freq)) {
                smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
                                        PPSMC_MSG_SetHardMinSocclkByFreq,
                                        hwmgr->gfx_arbiter.sclk_hard_min / 100);
-                       rv_read_arg_from_smc(hwmgr->smumgr, &rv_data->soc_actual_hard_min_freq);
+               rv_read_arg_from_smc(hwmgr->smumgr, &rv_data->soc_actual_hard_min_freq);
        }
 
        if ((hwmgr->gfx_arbiter.gfxclk != 0) &&
@@ -292,35 +206,39 @@ static int rv_tf_set_clock_limit(struct pp_hwmgr *hwmgr, void *input,
        return 0;
 }
 
-static int rv_tf_set_num_active_display(struct pp_hwmgr *hwmgr, void *input,
-                               void *output, void *storage, int result)
+static int rv_set_deep_sleep_dcefclk(struct pp_hwmgr *hwmgr, uint32_t clock)
 {
-       uint32_t  num_of_active_displays = 0;
-       struct cgs_display_info info = {0};
+       struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
+
+       if (rv_data->need_min_deep_sleep_dcefclk && rv_data->deep_sleep_dcefclk != clock/100) {
+               rv_data->deep_sleep_dcefclk = clock/100;
+               smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
+                                       PPSMC_MSG_SetMinDeepSleepDcefclk,
+                                       rv_data->deep_sleep_dcefclk);
+       }
+       return 0;
+}
 
-       cgs_get_active_displays_info(hwmgr->device, &info);
-       num_of_active_displays = info.display_count;
+static int rv_set_active_display_count(struct pp_hwmgr *hwmgr, uint32_t count)
+{
+       struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
 
-       smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
+       if (rv_data->num_active_display != count) {
+               rv_data->num_active_display = count;
+               smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
                                PPSMC_MSG_SetDisplayCount,
-                               num_of_active_displays);
+                               rv_data->num_active_display);
+       }
+
        return 0;
 }
 
-static const struct phm_master_table_item rv_set_power_state_list[] = {
-       { NULL, rv_tf_set_clock_limit },
-       { NULL, rv_tf_set_num_active_display },
-       { }
-};
-
-static const struct phm_master_table_header rv_set_power_state_master = {
-       0,
-       PHM_MasterTableFlag_None,
-       rv_set_power_state_list
-};
+static int rv_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input)
+{
+       return rv_set_clock_limit(hwmgr, input);
+}
 
-static int rv_tf_init_power_gate_state(struct pp_hwmgr *hwmgr, void *input,
-                               void *output, void *storage, int result)
+static int rv_init_power_gate_state(struct pp_hwmgr *hwmgr)
 {
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
 
@@ -331,20 +249,13 @@ static int rv_tf_init_power_gate_state(struct pp_hwmgr *hwmgr, void *input,
        return 0;
 }
 
-static const struct phm_master_table_item rv_setup_asic_list[] = {
-       { .tableFunction = rv_tf_init_power_gate_state },
-       { }
-};
 
-static const struct phm_master_table_header rv_setup_asic_master = {
-       0,
-       PHM_MasterTableFlag_None,
-       rv_setup_asic_list
-};
+static int rv_setup_asic_task(struct pp_hwmgr *hwmgr)
+{
+       return rv_init_power_gate_state(hwmgr);
+}
 
-static int rv_tf_reset_cc6_data(struct pp_hwmgr *hwmgr,
-                                       void *input, void *output,
-                                       void *storage, int result)
+static int rv_reset_cc6_data(struct pp_hwmgr *hwmgr)
 {
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
 
@@ -356,21 +267,12 @@ static int rv_tf_reset_cc6_data(struct pp_hwmgr *hwmgr,
        return 0;
 }
 
-static const struct phm_master_table_item rv_power_down_asic_list[] = {
-       { .tableFunction = rv_tf_reset_cc6_data },
-       { }
-};
-
-static const struct phm_master_table_header rv_power_down_asic_master = {
-       0,
-       PHM_MasterTableFlag_None,
-       rv_power_down_asic_list
-};
-
+static int rv_power_off_asic(struct pp_hwmgr *hwmgr)
+{
+       return rv_reset_cc6_data(hwmgr);
+}
 
-static int rv_tf_disable_gfx_off(struct pp_hwmgr *hwmgr,
-                                               void *input, void *output,
-                                               void *storage, int result)
+static int rv_disable_gfx_off(struct pp_hwmgr *hwmgr)
 {
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
 
@@ -381,21 +283,12 @@ static int rv_tf_disable_gfx_off(struct pp_hwmgr *hwmgr,
        return 0;
 }
 
-static const struct phm_master_table_item rv_disable_dpm_list[] = {
-       {NULL, rv_tf_disable_gfx_off},
-       { },
-};
-
-
-static const struct phm_master_table_header rv_disable_dpm_master = {
-       0,
-       PHM_MasterTableFlag_None,
-       rv_disable_dpm_list
-};
+static int rv_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
+{
+       return rv_disable_gfx_off(hwmgr);
+}
 
-static int rv_tf_enable_gfx_off(struct pp_hwmgr *hwmgr,
-                                               void *input, void *output,
-                                               void *storage, int result)
+static int rv_enable_gfx_off(struct pp_hwmgr *hwmgr)
 {
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
 
@@ -406,16 +299,10 @@ static int rv_tf_enable_gfx_off(struct pp_hwmgr *hwmgr,
        return 0;
 }
 
-static const struct phm_master_table_item rv_enable_dpm_list[] = {
-       {NULL, rv_tf_enable_gfx_off},
-       { },
-};
-
-static const struct phm_master_table_header rv_enable_dpm_master = {
-       0,
-       PHM_MasterTableFlag_None,
-       rv_enable_dpm_list
-};
+static int rv_enable_dpm_tasks(struct pp_hwmgr *hwmgr)
+{
+       return rv_enable_gfx_off(hwmgr);
+}
 
 static int rv_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
                                struct pp_power_state  *prequest_ps,
@@ -554,9 +441,6 @@ static int rv_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
                return result;
        }
 
-       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                PHM_PlatformCaps_PowerPlaySupport);
-
        rv_populate_clock_table(hwmgr);
 
        result = rv_get_system_info_data(hwmgr);
@@ -567,40 +451,6 @@ static int rv_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
 
        rv_construct_boot_state(hwmgr);
 
-       result = phm_construct_table(hwmgr, &rv_setup_asic_master,
-                               &(hwmgr->setup_asic));
-       if (result != 0) {
-               pr_err("Fail to construct setup ASIC\n");
-               return result;
-       }
-
-       result = phm_construct_table(hwmgr, &rv_power_down_asic_master,
-                               &(hwmgr->power_down_asic));
-       if (result != 0) {
-               pr_err("Fail to construct power down ASIC\n");
-               return result;
-       }
-
-       result = phm_construct_table(hwmgr, &rv_set_power_state_master,
-                               &(hwmgr->set_power_state));
-       if (result != 0) {
-               pr_err("Fail to construct set_power_state\n");
-               return result;
-       }
-
-       result = phm_construct_table(hwmgr, &rv_disable_dpm_master,
-                               &(hwmgr->disable_dynamic_state_management));
-       if (result != 0) {
-               pr_err("Fail to disable_dynamic_state\n");
-               return result;
-       }
-       result = phm_construct_table(hwmgr, &rv_enable_dpm_master,
-                               &(hwmgr->enable_dynamic_state_management));
-       if (result != 0) {
-               pr_err("Fail to enable_dynamic_state\n");
-               return result;
-       }
-
        hwmgr->platform_descriptor.hardwareActivityPerformanceLevels =
                                                RAVEN_MAX_HARDWARE_POWERLEVELS;
 
@@ -615,8 +465,6 @@ static int rv_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
 
        hwmgr->platform_descriptor.minimumClocksReductionPercentage = 50;
 
-       rv_init_vq_budget_table(hwmgr);
-
        return result;
 }
 
@@ -625,46 +473,21 @@ static int rv_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
        struct rv_hwmgr *rv_data = (struct rv_hwmgr *)(hwmgr->backend);
        struct rv_clock_voltage_information *pinfo = &(rv_data->clock_vol_info);
 
-       phm_destroy_table(hwmgr, &(hwmgr->set_power_state));
-       phm_destroy_table(hwmgr, &(hwmgr->enable_dynamic_state_management));
-       phm_destroy_table(hwmgr, &(hwmgr->disable_dynamic_state_management));
-       phm_destroy_table(hwmgr, &(hwmgr->power_down_asic));
-       phm_destroy_table(hwmgr, &(hwmgr->setup_asic));
-
-       if (pinfo->vdd_dep_on_dcefclk) {
-               kfree(pinfo->vdd_dep_on_dcefclk);
-               pinfo->vdd_dep_on_dcefclk = NULL;
-       }
-       if (pinfo->vdd_dep_on_socclk) {
-               kfree(pinfo->vdd_dep_on_socclk);
-               pinfo->vdd_dep_on_socclk = NULL;
-       }
-       if (pinfo->vdd_dep_on_fclk) {
-               kfree(pinfo->vdd_dep_on_fclk);
-               pinfo->vdd_dep_on_fclk = NULL;
-       }
-       if (pinfo->vdd_dep_on_dispclk) {
-               kfree(pinfo->vdd_dep_on_dispclk);
-               pinfo->vdd_dep_on_dispclk = NULL;
-       }
-       if (pinfo->vdd_dep_on_dppclk) {
-               kfree(pinfo->vdd_dep_on_dppclk);
-               pinfo->vdd_dep_on_dppclk = NULL;
-       }
-       if (pinfo->vdd_dep_on_phyclk) {
-               kfree(pinfo->vdd_dep_on_phyclk);
-               pinfo->vdd_dep_on_phyclk = NULL;
-       }
-
-       if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) {
-               kfree(hwmgr->dyn_state.vddc_dep_on_dal_pwrl);
-               hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
-       }
-
-       if (NULL != hwmgr->dyn_state.vq_budgeting_table) {
-               kfree(hwmgr->dyn_state.vq_budgeting_table);
-               hwmgr->dyn_state.vq_budgeting_table = NULL;
-       }
+       kfree(pinfo->vdd_dep_on_dcefclk);
+       pinfo->vdd_dep_on_dcefclk = NULL;
+       kfree(pinfo->vdd_dep_on_socclk);
+       pinfo->vdd_dep_on_socclk = NULL;
+       kfree(pinfo->vdd_dep_on_fclk);
+       pinfo->vdd_dep_on_fclk = NULL;
+       kfree(pinfo->vdd_dep_on_dispclk);
+       pinfo->vdd_dep_on_dispclk = NULL;
+       kfree(pinfo->vdd_dep_on_dppclk);
+       pinfo->vdd_dep_on_dppclk = NULL;
+       kfree(pinfo->vdd_dep_on_phyclk);
+       pinfo->vdd_dep_on_phyclk = NULL;
+
+       kfree(hwmgr->dyn_state.vddc_dep_on_dal_pwrl);
+       hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
 
        kfree(hwmgr->backend);
        hwmgr->backend = NULL;
@@ -678,12 +501,12 @@ static int rv_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
        return 0;
 }
 
-static int rv_dpm_get_mclk(struct pp_hwmgr *hwmgr, bool low)
+static uint32_t rv_dpm_get_mclk(struct pp_hwmgr *hwmgr, bool low)
 {
        return 0;
 }
 
-static int rv_dpm_get_sclk(struct pp_hwmgr *hwmgr, bool low)
+static uint32_t rv_dpm_get_sclk(struct pp_hwmgr *hwmgr, bool low)
 {
        return 0;
 }
@@ -702,18 +525,9 @@ static int rv_dpm_get_pp_table_entry_callback(
 {
        struct rv_power_state *rv_ps = cast_rv_ps(hw_ps);
 
-       const ATOM_PPLIB_CZ_CLOCK_INFO *rv_clock_info = clock_info;
-
-       struct phm_clock_voltage_dependency_table *table =
-                                   hwmgr->dyn_state.vddc_dependency_on_sclk;
-       uint8_t clock_info_index = rv_clock_info->index;
-
-       if (clock_info_index > (uint8_t)(hwmgr->platform_descriptor.hardwareActivityPerformanceLevels - 1))
-               clock_info_index = (uint8_t)(hwmgr->platform_descriptor.hardwareActivityPerformanceLevels - 1);
-
-       rv_ps->levels[index].engine_clock = table->entries[clock_info_index].clk;
-       rv_ps->levels[index].vddc_index = (uint8_t)table->entries[clock_info_index].v;
+       rv_ps->levels[index].engine_clock = 0;
 
+       rv_ps->levels[index].vddc_index = 0;
        rv_ps->level = index + 1;
 
        if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_SclkDeepSleep)) {
@@ -805,12 +619,12 @@ static int rv_get_performance_level(struct pp_hwmgr *hwmgr, const struct pp_hw_p
        ps = cast_const_rv_ps(state);
 
        level_index = index > ps->level - 1 ? ps->level - 1 : index;
-       level->coreClock = ps->levels[level_index].engine_clock;
+       level->coreClock = 30000;
 
        if (designation == PHM_PerformanceLevelDesignation_PowerContainment) {
                for (i = 1; i < ps->level; i++) {
                        if (ps->levels[i].engine_clock > data->dce_slow_sclk_threshold) {
-                               level->coreClock = ps->levels[i].engine_clock;
+                               level->coreClock = 30000;
                                break;
                        }
                }
@@ -820,8 +634,9 @@ static int rv_get_performance_level(struct pp_hwmgr *hwmgr, const struct pp_hw_p
                vol_dep_record_index = data->clock_vol_info.vdd_dep_on_fclk->count - 1;
                level->memory_clock =
                        data->clock_vol_info.vdd_dep_on_fclk->entries[vol_dep_record_index].clk;
-       } else
+       } else {
                level->memory_clock = data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk;
+       }
 
        level->nonLocalMemoryFreq = 0;
        level->nonLocalMemoryWidth = 0;
@@ -992,7 +807,8 @@ int rv_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
 
 static int rv_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks)
 {
-       return -EINVAL;
+       clocks->engine_max_clock = 80000; /* driver can't get engine clock, temp hard code to 800MHz */
+       return 0;
 }
 
 static int rv_thermal_get_temperature(struct pp_hwmgr *hwmgr)
@@ -1049,6 +865,13 @@ static const struct pp_hwmgr_func rv_hwmgr_funcs = {
        .get_clock_by_type_with_voltage = rv_get_clock_by_type_with_voltage,
        .get_max_high_clocks = rv_get_max_high_clocks,
        .read_sensor = rv_read_sensor,
+       .set_active_display_count = rv_set_active_display_count,
+       .set_deep_sleep_dcefclk = rv_set_deep_sleep_dcefclk,
+       .dynamic_state_management_enable = rv_enable_dpm_tasks,
+       .power_off_asic = rv_power_off_asic,
+       .asic_setup = rv_setup_asic_task,
+       .power_state_set = rv_set_power_state_tasks,
+       .dynamic_state_management_disable = rv_disable_dpm_tasks,
 };
 
 int rv_init_function_pointers(struct pp_hwmgr *hwmgr)