drm/amd/display: Add dirty rect support for Replay
authorBhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Tue, 22 Aug 2023 14:02:46 +0000 (10:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 11 Sep 2023 22:18:53 +0000 (18:18 -0400)
Dirty rect can be used with replay, so enable them to allow for more
powersaving.

Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@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

index 954906c515aa9b43b424d3228a5eb12e270562c0..ca129983a08b22f2f634dfd1e6141eb368d20a4c 100644 (file)
@@ -8078,7 +8078,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
                bundle->surface_updates[planes_count].plane_info =
                        &bundle->plane_infos[planes_count];
 
-               if (acrtc_state->stream->link->psr_settings.psr_feature_enabled) {
+               if (acrtc_state->stream->link->psr_settings.psr_feature_enabled ||
+                   acrtc_state->stream->link->replay_settings.replay_feature_enabled) {
                        fill_dc_dirty_rects(plane, old_plane_state,
                                            new_plane_state, new_crtc_state,
                                            &bundle->flip_addrs[planes_count],