disp: msm: sde: fix crtc client type checks for WB

CRTC client type is wrongly identified as RT_CLIENT
for WB as the API considers only RT and RT_RSC. Resolve
it by adding a new API to check for RT CTRC.

Change-Id: I1f216f60a18215426e594d0f8b09852af376799d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2019-07-16 18:46:24 -07:00
parent a6bfb7fc1e
commit f61e5545d7
2 changed files with 7 additions and 17 deletions

View File

@@ -620,21 +620,15 @@ static inline enum sde_crtc_client_type sde_crtc_get_client_type(
} }
/** /**
* sde_crtc_get_client_type_for_qos - check the crtc type- rt, nrt, rsc_rt, etc. * sde_crtc_is_rt_client - check if real-time client or not
* @crtc: Pointer to crtc * @crtc: Pointer to crtc
*/ */
static inline enum sde_crtc_client_type sde_crtc_get_client_type_for_qos( static inline bool sde_crtc_is_rt_client(struct drm_crtc *crtc)
struct drm_crtc *crtc)
{ {
struct sde_crtc_state *cstate = if (!crtc || !crtc->state)
crtc ? to_sde_crtc_state(crtc->state) : NULL; return true;
if (!cstate) return (sde_crtc_get_intf_mode(crtc) != INTF_MODE_WB_LINE);
return NRT_CLIENT;
return sde_crtc_get_intf_mode(crtc) ==
INTF_MODE_WB_LINE ? NRT_CLIENT :
(cstate->rsc_client ? RT_RSC_CLIENT : RT_CLIENT);
} }
/** /**

View File

@@ -2416,10 +2416,7 @@ static int _sde_atomic_check_decimation_scaler(struct drm_plane_state *state,
max_linewidth = psde->pipe_sblk->maxlinewidth; max_linewidth = psde->pipe_sblk->maxlinewidth;
crtc = state->crtc; crtc = state->crtc;
if (crtc) rt_client = sde_crtc_is_rt_client(crtc);
rt_client = (sde_crtc_get_client_type(crtc) != NRT_CLIENT);
else
rt_client = true;
max_downscale_denom = 1; max_downscale_denom = 1;
/* inline rotation RT clients have a different max downscaling limit */ /* inline rotation RT clients have a different max downscaling limit */
@@ -3196,8 +3193,7 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane,
return 0; return 0;
pstate->pending = true; pstate->pending = true;
psde->is_rt_pipe = psde->is_rt_pipe = sde_crtc_is_rt_client(crtc);
(sde_crtc_get_client_type_for_qos(crtc) != NRT_CLIENT);
_sde_plane_set_qos_ctrl(plane, false, SDE_PLANE_QOS_PANIC_CTRL); _sde_plane_set_qos_ctrl(plane, false, SDE_PLANE_QOS_PANIC_CTRL);
_sde_plane_update_properties(plane, crtc, fb); _sde_plane_update_properties(plane, crtc, fb);