drm/amd/powerplay: Use defined constants for minium engine clock
[cascardo/linux.git] / drivers / gpu / drm / amd / powerplay / hwmgr / fiji_hwmgr.c
index 55e877c..c574afd 100644 (file)
@@ -465,14 +465,14 @@ static int fiji_set_private_data_based_on_pptable(struct pp_hwmgr *hwmgr)
                        table_info->vdd_dep_on_mclk;
 
        PP_ASSERT_WITH_CODE(allowed_sclk_vdd_table != NULL,
-               "VDD dependency on SCLK table is missing.       \
+               "VDD dependency on SCLK table is missing.       \
                This table is mandatory", return -EINVAL);
        PP_ASSERT_WITH_CODE(allowed_sclk_vdd_table->count >= 1,
-               "VDD dependency on SCLK table has to have is missing.   \
+               "VDD dependency on SCLK table has to have is missing.   \
                This table is mandatory", return -EINVAL);
 
        PP_ASSERT_WITH_CODE(allowed_mclk_vdd_table != NULL,
-               "VDD dependency on MCLK table is missing.       \
+               "VDD dependency on MCLK table is missing.       \
                This table is mandatory", return -EINVAL);
        PP_ASSERT_WITH_CODE(allowed_mclk_vdd_table->count >= 1,
                "VDD dependency on MCLK table has to have is missing.    \
@@ -1903,7 +1903,8 @@ static uint8_t fiji_get_sleep_divider_id_from_clock(struct pp_hwmgr *hwmgr,
 {
        uint8_t i;
        uint32_t temp;
-       uint32_t min = clock_insr > 2500 ? clock_insr : 2500;
+       uint32_t min = clock_insr > FIJI_MINIMUM_ENGINE_CLOCK ?
+                       clock_insr : FIJI_MINIMUM_ENGINE_CLOCK;
 
        PP_ASSERT_WITH_CODE((clock >= min), "Engine clock can't satisfy stutter requirement!", return 0);
        for (i = FIJI_MAX_DEEPSLEEP_DIVIDER_ID;  ; i--) {