From 33404efc1c268d6a8b39a7c409d2c7e0d3cb22d6 Mon Sep 17 00:00:00 2001 From: Gopikrishnaiah Anandan Date: Wed, 1 Apr 2020 17:32:04 -0700 Subject: [PATCH] drm: msm: fix active pipe index Active pipe index will be incremented when free entry is found with the current implementation. All the indexes will not be used and there is need to have special handling for last index with current implementation. Change adds a break in the loop and simplifies the handling. Change-Id: Ic74ad2aef791ba9c81acb19e85f44edf4d59e434 Signed-off-by: Gopikrishnaiah Anandan --- msm/sde/sde_crtc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 3d2e9a5db1..83a7bbef28 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -1340,9 +1340,11 @@ static void __sde_crtc_assign_active_cfg(struct sde_crtc *sdecrtc, u8 found = 0; int i; - for (i = 0; i < SDE_STAGE_MAX && !found; i++) { - if (sdecrtc->active_cfg.stage[i][0] == SSPP_NONE) + for (i = 0; i < SDE_STAGE_MAX; i++) { + if (sdecrtc->active_cfg.stage[i][0] == SSPP_NONE) { found = 1; + break; + } } if (!found) { SDE_ERROR("All active configs are allocated\n");