if ((di_buf->di_buf_dup_p[1]->vframe == NULL) ||
di_buf->di_buf_dup_p[0]->vframe == NULL)
return 0;
+
+ if (is_meson_txl_cpu() && overturn && di_buf->di_buf_dup_p[2]) {
+ /*sync from kernel 3.14 txl*/
+ if (post_blend == PULL_DOWN_BLEND_2)
+ post_blend = PULL_DOWN_BLEND_0;
+ else if (post_blend == PULL_DOWN_BLEND_0)
+ post_blend = PULL_DOWN_BLEND_2;
+ }
+
switch (post_blend) {
case PULL_DOWN_BLEND_0:
case PULL_DOWN_NORMAL:
di_buf->di_buf_dup_p[2]->nr_canvas_idx;
di_post_stru.di_mtnprd_mif.canvas_num =
di_buf->di_buf_dup_p[2]->mtn_canvas_idx;
- mc_pre_flag = (overturn?0:1);
- if (di_buf->pd_config.global_mode == PULL_DOWN_NORMAL)
+ //mc_pre_flag = is_meson_txl_cpu()?2:(overturn?0:1);
+ mc_pre_flag = overturn?0:1;
+ if (di_buf->pd_config.global_mode == PULL_DOWN_NORMAL) {
post_blend_mode = 3;
- else
+ /*if pulldown, mcdi_mcpreflag is 1,*/
+ /*it means use previous field for MC*/
+ /*else not pulldown,mcdi_mcpreflag is 2*/
+ /*it means use forward & previous field for MC*/
+ if (is_meson_txhd_cpu())
+ mc_pre_flag = 2;
+ } else {
+ if (is_meson_txhd_cpu())
+ mc_pre_flag = 1;
post_blend_mode = 1;
+ }
if (mcpre_en) {
di_post_stru.di_mcvecrd_mif.canvas_num =
di_buf->di_buf_dup_p[2]->mcvec_canvas_idx;
di_buf->di_buf_dup_p[0]->nr_canvas_idx;
di_post_stru.di_mtnprd_mif.canvas_num =
di_buf->di_buf_dup_p[2]->mtn_canvas_idx;
+ if (is_meson_txl_cpu() && overturn) {
+ di_post_stru.di_buf1_mif.canvas0_addr0 =
+ di_post_stru.di_buf2_mif.canvas0_addr0;
+ }
if (mcpre_en) {
di_post_stru.di_mcvecrd_mif.canvas_num =
di_buf->di_buf_dup_p[2]->mcvec_canvas_idx;
- mc_pre_flag = (overturn?1:0);
+ mc_pre_flag = is_meson_txl_cpu()?0:(overturn?1:0);
if (is_meson_txlx_cpu() || is_meson_gxlx_cpu() ||
is_meson_txhd_cpu())
invert_mv = true;
di_post_stru.di_buf2_mif.canvas0_addr0 =
di_buf->di_buf_dup_p[2]->nr_canvas_idx;
}
- if (di_buf->pd_config.global_mode == PULL_DOWN_NORMAL_2)
+ if (di_buf->pd_config.global_mode == PULL_DOWN_NORMAL_2) {
post_blend_mode = 3;
- else
+ /*if pulldown, mcdi_mcpreflag is 1,*/
+ /*it means use previous field for MC*/
+ /*else not pulldown,mcdi_mcpreflag is 2*/
+ /*it means use forward & previous field for MC*/
+ if (is_meson_txhd_cpu())
+ mc_pre_flag = 2;
+ } else {
+ if (is_meson_txhd_cpu())
+ mc_pre_flag = 1;
post_blend_mode = 1;
+ }
blend_mtn_en = 1;
post_ei = ei_en = 1;
post_blend_en = 1;
);
}
- if (is_meson_txlx_cpu() || is_meson_gxlx_cpu() ||
- is_meson_g12a_cpu() || is_meson_g12b_cpu()) {
+ if (is_meson_gxtvbb_cpu() ||
+ is_meson_txl_cpu() ||
+ is_meson_txlx_cpu() ||
+ is_meson_gxlx_cpu() ||
+ is_meson_txhd_cpu() ||
+ is_meson_g12a_cpu() ||
+ is_meson_g12b_cpu()) {
di_post_read_reverse_irq(overturn, mc_pre_flag,
post_blend_en ? mcpre_en : false);
/* disable mc for first 2 fieldes mv unreliable */
if (di_buf->di_buf_dup_p[2])
set_post_mcinfo(&di_buf->di_buf_dup_p[2]
->curr_field_mcinfo);
- } else if (is_meson_gxlx_cpu() || is_meson_txlx_cpu())
+ } else if (is_meson_gxlx_cpu()
+ || is_meson_txl_cpu()
+ || is_meson_txlx_cpu())
DI_VSYNC_WR_MPEG_REG_BITS(MCDI_MC_CRTL, 0, 0, 2);
if (pulldown_enable) {
pulldown_init(width, height);
init_field_mode(height);
- if (is_meson_txlx_cpu() ||
+
+ if (is_meson_txl_cpu() ||
+ is_meson_txlx_cpu() ||
is_meson_gxlx_cpu() ||
is_meson_txhd_cpu() ||
is_meson_g12a_cpu() ||
static void set_di_flag(void)
{
- if (is_meson_txlx_cpu() ||
+ if (is_meson_txl_cpu() ||
+ is_meson_txlx_cpu() ||
is_meson_gxlx_cpu() ||
is_meson_txhd_cpu() ||
is_meson_g12a_cpu() ||
di_vscale_skip_enable = (is_meson_txlx_cpu()
|| is_meson_txhd_cpu())?12:4;
use_2_interlace_buff = is_meson_gxlx_cpu()?0:1;
- if (is_meson_txlx_cpu() ||
+ if (is_meson_txl_cpu() ||
+ is_meson_txlx_cpu() ||
is_meson_gxlx_cpu() ||
is_meson_txhd_cpu() ||
is_meson_g12a_cpu() ||
#endif
di_pr_info("%s allocate rdma channel %d.\n", __func__,
di_devp->rdma_handle);
- if (cpu_after_eq(MESON_CPU_MAJOR_ID_TXLX)) {
+ if (cpu_after_eq(MESON_CPU_MAJOR_ID_TXL)) {
di_get_vpu_clkb(&pdev->dev, di_devp);
#ifdef CLK_TREE_SUPPORT
clk_prepare_enable(di_devp->vpu_clkb);
struct di_dev_s *di_devp = NULL;
di_devp = dev_get_drvdata(dev);
- if (cpu_after_eq(MESON_CPU_MAJOR_ID_TXLX))
+ if (cpu_after_eq(MESON_CPU_MAJOR_ID_TXL))
clk_prepare_enable(di_devp->vpu_clkb);
init_flag = save_init_flag;
di_devp->flags &= ~DI_SUSPEND_FLAG;