disp: msm: sde: dma fence out of order handling in fence error case
Handle out of order dma fence signalling and propagation of fence error. Out of order fence signaling is required only in Video mode. For example, in case of N, N+1, N+2 frames where N, N+2 are good frames and N+1 is frame with fence error. The release fence signal sequence in video mode would be N+1, N, N+2. Change-Id: I8b6f88cfeee945e28571b765f24ffea22fad23b8 Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Dieser Commit ist enthalten in:

committet von
Gerrit - the friendly Code Review server

Ursprung
725c7a0f3d
Commit
a658fb17b7
@@ -26,6 +26,37 @@
|
||||
#define SDE_FENCE_NAME_SIZE 24
|
||||
|
||||
#define MAX_SDE_HFENCE_OUT_SIGNAL_PING_PONG 2
|
||||
|
||||
/**
|
||||
* enum sde_fence_error_state - fence error state handled in _sde_fence_trigger
|
||||
* @NO_ERROR: no fence error
|
||||
* @SET_ERROR_ONLY_CMD_RELEASE: cmd panel release fence error state
|
||||
* @SET_ERROR_ONLY_CMD_RETIRE: cmd panel retire fence error state
|
||||
* @SET_ERROR_ONLY_VID: vid panel fence error state
|
||||
* @HANDLE_OUT_OF_ORDER: vid panel out of order handle
|
||||
*/
|
||||
enum sde_fence_error_state {
|
||||
NO_ERROR,
|
||||
SET_ERROR_ONLY_CMD_RELEASE,
|
||||
SET_ERROR_ONLY_CMD_RETIRE,
|
||||
SET_ERROR_ONLY_VID,
|
||||
HANDLE_OUT_OF_ORDER,
|
||||
};
|
||||
|
||||
/**
|
||||
* sde_fence_error_ctx - reserve frame info for fence error handing
|
||||
* @last_good_frame_fence_seqno: last good frame fence seqno
|
||||
* @curr_frame_fence_seqno: currently frame fence seqno
|
||||
* @fence_error_status: fence error status
|
||||
* @sde_fence_error_state: fence error state
|
||||
*/
|
||||
struct sde_fence_error_ctx {
|
||||
u32 last_good_frame_fence_seqno;
|
||||
u32 curr_frame_fence_seqno;
|
||||
int fence_error_status;
|
||||
enum sde_fence_error_state fence_error_state;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sde_fence_context - release/retire fence context/timeline structure
|
||||
* @commit_count: Number of detected commits since bootup
|
||||
@@ -35,6 +66,7 @@
|
||||
* @lock: spinlock for fence counter protection
|
||||
* @list_lock: spinlock for timeline protection
|
||||
* @context: fence context
|
||||
* @sde_fence_error_ctx: sde fence error context
|
||||
* @list_head: fence list to hold all the fence created on this context
|
||||
* @name: name of fence context/timeline
|
||||
*/
|
||||
@@ -46,6 +78,7 @@ struct sde_fence_context {
|
||||
spinlock_t lock;
|
||||
spinlock_t list_lock;
|
||||
u64 context;
|
||||
struct sde_fence_error_ctx sde_fence_error_ctx;
|
||||
struct list_head fence_list_head;
|
||||
char name[SDE_FENCE_NAME_SIZE];
|
||||
};
|
||||
@@ -135,13 +168,14 @@ void sde_sync_put(void *fence);
|
||||
*
|
||||
* @fence: Pointer to sync fence
|
||||
* @timeout_ms: Time to wait, in milliseconds. Waits forever if timeout_ms < 0
|
||||
* @error_status: status of fence
|
||||
*
|
||||
* Return:
|
||||
* Zero if timed out
|
||||
* -ERESTARTSYS if wait interrupted
|
||||
* remaining jiffies in all other success cases.
|
||||
*/
|
||||
signed long sde_sync_wait(void *fence, long timeout_ms);
|
||||
signed long sde_sync_wait(void *fence, long timeout_ms, int *error_status);
|
||||
|
||||
/**
|
||||
* sde_sync_get_name_prefix - get integer representation of fence name prefix
|
||||
@@ -229,6 +263,17 @@ int sde_fence_update_hw_fences_txq(struct sde_fence_context *ctx, bool vid_mode,
|
||||
int sde_fence_update_input_hw_fence_signal(struct sde_hw_ctl *ctl, u32 debugfs_hw_fence,
|
||||
struct sde_hw_mdp *hw_mdp, bool disable);
|
||||
|
||||
/**
|
||||
* sde_fence_error_ctx_update - update fence_error_state and fence_error_status in
|
||||
* sde_fence_error_ctx.
|
||||
*
|
||||
* @ctx: sde_fence_context
|
||||
* @input_fence_status: input fence status, negative if input fence error
|
||||
* @sde_fence_error_state: sde fence error state
|
||||
*/
|
||||
void sde_fence_error_ctx_update(struct sde_fence_context *ctx, int input_fence_status,
|
||||
enum sde_fence_error_state sde_fence_error_state);
|
||||
|
||||
/**
|
||||
* sde_fence_deinit - deinit fence container
|
||||
* @fence: Pointer fence container
|
||||
@@ -302,7 +347,7 @@ static inline void sde_sync_put(void *fence)
|
||||
{
|
||||
}
|
||||
|
||||
static inline signed long sde_sync_wait(void *fence, long timeout_ms)
|
||||
static inline signed long sde_sync_wait(void *fence, long timeout_ms, int *error_status)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren