disp: msm: sde: fix release fence signaling in error cases

Handle release fence/frame-done error signalling for
error case like esd failure, pp_done timeout, interrupt
disable on cpu, etc. It fixes the race condition for
pending_frame count update and also triggers correct
wait function for wr_ptr wait failure.

Change-Id: Iad08f20592c97221a1626bb40e607c398a9812b6
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2019-07-30 12:43:37 -07:00
committed by Dhaval Patel
parent 9081908beb
commit 5a2dfc1e83
3 changed files with 35 additions and 30 deletions

View File

@@ -365,12 +365,12 @@ struct sde_encoder_phys_cmd_autorefresh {
* struct sde_encoder_phys_cmd - sub-class of sde_encoder_phys to handle command
* mode specific operations
* @base: Baseclass physical encoder structure
* @intf_idx: Intf Block index used by this phys encoder
* @stream_sel: Stream selection for multi-stream interfaces
* @pp_timeout_report_cnt: number of pingpong done irq timeout errors
* @autorefresh: autorefresh feature state
* @pending_vblank_cnt: Atomic counter tracking pending wait for VBLANK
* @pending_vblank_wq: Wait queue for blocking until VBLANK received
* @wr_ptr_wait_success: log wr_ptr_wait success for release fence trigger
*/
struct sde_encoder_phys_cmd {
struct sde_encoder_phys base;
@@ -379,6 +379,7 @@ struct sde_encoder_phys_cmd {
struct sde_encoder_phys_cmd_autorefresh autorefresh;
atomic_t pending_vblank_cnt;
wait_queue_head_t pending_vblank_wq;
bool wr_ptr_wait_success;
};
/**