Skip to content

Commit 675d846

Browse files
effective-lightalexdeucher
authored andcommitted
drm/amd/display: only fill dirty rectangles when PSR is enabled
Currently, we are calling fill_dc_dirty_rects() even if PSR isn't supported by the relevant link in amdgpu_dm_commit_planes(), this is undesirable especially because when drm.debug is enabled we are printing messages in fill_dc_dirty_rects() that are only useful for debugging PSR (and confusing otherwise). So, we can instead limit the filling of dirty rectangles to only when PSR is enabled. Reviewed-by: Leo Li <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0c85c06 commit 675d846

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7622,9 +7622,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
76227622
bundle->surface_updates[planes_count].plane_info =
76237623
&bundle->plane_infos[planes_count];
76247624

7625-
fill_dc_dirty_rects(plane, old_plane_state, new_plane_state,
7626-
new_crtc_state,
7627-
&bundle->flip_addrs[planes_count]);
7625+
if (acrtc_state->stream->link->psr_settings.psr_feature_enabled)
7626+
fill_dc_dirty_rects(plane, old_plane_state,
7627+
new_plane_state, new_crtc_state,
7628+
&bundle->flip_addrs[planes_count]);
76287629

76297630
/*
76307631
* Only allow immediate flips for fast updates that don't

0 commit comments

Comments
 (0)