disp: msm: sde: add support for INTF line/frame count reset

From MDSS 8.x INTF line/frame counters can be reset through
a register. Reset these counters during timing engine enable /
tear-check enable to keep track of meaningful counters, which
would be useful during debugging. Additionally, reset the
counters during cont-splash modeset to track the number of
auto-refresh frames while disabling it during the first frame.

Change-Id: I66b45f5b29793df1fb4635972b1c614ad8c3b5b3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2020-11-25 10:39:29 -08:00
parent f9ff8af5b6
commit 9ad90a834d
6 changed files with 35 additions and 10 deletions

View File

@@ -439,6 +439,9 @@ static void sde_encoder_phys_cmd_cont_splash_mode_set(
hw_pp->ops.get_autorefresh(hw_pp,
&cmd_enc->autorefresh.cfg);
}
if (hw_intf->ops.reset_counter)
hw_intf->ops.reset_counter(hw_intf);
}
_sde_encoder_phys_cmd_setup_irq_hw_idx(phys_enc);
@@ -682,12 +685,9 @@ static bool _sde_encoder_phys_cmd_is_ongoing_pptx(
hw_pp->ops.get_vsync_info(hw_pp, &info);
}
SDE_EVT32(DRMID(phys_enc->parent),
phys_enc->hw_pp->idx - PINGPONG_0,
phys_enc->hw_intf->idx - INTF_0,
atomic_read(&phys_enc->pending_kickoff_cnt),
info.wr_ptr_line_count,
phys_enc->cached_mode.vdisplay);
SDE_EVT32(DRMID(phys_enc->parent), phys_enc->hw_pp->idx - PINGPONG_0,
phys_enc->hw_intf->idx - INTF_0, atomic_read(&phys_enc->pending_kickoff_cnt),
info.wr_ptr_line_count, info.intf_frame_count, phys_enc->cached_mode.vdisplay);
if (info.wr_ptr_line_count > 0 && info.wr_ptr_line_count <
phys_enc->cached_mode.vdisplay)
@@ -1348,6 +1348,9 @@ static void sde_encoder_phys_cmd_disable(struct sde_encoder_phys *phys_enc)
phys_enc->hw_pp->ops.enable_tearcheck(phys_enc->hw_pp,
false);
sde_encoder_helper_phys_disable(phys_enc, NULL);
if (phys_enc->hw_intf->ops.reset_counter)
phys_enc->hw_intf->ops.reset_counter(phys_enc->hw_intf);
}
phys_enc->enable_state = SDE_ENC_DISABLED;