]> git.infradead.org Git - nvme.git/commitdiff
drm/amd/display: Allow IPS2 during Replay
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 7 Dec 2023 19:12:03 +0000 (14:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Jan 2024 21:00:24 +0000 (16:00 -0500)
[Why & How]
Add regkey to block video playback in IPS2 by default

Allow idle optimizations in the same spot we allow Replay for
video playback usecases.

Avoid sending it when there's an external display connected by
modifying the allow idle checks to check for active non-eDP screens.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c

index d4f525b66a09055909e163b815beee357f28d19d..5552d30a6d971f1ce6792761c3a96d23b532e0c5 100644 (file)
@@ -1717,6 +1717,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.flags.disable_ips = DMUB_IPS_DISABLE_ALL;
 
+       init_data.flags.disable_ips_in_vpb = 1;
+
        /* Enable DWB for tested platforms only */
        if (amdgpu_ip_version(adev, DCE_HWIP, 0) >= IP_VERSION(3, 0, 0))
                init_data.num_virtual_links = 1;
index 5d7aa882416b3435a5dcfbaf502a9f326981bc81..c9317ea0258ea1cb2f686830fddc7469158966cc 100644 (file)
@@ -434,6 +434,7 @@ struct dc_config {
        bool EnableMinDispClkODM;
        bool enable_auto_dpm_test_logs;
        unsigned int disable_ips;
+       unsigned int disable_ips_in_vpb;
 };
 
 enum visual_confirm {
index 9c806385ecbdcce6c0d14f949ea41879758969f7..8b6c49622f3b63c8e6dae68c507e1e45c5a736a2 100644 (file)
@@ -680,7 +680,7 @@ void dcn35_power_down_on_boot(struct dc *dc)
 bool dcn35_apply_idle_power_optimizations(struct dc *dc, bool enable)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
-       int edp_num;
+       int i, edp_num;
        if (dc->debug.dmcub_emulation)
                return true;
 
@@ -688,6 +688,13 @@ bool dcn35_apply_idle_power_optimizations(struct dc *dc, bool enable)
                dc_get_edp_links(dc, edp_links, &edp_num);
                if (edp_num == 0 || edp_num > 1)
                        return false;
+
+               for (i = 0; i < dc->current_state->stream_count; ++i) {
+                       struct dc_stream_state *stream = dc->current_state->streams[i];
+
+                       if (!stream->dpms_off && !dc_is_embedded_signal(stream->signal))
+                               return false;
+               }
        }
 
        // TODO: review other cases when idle optimization is allowed