disp: msm: sde: add input fence dump upon commit done timeout
This change adds debug changes to dump the input fences during a commit done timeout, when input hw-fences are enabled. Change-Id: Ia778d3d73ab8ee795613587da70ef9bebb7c73ca Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
此提交包含在:

提交者
Gerrit - the friendly Code Review server

父節點
8eff68bdf0
當前提交
87bee41901
@@ -4510,6 +4510,14 @@ static void _sde_crtc_remove_pipe_flush(struct drm_crtc *crtc)
|
||||
}
|
||||
}
|
||||
|
||||
void sde_crtc_dump_fences(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_plane *plane = NULL;
|
||||
|
||||
drm_atomic_crtc_for_each_plane(plane, crtc)
|
||||
sde_plane_dump_input_fence(plane);
|
||||
}
|
||||
|
||||
/**
|
||||
* sde_crtc_reset_hw - attempt hardware reset on errors
|
||||
* @crtc: Pointer to DRM crtc instance
|
||||
|
@@ -647,6 +647,12 @@ static inline void sde_crtc_set_needs_hw_reset(struct drm_crtc *crtc)
|
||||
int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
|
||||
bool recovery_events);
|
||||
|
||||
/**
|
||||
* sde_crtc_dump_fences - dump info for input fences of each crtc plane
|
||||
* @crtc: Pointer to DRM crtc instance
|
||||
*/
|
||||
void sde_crtc_dump_fences(struct drm_crtc *crtc);
|
||||
|
||||
/**
|
||||
* sde_crtc_request_frame_reset - requests for next frame reset
|
||||
* @crtc: Pointer to drm crtc object
|
||||
@@ -657,6 +663,9 @@ static inline int sde_crtc_request_frame_reset(struct drm_crtc *crtc,
|
||||
{
|
||||
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
|
||||
|
||||
if (test_bit(HW_FENCE_IN_FENCES_ENABLE, sde_crtc->hwfence_features_mask))
|
||||
sde_crtc_dump_fences(crtc);
|
||||
|
||||
if (sde_crtc->frame_trigger_mode == FRAME_DONE_WAIT_POSTED_START ||
|
||||
!sde_encoder_is_dsi_display(encoder))
|
||||
sde_crtc_reset_hw(crtc, crtc->state, false);
|
||||
|
@@ -260,6 +260,12 @@ void sde_debugfs_timeline_dump(struct sde_fence_context *ctx,
|
||||
*/
|
||||
void sde_fence_list_dump(struct dma_fence *fence, struct seq_file **s);
|
||||
|
||||
/**
|
||||
* sde_fence_dump - dumps fence info for specified fence
|
||||
* @fence: Pointer to fence to dump info for
|
||||
*/
|
||||
void sde_fence_dump(struct dma_fence *fence);
|
||||
|
||||
#else
|
||||
static inline void *sde_sync_get(uint64_t fd)
|
||||
{
|
||||
@@ -331,6 +337,10 @@ void sde_fence_list_dump(struct dma_fence *fence, struct seq_file **s)
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
void sde_fence_dump(struct dma_fence *fence)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
#endif /* IS_ENABLED(CONFIG_SW_SYNC) */
|
||||
|
||||
#endif /* _SDE_FENCE_H_ */
|
||||
|
@@ -594,6 +594,26 @@ static void _sde_plane_set_input_fence(struct sde_plane *psde,
|
||||
SDE_DEBUG_PLANE(psde, "0x%llX\n", fd);
|
||||
}
|
||||
|
||||
void sde_plane_dump_input_fence(struct drm_plane *plane)
|
||||
{
|
||||
struct sde_plane *psde;
|
||||
struct sde_plane_state *pstate;
|
||||
void *input_fence;
|
||||
|
||||
if (!plane) {
|
||||
SDE_ERROR("invalid plane\n");
|
||||
} else if (!plane->state) {
|
||||
SDE_ERROR_PLANE(to_sde_plane(plane), "invalid state\n");
|
||||
} else {
|
||||
psde = to_sde_plane(plane);
|
||||
pstate = to_sde_plane_state(plane->state);
|
||||
input_fence = pstate->input_fence;
|
||||
|
||||
if (input_fence)
|
||||
sde_fence_dump(input_fence);
|
||||
}
|
||||
}
|
||||
|
||||
int sde_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms)
|
||||
{
|
||||
struct sde_plane *psde;
|
||||
|
@@ -425,4 +425,10 @@ void sde_plane_static_img_control(struct drm_plane *plane,
|
||||
enum sde_sys_cache_state state, enum sde_sys_cache_type type);
|
||||
|
||||
void sde_plane_add_data_to_minidump_va(struct drm_plane *plane);
|
||||
|
||||
/**
|
||||
* sde_plane_dump_input_fence - dumps plane input fence info
|
||||
* @plane: Pointer to drm plane structure with the input fence we want to dump
|
||||
*/
|
||||
void sde_plane_dump_input_fence(struct drm_plane *plane);
|
||||
#endif /* _SDE_PLANE_H_ */
|
||||
|
新增問題並參考
封鎖使用者