From: jsg Date: Tue, 19 Sep 2023 12:46:20 +0000 (+0000) Subject: drm/amd/display: always switch off ODM before committing more streams X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7d0fe39b8e93d16c2bfbefe38a1b2d6851ece236;p=openbsd drm/amd/display: always switch off ODM before committing more streams From Wenjing Liu 2d7a6fcb1f232c91fe405161d2ba5731ccb97a34 in linux-6.1.y/6.1.54 49a30c3d1a2258fc93cfe6eea8e4951dabadc824 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c index 674ab6d9b31..0a7c083afe3 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c +++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c @@ -1977,12 +1977,12 @@ enum dc_status dc_commit_streams(struct dc *dc, } } - /* Check for case where we are going from odm 2:1 to max - * pipe scenario. For these cases, we will call - * commit_minimal_transition_state() to exit out of odm 2:1 - * first before processing new streams + /* ODM Combine 2:1 power optimization is only applied for single stream + * scenario, it uses extra pipes than needed to reduce power consumption + * We need to switch off this feature to make room for new streams. */ - if (stream_count == dc->res_pool->pipe_count) { + if (stream_count > dc->current_state->stream_count && + dc->current_state->stream_count == 1) { for (i = 0; i < dc->res_pool->pipe_count; i++) { pipe = &dc->current_state->res_ctx.pipe_ctx[i]; if (pipe->next_odm_pipe)