msm: mdss: delay idle timeout until frame is ready
Current idle detection logic starts timer at beginning of the frame, but if producer (GPU or others) takes some time to release fences we may be signaling idle timeout before we even posted contents on the screen. Revisit logic to wait until after fences have been signaled before signaling idle timeout. Change-Id: Id5ec0e334212484b257149727af0325b7acc3e86 Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
parent
02bf9488c8
commit
20719c0e3c
1 changed files with 10 additions and 3 deletions
|
@ -2507,9 +2507,11 @@ static int __mdss_fb_sync_buf_done_callback(struct notifier_block *p,
|
|||
|
||||
switch (event) {
|
||||
case MDP_NOTIFY_FRAME_BEGIN:
|
||||
if (mfd->idle_time)
|
||||
mod_delayed_work(system_wq, &mfd->idle_notify_work,
|
||||
msecs_to_jiffies(mfd->idle_time));
|
||||
if (mfd->idle_time && !mod_delayed_work(system_wq,
|
||||
&mfd->idle_notify_work,
|
||||
msecs_to_jiffies(WAIT_DISP_OP_TIMEOUT)))
|
||||
pr_debug("fb%d: start idle delayed work\n",
|
||||
mfd->index);
|
||||
break;
|
||||
case MDP_NOTIFY_FRAME_READY:
|
||||
if (sync_pt_data->async_wait_fences &&
|
||||
|
@ -2519,6 +2521,11 @@ static int __mdss_fb_sync_buf_done_callback(struct notifier_block *p,
|
|||
__mdss_fb_wait_for_fence_sub(sync_pt_data,
|
||||
sync_pt_data->temp_fen, fence_cnt);
|
||||
}
|
||||
if (mfd->idle_time && !mod_delayed_work(system_wq,
|
||||
&mfd->idle_notify_work,
|
||||
msecs_to_jiffies(mfd->idle_time)))
|
||||
pr_debug("fb%d: restarted idle work\n",
|
||||
mfd->index);
|
||||
break;
|
||||
case MDP_NOTIFY_FRAME_FLUSHED:
|
||||
pr_debug("%s: frame flushed\n", sync_pt_data->fence_name);
|
||||
|
|
Loading…
Add table
Reference in a new issue