drm/amd/display: Revert "drm/amd/display: Add a check for idle power optimization"
authorSung Joon Kim <sungkim@amd.com>
Thu, 28 Sep 2023 15:20:13 +0000 (11:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2023 20:59:23 +0000 (16:59 -0400)
Revert commit 434cf7af492f ("drm/amd/display: Add a check for idle power optimization")
Because it cause Freesync and S4 regression

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Sung Joon Kim <sungkim@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c

index baef5786ef721afc5a79f6c1478fc1c92d0ac181..f9aac215ef1ff3b5c9cc2db02a7e79318957f463 100644 (file)
@@ -4908,8 +4908,7 @@ bool dc_set_psr_allow_active(struct dc *dc, bool enable)
 
 void dc_allow_idle_optimizations(struct dc *dc, bool allow)
 {
-       if (dc->debug.disable_idle_power_optimizations ||
-               (dc->caps.ips_support && dc->config.disable_ips))
+       if (dc->debug.disable_idle_power_optimizations)
                return;
 
        if (dc->clk_mgr != NULL && dc->clk_mgr->funcs->is_smu_present)
@@ -4923,23 +4922,6 @@ void dc_allow_idle_optimizations(struct dc *dc, bool allow)
                dc->idle_optimizations_allowed = allow;
 }
 
-bool dc_is_idle_power_optimized(struct dc *dc)
-{
-       uint32_t idle_state = 0;
-
-       if (dc->debug.disable_idle_power_optimizations)
-               return false;
-
-       if (dc->hwss.get_idle_state)
-               idle_state = dc->hwss.get_idle_state(dc);
-
-       if ((idle_state & DMUB_IPS1_ALLOW_MASK) ||
-               (idle_state & DMUB_IPS2_ALLOW_MASK))
-               return true;
-
-       return false;
-}
-
 /* set min and max memory clock to lowest and highest DPM level, respectively */
 void dc_unlock_memory_clock_frequency(struct dc *dc)
 {
index 6130f2c146d7a51ba4995a1f3bc2945126aa49d1..2bd30a7773118fb1ea853b0993fe4e5d8833a103 100644 (file)
@@ -2317,7 +2317,6 @@ bool dc_is_plane_eligible_for_idle_optimizations(struct dc *dc, struct dc_plane_
                                struct dc_cursor_attributes *cursor_attr);
 
 void dc_allow_idle_optimizations(struct dc *dc, bool allow);
-bool dc_is_idle_power_optimized(struct dc *dc);
 
 /* set min and max memory clock to lowest and highest DPM level, respectively */
 void dc_unlock_memory_clock_frequency(struct dc *dc);
index e43e8d4bfe375e93f9e75d285e57bb41cffc44de..b99db771e071499ecbd7cffa7e00c8fab87c6ce8 100644 (file)
@@ -352,7 +352,6 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
                        funcs->init_reg_offsets = dmub_srv_dcn35_regs_init;
 
                        funcs->is_hw_powered_up = dmub_dcn35_is_hw_powered_up;
-                       funcs->should_detect = dmub_dcn35_should_detect;
                        break;
 
        default: