Commit a1f2ba60 authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Rob Clark

drm/msm/disp/dpu1: avoid perf update in frame done event

Crtc perf update from frame event work can result in
wrong bandwidth and clock update from dpu if the work
is scheduled after the swap state has happened.

Avoid such issues by moving perf update to complete
commit once the frame is accepted by the hardware.

Fixes: a29c8c02 ("drm/msm/disp/dpu1: fix display underruns during modeset")
Signed-off-by: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/1622092076-5100-1-git-send-email-mkrishn@codeaurora.orgSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 5b702d78
...@@ -406,9 +406,6 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work) ...@@ -406,9 +406,6 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work)
fevent->event); fevent->event);
} }
if (fevent->event & DPU_ENCODER_FRAME_EVENT_DONE)
dpu_core_perf_crtc_update(crtc, 0, false);
if (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE if (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE
| DPU_ENCODER_FRAME_EVENT_ERROR)) | DPU_ENCODER_FRAME_EVENT_ERROR))
frame_done = true; frame_done = true;
...@@ -476,6 +473,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event) ...@@ -476,6 +473,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
void dpu_crtc_complete_commit(struct drm_crtc *crtc) void dpu_crtc_complete_commit(struct drm_crtc *crtc)
{ {
trace_dpu_crtc_complete_commit(DRMID(crtc)); trace_dpu_crtc_complete_commit(DRMID(crtc));
dpu_core_perf_crtc_update(crtc, 0, false);
_dpu_crtc_complete_flip(crtc); _dpu_crtc_complete_flip(crtc);
} }
......
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