aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeromeHong <[email protected]>2022-08-25 15:52:11 +0800
committerAlex Deucher <[email protected]>2022-09-13 14:33:00 -0400
commitb04fa59a51e80eae9883a419e41b1bf8179e5a42 (patch)
tree33bb0a820381c60a54310a42710c159e941cecd9
parent34955a1e797d074e72d0ac6a514d934d8fe80da1 (diff)
drm/amd/display: Avoid force minimal transaction in case of surface_count equal to 0
[why] Call commit_minimal_transition_state wrongly in case of surface_count equal to 0. [how] Add a condition to filter case of surface_count equal to 0. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Pavle Kotarac <[email protected]> Signed-off-by: JeromeHong <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 7481801c6d7c..253dc4e35ba4 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3625,11 +3625,13 @@ bool dc_update_planes_and_stream(struct dc *dc,
dc->current_state->stream_count > 0 &&
dc->debug.pipe_split_policy != MPC_SPLIT_AVOID) {
/* determine if minimal transition is required */
- if (cur_stream_status->plane_count > surface_count) {
- force_minimal_pipe_splitting = true;
- } else if (cur_stream_status->plane_count < surface_count) {
- force_minimal_pipe_splitting = true;
- is_plane_addition = true;
+ if (surface_count > 0) {
+ if (cur_stream_status->plane_count > surface_count) {
+ force_minimal_pipe_splitting = true;
+ } else if (cur_stream_status->plane_count < surface_count) {
+ force_minimal_pipe_splitting = true;
+ is_plane_addition = true;
+ }
}
}