Commit a29c8c02 authored by Kalyan Thota's avatar Kalyan Thota Committed by Rob Clark

drm/msm/disp/dpu1: fix display underruns during modeset.

During crtc disable, display perf structures are reset to 0
which includes state varibles which are immutable. On crtc
enable, we use the same structures and they don't refelect
the actual values

1) Fix is to avoid updating the state structures during disable.
2) Reset the perf structures during atomic check when there is no
modeset enable.
Signed-off-by: default avatarKalyan Thota <kalyan_t@codeaurora.org>
Reported-by: default avatarStephen Boyd <swboyd@chromium.org>
Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/1616158446-19290-1-git-send-email-kalyan_t@codeaurora.orgSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 33b2b91e
...@@ -380,7 +380,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc, ...@@ -380,7 +380,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
} else { } else {
DPU_DEBUG("crtc=%d disable\n", crtc->base.id); DPU_DEBUG("crtc=%d disable\n", crtc->base.id);
memset(old, 0, sizeof(*old)); memset(old, 0, sizeof(*old));
memset(new, 0, sizeof(*new));
update_bus = true; update_bus = true;
update_clk = true; update_clk = true;
} }
......
...@@ -923,6 +923,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc, ...@@ -923,6 +923,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
DPU_DEBUG("crtc%d -> enable %d, active %d, skip atomic_check\n", DPU_DEBUG("crtc%d -> enable %d, active %d, skip atomic_check\n",
crtc->base.id, crtc_state->enable, crtc->base.id, crtc_state->enable,
crtc_state->active); crtc_state->active);
memset(&cstate->new_perf, 0, sizeof(cstate->new_perf));
goto end; goto end;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment