deinterace: close cue except local play [1/1]

PD#SWPL-12404

Problem:
red and green stripes dividing line flash black line

Solution:
close cue(422/444) except local play(420)
VLSI-yanling suggest

Verify:
TL1

Change-Id: Ied1554d6a0e64e00aea1e692ab6b405f87387095
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
This commit is contained in:
Jihong Sui
2019-08-21 17:25:12 +08:00
committed by Luke Go
parent ab73ff8a48
commit ef6c3534c7
4 changed files with 28 additions and 5 deletions

View File

@@ -6939,7 +6939,7 @@ static void di_reg_process_irq(void)
vframe->sig_fmt);
di_patch_post_update_mc_sw(DI_MC_SW_REG, true);
cue_int();
cue_int(vframe);
if (de_devp->flags & DI_LOAD_REG_FLAG)
up(&di_sema);
init_flag = 1;

View File

@@ -96,7 +96,7 @@ struct nr_op_s {
void (*nr_all_config)(unsigned short nCol, unsigned short nRow,
unsigned short type);
bool (*set_nr_ctrl_reg_table)(unsigned int addr, unsigned int value);
void (*cue_int)(void);
void (*cue_int)(struct vframe_s *vf);
void (*adaptive_cue_adjust)(unsigned int frame_diff,
unsigned int field_diff);
int (*module_para)(struct seq_file *seq);

View File

@@ -705,6 +705,8 @@ module_param_named(cue_pr_cnt, cue_pr_cnt, uint, 0644);
static bool cue_glb_mot_check_en = true;
module_param_named(cue_glb_mot_check_en, cue_glb_mot_check_en, bool, 0644);
/* confirm with vlsi-liuyanling, cue_process_irq is no use */
/* when CUE disable */
static void cue_process_irq(void)
{
@@ -730,13 +732,24 @@ static void cue_process_irq(void)
if (nr_param.frame_count == 5)
Wr_reg_bits(NR2_CUE_MODE, 7, 0, 4);
}
void cue_int(void)
void cue_int(struct vframe_s *vf)
{
/*confirm with vlsi-liuyanling, G12a cue must be disabled*/
if (is_meson_g12a_cpu()) {
cue_en = false;
cue_glb_mot_check_en = false;
} else if (vf && IS_VDIN_SRC(vf->source_type)) {
/*VLSI-yanling suggest close cue(422/444) except local play(420)*/
cue_en = false;
cue_glb_mot_check_en = false;
} else {
cue_en = true;
cue_glb_mot_check_en = true;
}
/*close cue when cue disable*/
if (cpu_after_eq(MESON_CPU_MAJOR_ID_GXLX) && !cue_en)
DI_Wr_reg_bits(DI_NR_CTRL0, 0, 26, 1);
if (cpu_after_eq(MESON_CPU_MAJOR_ID_G12B)) {
if (cue_en)
Wr_reg_bits(NR2_CUE_MODE, 3, 10, 2);
@@ -745,11 +758,16 @@ void cue_int(void)
static bool glb_fieldck_en = true;
module_param_named(glb_fieldck_en, glb_fieldck_en, bool, 0644);
/* confirm with vlsi-liuyanling, cue_process_irq is no use */
/* when CUE disable */
void adaptive_cue_adjust(unsigned int frame_diff, unsigned int field_diff)
{
struct CUE_PARM_s *pcue_parm = nr_param.pcue_parm;
unsigned int mask1, mask2;
if (!cue_glb_mot_check_en)
return;
//if (is_meson_tl1_cpu() || is_meson_tm2_cpu()) {
if (cpu_after_eq(MESON_CPU_MAJOR_ID_G12B)) {
/*value from VLSI(yanling.liu) 2018-12-07: */
@@ -853,7 +871,11 @@ void nr_process_in_irq(void)
{
nr_param.frame_count++;
nr_ctrl_reg_load(nr_param.pnr_regs);
if (cpu_after_eq(MESON_CPU_MAJOR_ID_GXLX))
/* confirm with vlsi-liuyanling, cue_process_irq is no use */
/* when CUE disable */
if (cpu_after_eq(MESON_CPU_MAJOR_ID_GXLX) &&
cue_glb_mot_check_en)
cue_process_irq();
if (dnr_en)
dnr_process(&dnr_param);

View File

@@ -18,6 +18,7 @@
#ifndef _DNR_H
#define _DNR_H
#include <linux/atomic.h>
#include <linux/amlogic/media/vfm/vframe.h>
struct nr_param_s {
char *name;
@@ -183,7 +184,7 @@ void nr_all_config(unsigned short nCol, unsigned short nRow,
unsigned short type);
bool set_nr_ctrl_reg_table(unsigned int addr, unsigned int value);
extern void cue_int(void);
extern void cue_int(struct vframe_s *vf);
#endif