drm/amd/display: Add disable_ips_in_dpms_off flag for IPS
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 12 Nov 2024 22:16:46 +0000 (17:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:26:48 +0000 (10:26 -0500)
[WHY]
It's possible we still allow IPS2 when all streams are DPMS off but this
is unexpected.

[HOW]
Pass the DM config value into DC so it can use the pure stream count
to decide. We will be in 0 streams for S0i3 so this will still allow
it for D3.

Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Hung <alex.hung@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 e9b9126c0401705da8e4d96fee96e18c06ea2773..ec64061080fa7097e437e1ee8738a764cf8ac3ed 100644 (file)
@@ -463,6 +463,7 @@ struct dc_config {
        bool enable_auto_dpm_test_logs;
        unsigned int disable_ips;
        unsigned int disable_ips_in_vpb;
+       bool disable_ips_in_dpms_off;
        bool usb4_bw_alloc_support;
        bool allow_0_dtb_clk;
        bool use_assr_psp_message;
index f90fc154549a8041b1aafd24e0b2cca4f1cf8033..775c58637f46ca4fa5edba5f851523e58d3a5da0 100644 (file)
@@ -1245,7 +1245,7 @@ static int count_active_streams(const struct dc *dc)
        for (i = 0; i < dc->current_state->stream_count; ++i) {
                struct dc_stream_state *stream = dc->current_state->streams[i];
 
-               if (stream && !stream->dpms_off)
+               if (stream && (!stream->dpms_off || dc->config.disable_ips_in_dpms_off))
                        count += 1;
        }