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;
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);
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)
{
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);
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: */
{
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);
#ifndef _DNR_H
#define _DNR_H
#include <linux/atomic.h>
+#include <linux/amlogic/media/vfm/vframe.h>
struct nr_param_s {
char *name;
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);
extern bool nr_demo_flag;
#endif
filp_close(filp, NULL);
kfree(buf_orig);
return len;
-
- /*try again:*/
- PR_INF("vap err,size to 5222400, try again\n");
- nr_size = 5222400;
- buff = dim_vmap(dump_adr, nr_size, &bflg_vmap);
- if (!buff) {
- filp_close(filp, NULL);
- kfree(buf_orig);
- return len;
- }
+ }
+ /*try again:*/
+ PR_INF("vap err,size to 5222400, try again\n");
+ nr_size = 5222400;
+ buff = dim_vmap(dump_adr, nr_size, &bflg_vmap);
+ if (!buff) {
+ filp_close(filp, NULL);
+ kfree(buf_orig);
+ return len;
}
}
} else {
PR_ERR("%s 2:\n", __func__);
return 0;
}
- dim_tr_ops.post_set(di_buf->vframe->omx_index);
+ if (di_buf->vframe)
+ dim_tr_ops.post_set(di_buf->vframe->omx_index);
+ else
+ return 0;
/*dbg*/
dim_ddbg_mod_save(eDI_DBG_MOD_POST_SETB, channel, ppost->frame_cnt);
dbg_post_cnt(channel, "ps1");
(dimp_get(eDI_MP_post_wr_en) &&
dimp_get(eDI_MP_post_wr_support)));
- if (!di_buf->di_buf_dup_p[0]->vframe ||
- !di_buf->vframe) {
+ if (!di_buf->di_buf_dup_p[0]->vframe) {
PR_ERR("%s 3:\n", __func__);
return 0;
}
first_field_type = (vframe->type & VIDTYPE_TYPEMASK);
di_pre_size_change(vframe->width, nr_height,
first_field_type, channel);
- get_ops_nr()->cue_int();
+ get_ops_nr()->cue_int(vframe);
dim_ddbg_mod_save(eDI_DBG_MOD_REGE, channel, 0);
/*--------------------------*/
ppre->bypass_flag = true;
dimh_patch_post_update_mc_sw(DI_MC_SW_OTHER, false);
return;
-
- ppre->bypass_flag = false;
}
+ ppre->bypass_flag = false;
/* patch for vdin progressive input */
if ((is_from_vdin(vframe) &&
is_progressive(vframe))
/*ary: need use interface api*/
/*receiver_name = vf_get_receiver_name(VFM_NAME);*/
preceiver = vf_get_receiver(di_rev_name[channel]);
- receiver_name = preceiver->name;
+ if (preceiver)
+ receiver_name = preceiver->name;
+
if (receiver_name) {
if (!strcmp(receiver_name, "amvideo")) {
ppost->run_early_proc_fun_flag = 0;