disp: msm: sde: wait for autorefresh_status to be idle in prepare kickoff
If cont splash is enabled, wait for autorefresh_status to be idle for 1 vsync in prepare kickoff. This patch also prevents entering to rsc_solver_mode if autorefresh_status is busy. Change-Id: Id7491361dae2482905e10a5a10e590d5f5b49e6f Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com> Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
这个提交包含在:
@@ -1805,6 +1805,28 @@ static void sde_encoder_phys_cmd_get_hw_resources(
|
||||
hw_res->intfs[phys_enc->intf_idx - INTF_0] = INTF_MODE_CMD;
|
||||
}
|
||||
|
||||
static void _sde_encoder_phys_wait_for_vsync_on_autorefresh_busy(struct sde_encoder_phys *phys_enc)
|
||||
{
|
||||
u32 autorefresh_status;
|
||||
int ret = 0;
|
||||
|
||||
if (!phys_enc || !phys_enc->hw_intf || !phys_enc->hw_intf->ops.get_autorefresh_status) {
|
||||
SDE_ERROR("invalid params\n");
|
||||
return;
|
||||
}
|
||||
|
||||
autorefresh_status = phys_enc->hw_intf->ops.get_autorefresh_status(phys_enc->hw_intf);
|
||||
if (autorefresh_status) {
|
||||
ret = sde_encoder_wait_for_event(phys_enc->parent, MSM_ENC_VBLANK);
|
||||
if (ret) {
|
||||
autorefresh_status = phys_enc->hw_intf->ops.get_autorefresh_status(
|
||||
phys_enc->hw_intf);
|
||||
SDE_ERROR("wait for vblank timed out, autorefresh_status:%d\n",
|
||||
autorefresh_status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int sde_encoder_phys_cmd_prepare_for_kickoff(
|
||||
struct sde_encoder_phys *phys_enc,
|
||||
struct sde_encoder_kickoff_params *params)
|
||||
@@ -1829,7 +1851,9 @@ static int sde_encoder_phys_cmd_prepare_for_kickoff(
|
||||
SDE_EVT32(DRMID(phys_enc->parent), phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(&phys_enc->pending_kickoff_cnt),
|
||||
atomic_read(&cmd_enc->autorefresh.kickoff_cnt),
|
||||
phys_enc->frame_trigger_mode, SDE_EVTLOG_FUNC_CASE1);
|
||||
phys_enc->frame_trigger_mode,
|
||||
phys_enc->cont_splash_enabled,
|
||||
SDE_EVTLOG_FUNC_CASE1);
|
||||
|
||||
if (phys_enc->frame_trigger_mode == FRAME_DONE_WAIT_DEFAULT) {
|
||||
/*
|
||||
@@ -1846,6 +1870,9 @@ static int sde_encoder_phys_cmd_prepare_for_kickoff(
|
||||
}
|
||||
}
|
||||
|
||||
if (phys_enc->cont_splash_enabled)
|
||||
_sde_encoder_phys_wait_for_vsync_on_autorefresh_busy(phys_enc);
|
||||
|
||||
if (phys_enc->recovered) {
|
||||
recovery_events = sde_encoder_recovery_events_enabled(
|
||||
phys_enc->parent);
|
||||
@@ -2368,6 +2395,7 @@ static void _sde_encoder_autorefresh_disable_seq2(
|
||||
tear_status.write_frame_count, tear_status.write_line_count);
|
||||
}
|
||||
}
|
||||
|
||||
static void _sde_encoder_phys_disable_autorefresh(struct sde_encoder_phys *phys_enc)
|
||||
{
|
||||
struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
|
||||
@@ -2559,6 +2587,8 @@ static void sde_encoder_phys_cmd_init_ops(struct sde_encoder_phys_ops *ops)
|
||||
ops->disable_autorefresh = _sde_encoder_phys_disable_autorefresh;
|
||||
ops->idle_pc_cache_display_status = sde_encoder_phys_cmd_store_ltj_values;
|
||||
ops->handle_post_kickoff = sde_encoder_phys_cmd_handle_post_kickoff;
|
||||
ops->wait_for_vsync_on_autorefresh_busy =
|
||||
_sde_encoder_phys_wait_for_vsync_on_autorefresh_busy;
|
||||
}
|
||||
|
||||
static inline bool sde_encoder_phys_cmd_intf_te_supported(
|
||||
|
在新工单中引用
屏蔽一个用户