From: Dmytro Laktyushkin <[email protected]>

Currently pipe split may steal an existing ODM pipe depending on stream
sequence. This change prevents that from happening as easily.

Change-Id: I2e604894aaef2c782284fcc12d4e9a7381cf6eab
Signed-off-by: Dmytro Laktyushkin <[email protected]>
Reviewed-by: Gary Kattan <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 
b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index f57c686398fe..af0e0d1be147 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -2201,7 +2201,8 @@ static struct pipe_ctx *dcn20_find_secondary_pipe(struct 
dc *dc,
                 */
                if (secondary_pipe == NULL) {
                        for (j = dc->res_pool->pipe_count - 1; j >= 0; j--) {
-                               if 
(dc->current_state->res_ctx.pipe_ctx[j].top_pipe == NULL) {
+                               if 
(dc->current_state->res_ctx.pipe_ctx[j].top_pipe == NULL
+                                               && 
dc->current_state->res_ctx.pipe_ctx[j].prev_odm_pipe == NULL) {
                                        preferred_pipe_idx = j;
 
                                        if 
(res_ctx->pipe_ctx[preferred_pipe_idx].stream == NULL) {
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to