Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dpu: set pdpu->is_rt_pipe early in dpu_plane_sspp_atomic_update()

The function dpu_plane_sspp_atomic_update() updates pdpu->is_rt_pipe
flag, but after the commit 854f6f1c653b ("drm/msm/dpu: update the qos
remap only if the client type changes") it sets the flag late, after all
the qos functions have updated QoS programming. Move the flag update
back to the place where it happened before the mentioned commit to let
the pipe be programmed according to its current RT/non-RT state.

Fixes: 854f6f1c653b ("drm/msm/dpu: update the qos remap only if the client type changes")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/516239/
Link: https://lore.kernel.org/r/20221229191856.3508092-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

+6 -9
+6 -9
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
··· 1126 1126 struct dpu_plane_state *pstate = to_dpu_plane_state(state); 1127 1127 struct drm_crtc *crtc = state->crtc; 1128 1128 struct drm_framebuffer *fb = state->fb; 1129 - bool is_rt_pipe, update_qos_remap; 1129 + bool is_rt_pipe; 1130 1130 const struct dpu_format *fmt = 1131 1131 to_dpu_format(msm_framebuffer_format(fb)); 1132 1132 struct dpu_hw_pipe_cfg pipe_cfg; ··· 1138 1138 pstate->pending = true; 1139 1139 1140 1140 is_rt_pipe = (dpu_crtc_get_client_type(crtc) != NRT_CLIENT); 1141 + pstate->needs_qos_remap |= (is_rt_pipe != pdpu->is_rt_pipe); 1142 + pdpu->is_rt_pipe = is_rt_pipe; 1143 + 1141 1144 _dpu_plane_set_qos_ctrl(plane, false, DPU_PLANE_QOS_PANIC_CTRL); 1142 1145 1143 1146 DPU_DEBUG_PLANE(pdpu, "FB[%u] " DRM_RECT_FP_FMT "->crtc%u " DRM_RECT_FMT ··· 1222 1219 _dpu_plane_set_ot_limit(plane, crtc, &pipe_cfg); 1223 1220 } 1224 1221 1225 - update_qos_remap = (is_rt_pipe != pdpu->is_rt_pipe) || 1226 - pstate->needs_qos_remap; 1227 - 1228 - if (update_qos_remap) { 1229 - if (is_rt_pipe != pdpu->is_rt_pipe) 1230 - pdpu->is_rt_pipe = is_rt_pipe; 1231 - else if (pstate->needs_qos_remap) 1232 - pstate->needs_qos_remap = false; 1222 + if (pstate->needs_qos_remap) { 1223 + pstate->needs_qos_remap = false; 1233 1224 _dpu_plane_set_qos_remap(plane); 1234 1225 } 1235 1226