From 559620308e79263f327a4991a7c017d588d99765 Mon Sep 17 00:00:00 2001 From: Abhijit Kulkarni Date: Tue, 15 Dec 2020 10:43:17 -0800 Subject: [PATCH] display: msm: sde: update qos lut after scaler config This change moves the code of updating the qos lut for qseed3 to each plane after updating the scaler configuration. This avoids using stale values for qos settings. Change-Id: I2c55a98e1ba9790d596c55160933cd5afd2388e5 Signed-off-by: Abhijit Kulkarni --- msm/sde/sde_crtc.c | 9 +-------- msm/sde/sde_plane.c | 4 ++-- msm/sde/sde_plane.h | 9 --------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index ccfbe254b0..0fc16d2f4d 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -3374,7 +3374,6 @@ static void sde_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_encoder *encoder; struct drm_device *dev; struct sde_kms *sde_kms; - struct drm_plane *plane; struct sde_splash_display *splash_display; bool cont_splash_enabled = false; size_t i; @@ -3435,14 +3434,8 @@ static void sde_crtc_atomic_begin(struct drm_crtc *crtc, _sde_crtc_dest_scaler_setup(crtc); sde_cp_crtc_apply_noise(crtc, old_state); - if (old_state->mode_changed) { + if (crtc->state->mode_changed) sde_core_perf_crtc_update_uidle(crtc, true); - drm_atomic_crtc_for_each_plane(plane, crtc) { - if (plane->state && plane->state->fb) - _sde_plane_set_qos_lut(plane, crtc, - plane->state->fb); - } - } /* * Since CP properties use AXI buffer to program the diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index dd98bb302b..3c549fff51 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -250,7 +250,7 @@ void sde_plane_set_sid(struct drm_plane *plane, u32 vm) sde_hw_set_sspp_sid(sde_kms->hw_sid, psde->pipe, vm); } -void _sde_plane_set_qos_lut(struct drm_plane *plane, +static void _sde_plane_set_qos_lut(struct drm_plane *plane, struct drm_crtc *crtc, struct drm_framebuffer *fb) { @@ -3310,7 +3310,7 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane, _sde_plane_set_scanout(plane, pstate, &psde->pipe_cfg, fb); is_rt = sde_crtc_is_rt_client(crtc, crtc->state); - if (is_rt != psde->is_rt_pipe) { + if (is_rt != psde->is_rt_pipe || crtc->state->mode_changed) { psde->is_rt_pipe = is_rt; pstate->dirty |= SDE_PLANE_DIRTY_QOS; } diff --git a/msm/sde/sde_plane.h b/msm/sde/sde_plane.h index f2ce03a6a3..ffb3164a11 100644 --- a/msm/sde/sde_plane.h +++ b/msm/sde/sde_plane.h @@ -204,15 +204,6 @@ void sde_plane_ctl_flush(struct drm_plane *plane, struct sde_hw_ctl *ctl, */ void sde_plane_restore(struct drm_plane *plane); -/** - * _sde_plane_set_qos_lut - set danger, safe and creq LUT of the given plane - * @plane: Pointer to drm plane - * @crtc: Pointer to drm crtc to find refresh rate on mode - * @fb: Pointer to framebuffer associated with the given plane - */ -void _sde_plane_set_qos_lut(struct drm_plane *plane, - struct drm_crtc *crtc, - struct drm_framebuffer *fb); /** * sde_plane_flush - final plane operations before commit flush * @plane: Pointer to drm plane structure