disp: msm: sde: add support for mdp vsync timestamp
MDSS.9.0 adds support for mdp vsync based HW timestamps on top the existing support for panel vsync based timestamps. This allows us to enable vsync timestamp calculations for all the use cases including a few corner cases (e.g. programmable fetch) which we couldn't support with the existing HW. This change adds the new HW register support and modifies the timestamp read logic to use mdp vsync on supporting targets. Change-Id: I2cb1b56ca9154174331c4fc1d8f82319b6989247 Signed-off-by: Michael Ru <mru@codeaurora.org> Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
Esse commit está contido em:
@@ -155,6 +155,7 @@ ktime_t sde_encoder_calc_last_vsync_timestamp(struct drm_encoder *drm_enc)
|
||||
u64 vsync_counter, qtmr_counter, hw_diff, hw_diff_ns, frametime_ns;
|
||||
ktime_t tvblank, cur_time;
|
||||
struct intf_status intf_status = {0};
|
||||
unsigned long features;
|
||||
u32 fps;
|
||||
|
||||
sde_enc = to_sde_encoder_virt(drm_enc);
|
||||
@@ -167,11 +168,14 @@ ktime_t sde_encoder_calc_last_vsync_timestamp(struct drm_encoder *drm_enc)
|
||||
&& !sde_encoder_check_curr_mode(drm_enc, MSM_DISPLAY_VIDEO_MODE)))
|
||||
return 0;
|
||||
|
||||
features = cur_master->hw_intf->cap->features;
|
||||
|
||||
/*
|
||||
* avoid calculation and rely on ktime_get, if programmable fetch is enabled
|
||||
* as the HW VSYNC timestamp will be updated at panel vsync and not at MDP VSYNC
|
||||
* if MDP VSYNC HW timestamp is not supported and if programmable fetch is enabled,
|
||||
* avoid calculation and rely on ktime_get, as the HW vsync timestamp will be updated
|
||||
* at panel vsync and not at MDP VSYNC
|
||||
*/
|
||||
if (cur_master->hw_intf->ops.get_status) {
|
||||
if (!test_bit(SDE_INTF_MDP_VSYNC_TS, &features) && cur_master->hw_intf->ops.get_status) {
|
||||
cur_master->hw_intf->ops.get_status(cur_master->hw_intf, &intf_status);
|
||||
if (intf_status.is_prog_fetch_en)
|
||||
return 0;
|
||||
|
Referência em uma nova issue
Block a user