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>
这个提交包含在:
Veera Sundaram Sankaran
2020-11-25 10:39:29 -08:00
父节点 f9ff8af5b6
当前提交 9ad90a834d
修改 6 个文件,包含 35 行新增10 行删除

查看文件

@@ -192,6 +192,13 @@ static inline void _check_and_set_comp_bit(struct sde_hw_intf *ctx,
(*intf_cfg2) |= BIT(12);
}
static void sde_hw_intf_reset_counter(struct sde_hw_intf *ctx)
{
struct sde_hw_blk_reg_map *c = &ctx->hw;
SDE_REG_WRITE(c, INTF_LINE_COUNT, BIT(31));
}
static void sde_hw_intf_setup_timing_engine(struct sde_hw_intf *ctx,
const struct intf_timing_params *p,
const struct sde_format *fmt)
@@ -458,7 +465,7 @@ static void sde_hw_intf_get_status(
s->is_en = SDE_REG_READ(c, INTF_TIMING_ENGINE_EN);
if (s->is_en) {
s->frame_count = SDE_REG_READ(c, INTF_FRAME_COUNT);
s->line_count = SDE_REG_READ(c, INTF_LINE_COUNT);
s->line_count = SDE_REG_READ(c, INTF_LINE_COUNT) & 0xffff;
} else {
s->line_count = 0;
s->frame_count = 0;
@@ -474,7 +481,7 @@ static void sde_hw_intf_v1_get_status(
s->is_en = SDE_REG_READ(c, INTF_STATUS) & BIT(0);
if (s->is_en) {
s->frame_count = SDE_REG_READ(c, INTF_FRAME_COUNT);
s->line_count = SDE_REG_READ(c, INTF_LINE_COUNT);
s->line_count = SDE_REG_READ(c, INTF_LINE_COUNT) & 0xffff;
} else {
s->line_count = 0;
s->frame_count = 0;
@@ -537,7 +544,7 @@ static u32 sde_hw_intf_get_line_count(struct sde_hw_intf *intf)
c = &intf->hw;
return SDE_REG_READ(c, INTF_LINE_COUNT);
return SDE_REG_READ(c, INTF_LINE_COUNT) & 0xffff;
}
static u32 sde_hw_intf_get_underrun_line_count(struct sde_hw_intf *intf)
@@ -847,6 +854,9 @@ static void _setup_intf_ops(struct sde_hw_intf_ops *ops,
ops->check_and_reset_tearcheck =
sde_hw_intf_v1_check_and_reset_tearcheck;
}
if (cap & BIT(SDE_INTF_RESET_COUNTER))
ops->reset_counter = sde_hw_intf_reset_counter;
}
static struct sde_hw_blk_ops sde_hw_ops = {