disp: msm: fix rsc static wakeup time calculation
Currently RSC timer register programming is optimized for updating only during timing param changes and not during RSC state changes with same timing. Static wakeup time computation should consider panel jitter for RSC clk state too, else it can result in RSC hang. This change also removes extra logic for video mode prefil lines computation for rsc config as video mode does not enable RSC solver. Current issue scenario exposing the hang is in dual dsi display scenario where RSC is in clock state and static wakeup time is programmed by not considering panel jitter, after suspend/pmsuspend while waking up if RSC switches to command state if primary enabled first and vsync may arrive much early based on the panel jitter. RSC hw can not handle if TE arrives earlier than static wakeup time causing RSC hang. Change-Id: I1434fdd71eb04fdbe22b3601500493c818e9126d Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
d6d5bcebe3
commit
35f07ca601
@@ -312,7 +312,7 @@ static u32 sde_rsc_timer_calculate(struct sde_rsc_priv *rsc,
|
||||
|
||||
default_prefill_lines = (rsc->cmd_config.fps *
|
||||
DEFAULT_PANEL_MIN_V_PREFILL) / DEFAULT_PANEL_FPS;
|
||||
if ((state == SDE_RSC_CMD_STATE) || !rsc->cmd_config.prefill_lines)
|
||||
if (!rsc->cmd_config.prefill_lines)
|
||||
rsc->cmd_config.prefill_lines = default_prefill_lines;
|
||||
|
||||
pr_debug("frame fps:%d jitter_numer:%d jitter_denom:%d vtotal:%d prefill lines:%d\n",
|
||||
@@ -333,12 +333,7 @@ static u32 sde_rsc_timer_calculate(struct sde_rsc_priv *rsc,
|
||||
line_time_ns = div_u64(line_time_ns, rsc->cmd_config.vtotal);
|
||||
prefill_time_ns = line_time_ns * rsc->cmd_config.prefill_lines;
|
||||
|
||||
/* only take jitter into account for CMD mode */
|
||||
if (state == SDE_RSC_CMD_STATE)
|
||||
total = frame_time_ns - frame_jitter - prefill_time_ns;
|
||||
else
|
||||
total = frame_time_ns - prefill_time_ns;
|
||||
|
||||
total = frame_time_ns - frame_jitter - prefill_time_ns;
|
||||
if (total < 0) {
|
||||
pr_err("invalid total time period time:%llu jiter_time:%llu blanking time:%llu\n",
|
||||
frame_time_ns, frame_jitter, prefill_time_ns);
|
||||
|
Reference in New Issue
Block a user