disp: msm: sde: update retire-fence with precise vsync timestamp

Retire fence for frames are signaled based on vsync. Use the HW
vsync timestamp counter to calculate the precise vsync timestamp
and update the retire fence signal timestamp. This will offset
all IRQ and SW delays and sends the precise timestamp. Avoid
calculating the timestamp on error or panel dead events and
set the current ktime for those cases.

Change-Id: Ic762f7cd6daead9c8fdcb0f8aad6386cf980407d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
此提交包含在:
Veera Sundaram Sankaran
2020-09-28 12:26:52 -07:00
父節點 3cef1faa29
當前提交 b965fdcee5
共有 3 個檔案被更改,包括 25 行新增12 行删除

查看文件

@@ -226,7 +226,7 @@ struct sde_encoder_virt {
struct dentry *debugfs_root;
struct mutex enc_lock;
atomic_t frame_done_cnt[MAX_PHYS_ENCODERS_PER_VIRTUAL];
void (*crtc_frame_event_cb)(void *data, u32 event);
void (*crtc_frame_event_cb)(void *data, u32 event, ktime_t ts);
struct sde_kms_frame_event_cb_data crtc_frame_event_cb_data;
struct sde_rsc_client *rsc_client;
@@ -300,7 +300,7 @@ void sde_encoder_register_vblank_callback(struct drm_encoder *encoder,
* @crtc: pointer to drm_crtc object interested in frame events
*/
void sde_encoder_register_frame_event_callback(struct drm_encoder *encoder,
void (*cb)(void *, u32), struct drm_crtc *crtc);
void (*cb)(void *, u32, ktime_t), struct drm_crtc *crtc);
/**
* sde_encoder_get_rsc_client - gets the rsc client state for primary