disp: msm: sde: add line insertion support for sspp

Add line insertion support for sspp, this is used to support
display with external splitter. Line insertion logic checks
the difference between screen logical height and physical
height. If any difference is observed adds dummy and active
lines on screen.

Change-Id: Ieec322273df000a53fb39e05174c2d67c3c2da81
Signed-off-by: Rajesh kv <quic_kvrajesh@quicinc.com>
这个提交包含在:
Rajesh kv
2022-04-01 08:59:25 +05:30
父节点 fdcfe00b0b
当前提交 03aad2fdf9
修改 16 个文件,包含 420 行新增1 行删除

查看文件

@@ -44,6 +44,8 @@
#define SSPP_SRC_CONSTANT_COLOR_REC1 0x180
#define SSPP_EXCL_REC_SIZE_REC1 0x184
#define SSPP_EXCL_REC_XY_REC1 0x188
#define SSPP_LINE_INSERTION_CTRL_REC1 0x1E4
#define SSPP_LINE_INSERTION_OUT_SIZE_REC1 0x1EC
#define SSPP_UIDLE_CTRL_VALUE 0x1f0
#define SSPP_UIDLE_CTRL_VALUE_REC1 0x1f4
@@ -116,6 +118,8 @@
#define SSPP_TRAFFIC_SHAPER_BPC_MAX 0xFF
#define SSPP_CLK_CTRL 0x330
#define SSPP_CLK_STATUS 0x334
#define SSPP_LINE_INSERTION_CTRL 0x1E0
#define SSPP_LINE_INSERTION_OUT_SIZE 0x1E8
/* SSPP_QOS_CTRL */
#define SSPP_QOS_CTRL_VBLANK_EN BIT(16)
@@ -1442,6 +1446,37 @@ static int sde_hw_sspp_get_clk_ctrl_status(struct sde_hw_blk_reg_map *hw,
return 0;
}
static void sde_hw_sspp_setup_line_insertion(struct sde_hw_pipe *ctx,
enum sde_sspp_multirect_index rect_index,
struct sde_hw_pipe_line_insertion_cfg *cfg)
{
struct sde_hw_blk_reg_map *c;
u32 ctl_off = 0, size_off = 0, ctl_val = 0;
u32 idx;
if (_sspp_subblk_offset(ctx, SDE_SSPP_SRC, &idx) || !cfg)
return;
c = &ctx->hw;
if (rect_index == SDE_SSPP_RECT_SOLO || rect_index == SDE_SSPP_RECT_0) {
ctl_off = SSPP_LINE_INSERTION_CTRL;
size_off = SSPP_LINE_INSERTION_OUT_SIZE;
} else {
ctl_off = SSPP_LINE_INSERTION_CTRL_REC1;
size_off = SSPP_LINE_INSERTION_OUT_SIZE_REC1;
}
if (cfg->enable)
ctl_val = BIT(31) |
(cfg->dummy_lines << 16) |
(cfg->first_active_lines << 8) |
(cfg->active_lines);
SDE_REG_WRITE(c, ctl_off, ctl_val);
SDE_REG_WRITE(c, size_off, cfg->dst_h << 16);
}
static void _setup_layer_ops(struct sde_hw_pipe *c,
unsigned long features, unsigned long perf_features,
bool is_virtual_pipe)
@@ -1536,6 +1571,8 @@ static void _setup_layer_ops(struct sde_hw_pipe *c,
c->ops.set_ubwc_stats_roi = sde_hw_sspp_ubwc_stats_set_roi;
c->ops.get_ubwc_stats_data = sde_hw_sspp_ubwc_stats_get_data;
}
if (test_bit(SDE_SSPP_LINE_INSERTION, &features))
c->ops.setup_line_insertion = sde_hw_sspp_setup_line_insertion;
}
static struct sde_sspp_cfg *_sspp_offset(enum sde_sspp sspp,