Skip to content

Commit 49a30c3

Browse files
Wenjing Liualexdeucher
authored andcommitted
drm/amd/display: always switch off ODM before committing more streams
ODM power optimization is only supported with single stream. When ODM power optimization is enabled, we might not have enough free pipes for enabling other stream. So when we are committing more than 1 stream we should first switch off ODM power optimization to make room for new stream and then allocating pipe resource for the new stream. Cc: [email protected] Fixes: 59de751 ("drm/amd/display: add ODM case when looking for first split pipe") Reviewed-by: Dillon Varone <[email protected]> Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Wenjing Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5a3ccb1 commit 49a30c3

File tree

1 file changed

+5
-5
lines changed
  • drivers/gpu/drm/amd/display/dc/core

1 file changed

+5
-5
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,12 +2073,12 @@ enum dc_status dc_commit_streams(struct dc *dc,
20732073
}
20742074
}
20752075

2076-
/* Check for case where we are going from odm 2:1 to max
2077-
* pipe scenario. For these cases, we will call
2078-
* commit_minimal_transition_state() to exit out of odm 2:1
2079-
* first before processing new streams
2076+
/* ODM Combine 2:1 power optimization is only applied for single stream
2077+
* scenario, it uses extra pipes than needed to reduce power consumption
2078+
* We need to switch off this feature to make room for new streams.
20802079
*/
2081-
if (stream_count == dc->res_pool->pipe_count) {
2080+
if (stream_count > dc->current_state->stream_count &&
2081+
dc->current_state->stream_count == 1) {
20822082
for (i = 0; i < dc->res_pool->pipe_count; i++) {
20832083
pipe = &dc->current_state->res_ctx.pipe_ctx[i];
20842084
if (pipe->next_odm_pipe)

0 commit comments

Comments
 (0)