From c6d6839a780febbd15d91c034683b35ae3443195 Mon Sep 17 00:00:00 2001 From: Samantha Tran Date: Thu, 13 Feb 2020 10:31:16 -0800 Subject: [PATCH] Revert "disp: msm: sde: cache vbif QoS parameters" The original change avoids unnecessary reprogramming of plane vbif registers, but still copies values into a local struct before exiting based on boolean. This can be taken care of by 01e1d4136cc1 ("drm/msm: minimize qos remap updates") instead. This reverts commit 0c7159de4f292f661fe2c15abb6dde1adb613854. Change-Id: Idd9b066db9ebad092aa1a6dd2cf47050b0babd0c Signed-off-by: Samantha Tran --- msm/sde/sde_plane.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index edfd96bcfc12..32f973b312c2 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -112,7 +112,6 @@ struct sde_plane { struct sde_hw_pipe_cfg pipe_cfg; struct sde_hw_sharp_cfg sharp_cfg; struct sde_hw_pipe_qos_cfg pipe_qos_cfg; - struct sde_vbif_set_qos_params cached_qos_params; uint32_t color_fill; bool is_error; bool is_rt_pipe; @@ -468,9 +467,8 @@ static void _sde_plane_set_ot_limit(struct drm_plane *plane, /** * _sde_plane_set_vbif_qos - set vbif QoS for the given plane * @plane: Pointer to drm plane - * @force: Force update of vbif QoS */ -static void _sde_plane_set_qos_remap(struct drm_plane *plane, bool force) +static void _sde_plane_set_qos_remap(struct drm_plane *plane) { struct sde_plane *psde; struct sde_vbif_set_qos_params qos_params; @@ -503,15 +501,6 @@ static void _sde_plane_set_qos_remap(struct drm_plane *plane, bool force) qos_params.client_type = psde->is_rt_pipe ? VBIF_RT_CLIENT : VBIF_NRT_CLIENT; - if (!force && !memcmp(&qos_params, &psde->cached_qos_params, - sizeof(struct sde_vbif_set_qos_params))) { - return; - } - SDE_DEBUG("changes in vbif QoS parameters, remap it\n"); - - memcpy(&psde->cached_qos_params, &qos_params, - sizeof(struct sde_vbif_set_qos_params)); - SDE_DEBUG("plane%d pipe:%d vbif:%d xin:%d rt:%d, clk_ctrl:%d\n", plane->base.id, qos_params.num, qos_params.vbif_idx, @@ -1605,7 +1594,7 @@ void sde_plane_secure_ctrl_xin_client(struct drm_plane *plane, return; /* do all VBIF programming for the sec-ui allowed SSPP */ - _sde_plane_set_qos_remap(plane, true); + _sde_plane_set_qos_remap(plane); _sde_plane_set_ot_limit(plane, crtc); } @@ -3051,10 +3040,7 @@ static void _sde_plane_update_properties(struct drm_plane *plane, _sde_plane_set_ts_prefill(plane, pstate); } - if ((pstate->dirty & SDE_PLANE_DIRTY_ALL) == SDE_PLANE_DIRTY_ALL) - _sde_plane_set_qos_remap(plane, true); - else - _sde_plane_set_qos_remap(plane, false); + _sde_plane_set_qos_remap(plane); /* clear dirty */ pstate->dirty = 0x0;