]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Disable IPS when it is not allowed.
authorJinZe.Xu <jinze.xu@amd.com>
Thu, 30 May 2024 10:32:33 +0000 (18:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:18:25 +0000 (16:18 -0400)
[Why&How]
Add flag to disable IPS when it is not allowed.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: JinZe.Xu <jinze.xu@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/dc.h
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c

index 1008cab97c76737f53ac57e8cbad9379bca2ad0c..c97d9b9d5c17c911e67fbf35be0be73826ede0a0 100644 (file)
@@ -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;
index 12687d4000929ad1b239fef4a327d4243bc9a564..3e4abfa6d5174ec9ba3dd77127b0f53afee8ff53 100644 (file)
@@ -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;