From: JinZe.Xu Date: Thu, 30 May 2024 10:32:33 +0000 (+0800) Subject: drm/amd/display: Disable IPS when it is not allowed. X-Git-Tag: v6.11-rc1~141^2~18^2~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4316107bd083feeaa3b7af71d32be9dc4b2e0fc9;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Disable IPS when it is not allowed. [Why&How] Add flag to disable IPS when it is not allowed. Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: JinZe.Xu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 1008cab97c767..c97d9b9d5c17c 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -924,6 +924,7 @@ struct dc_debug_options { bool disable_z9_mpc; unsigned int force_fclk_khz; bool enable_tri_buf; + bool ips_disallow_entry; bool dmub_offload_enabled; bool dmcub_emulation; bool disable_idle_power_optimizations; diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index 12687d4000929..3e4abfa6d5174 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -1506,6 +1506,8 @@ void dc_dmub_srv_apply_idle_power_optimizations(const struct dc *dc, bool allow_ if (!dc_dmub_srv || !dc_dmub_srv->dmub) return; + allow_idle &= (!dc->debug.ips_disallow_entry); + if (dc_dmub_srv->idle_allowed == allow_idle) return;