disp: msm: update rsc vsync timeout value dynamic
Considering requirement for supporting panel refresh rates upto 1Hz current default timeout value is not sufficient. Based on panel refresh rate update vsync wait timeout value so that any vsync waits from here on will have adjusted timeout value. Change-Id: I65af152c4bd3decdd7135a4cc38f54e3bb3d5c92 Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
这个提交包含在:

提交者
Gerrit - the friendly Code Review server

父节点
cb24fd2bc6
当前提交
6acf9fddfd
@@ -62,6 +62,10 @@
|
||||
|
||||
#define DEFAULT_PANEL_MIN_V_PREFILL 35
|
||||
|
||||
/* add 10ms constant for low fps cases and use default timeout for existing cases */
|
||||
#define RSC_VSYNC_TIMEOUT_MS(x) ((x && x->cmd_config.fps < 30) ? \
|
||||
((1000 / x->cmd_config.fps) + 10) : PRIMARY_VBLANK_WORST_CASE_MS)
|
||||
|
||||
static struct sde_rsc_priv *rsc_prv_list[MAX_RSC_COUNT];
|
||||
static struct device *rpmh_dev[MAX_RSC_COUNT];
|
||||
|
||||
@@ -169,7 +173,7 @@ void sde_rsc_client_destroy(struct sde_rsc_client *client)
|
||||
SDE_EVT32(client->id, state, rsc->current_state,
|
||||
client->crtc_id, wait_vblank_crtc_id,
|
||||
SDE_EVTLOG_ERROR);
|
||||
msleep(PRIMARY_VBLANK_WORST_CASE_MS);
|
||||
msleep(RSC_VSYNC_TIMEOUT_MS(rsc));
|
||||
}
|
||||
}
|
||||
mutex_lock(&rsc->client_lock);
|
||||
@@ -538,7 +542,7 @@ vsync_wait:
|
||||
SDE_EVT32(caller_client->id, rsc->current_state,
|
||||
caller_client->crtc_id,
|
||||
wait_vblank_crtc_id, SDE_EVTLOG_ERROR);
|
||||
msleep(PRIMARY_VBLANK_WORST_CASE_MS);
|
||||
msleep(RSC_VSYNC_TIMEOUT_MS(rsc));
|
||||
} else {
|
||||
*wait_vblank_crtc_id = rsc->primary_client->crtc_id;
|
||||
}
|
||||
@@ -585,7 +589,7 @@ static int sde_rsc_switch_to_clk(struct sde_rsc_priv *rsc,
|
||||
rsc->hw_ops.hw_vsync(rsc, VSYNC_ENABLE, NULL, 0, 0);
|
||||
if (!wait_vblank_crtc_id) {
|
||||
pr_err("invalid crtc id wait pointer provided\n");
|
||||
msleep(PRIMARY_VBLANK_WORST_CASE_MS);
|
||||
msleep(RSC_VSYNC_TIMEOUT_MS(rsc));
|
||||
} else {
|
||||
*wait_vblank_crtc_id = rsc->primary_client->crtc_id;
|
||||
|
||||
@@ -600,7 +604,7 @@ static int sde_rsc_switch_to_clk(struct sde_rsc_priv *rsc,
|
||||
/* Wait for the vsync, if the refcount is set */
|
||||
rc = wait_event_timeout(rsc->rsc_vsync_waitq,
|
||||
atomic_read(&rsc->rsc_vsync_wait) == 0,
|
||||
msecs_to_jiffies(PRIMARY_VBLANK_WORST_CASE_MS*2));
|
||||
msecs_to_jiffies(RSC_VSYNC_TIMEOUT_MS(rsc) * 2));
|
||||
if (!rc) {
|
||||
pr_err("Timeout waiting for vsync\n");
|
||||
rc = -ETIMEDOUT;
|
||||
@@ -686,7 +690,7 @@ vsync_wait:
|
||||
SDE_EVT32(caller_client->id, rsc->current_state,
|
||||
caller_client->crtc_id,
|
||||
wait_vblank_crtc_id, SDE_EVTLOG_ERROR);
|
||||
msleep(PRIMARY_VBLANK_WORST_CASE_MS);
|
||||
msleep(RSC_VSYNC_TIMEOUT_MS(rsc));
|
||||
} else {
|
||||
*wait_vblank_crtc_id = rsc->primary_client->crtc_id;
|
||||
}
|
||||
|
在新工单中引用
屏蔽一个用户