Skip to content

Commit a29c8c0

Browse files
Kalyan Thotarobclark
authored andcommitted
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: Kalyan Thota <kalyan_t@codeaurora.org> Reported-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/1616158446-19290-1-git-send-email-kalyan_t@codeaurora.org Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 33b2b91 commit a29c8c0

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
380380
} else {
381381
DPU_DEBUG("crtc=%d disable\n", crtc->base.id);
382382
memset(old, 0, sizeof(*old));
383-
memset(new, 0, sizeof(*new));
384383
update_bus = true;
385384
update_clk = true;
386385
}

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
923923
DPU_DEBUG("crtc%d -> enable %d, active %d, skip atomic_check\n",
924924
crtc->base.id, crtc_state->enable,
925925
crtc_state->active);
926+
memset(&cstate->new_perf, 0, sizeof(cstate->new_perf));
926927
goto end;
927928
}
928929

0 commit comments

Comments
 (0)