disp: msm: sde: enable support to get accurate vsync timestamp

From MDSS 8.x, vsync timestamp counter register is added in all the
interfaces. Add interface to get the vsync counter and use the global
qtmr reference counter to get the counter delta. This can be used
with reference to the curret ktime to deduce the accurate vsync
timestamp. This utility is intended to be used for setting the vblank
and retire fence timestamps which would be notified to user-mode.

Change-Id: I608a284c035cda50053eedbb311f1f54b3d3d557
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
このコミットが含まれているのは:
Veera Sundaram Sankaran
2020-09-21 12:52:04 -07:00
コミット b554f01a10
6個のファイルの変更113行の追加0行の削除

ファイルの表示

@@ -592,6 +592,14 @@ static inline u32 sde_encoder_get_dfps_maxfps(struct drm_encoder *drm_enc)
*/
void sde_encoder_virt_reset(struct drm_encoder *drm_enc);
/**
* sde_encoder_calc_last_vsync_timestamp - read last HW vsync timestamp counter
* and calculate the corresponding vsync ktime. Return ktime_get
* when HW support is not available
* @drm_enc: Pointer to drm encoder structure
*/
ktime_t sde_encoder_calc_last_vsync_timestamp(struct drm_encoder *drm_enc);
/**
* sde_encoder_get_kms - retrieve the kms from encoder
* @drm_enc: Pointer to drm encoder structure