}
}
+void vpp_game_mode_process(struct vframe_s *vf)
+{
+ if (vf->flag & VFRAME_FLAG_GAME_MODE) {
+ if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
+ WRITE_VPP_REG_BITS(VPP_VADJ1_MISC, 0, 0, 1);
+ else
+ WRITE_VPP_REG_BITS(VPP_VADJ_CTRL, 0, 0, 1);
+ }
+}
+
void amvecm_dejaggy_patch(struct vframe_s *vf)
{
if (!vf) {
if (is_meson_gxlx_cpu())
amve_sharpness_adaptive_setting(vf,
sps_h_en, sps_v_en);
+
+ vpp_game_mode_process(vf);
+
+ if (
+ (pc_mode != 0) &&
+ (!(vf->flag & VFRAME_FLAG_GAME_MODE))) {
amvecm_bricon_process(
vd1_brightness,
vd1_contrast + vd1_contrast_offset, vf);
amvecm_color_process(
saturation_pre + saturation_offset,
hue_pre, vf);
+ }
vpp_demo_config(vf);
}
VSYNC_WR_MPEG_REG_BITS(SRSHARP1_SR3_DERING_CTRL
+ sr_offset[1], 1, 28, 3);
}
- VSYNC_WR_MPEG_REG(VPP_VADJ_CTRL, 0xd);
+
+ if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
+ WRITE_VPP_REG_BITS(VPP_VADJ1_MISC, 1, 0, 1);
+ else
+ VSYNC_WR_MPEG_REG(VPP_VADJ_CTRL, 0xd);
pc_mode_last = pc_mode;
} else if ((pc_mode == 0) && (pc_mode != pc_mode_last)) {
dnlp_en = 0;
VSYNC_WR_MPEG_REG_BITS(SRSHARP1_SR3_DERING_CTRL
+ sr_offset[1], 0, 28, 3);
}
- VSYNC_WR_MPEG_REG(VPP_VADJ_CTRL, 0x0);
+
+ if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
+ WRITE_VPP_REG_BITS(VPP_VADJ1_MISC, 0, 0, 1);
+ else
+ VSYNC_WR_MPEG_REG(VPP_VADJ_CTRL, 0x0);
+
pc_mode_last = pc_mode;
}
}
amvecm_wb_enable(true);
vecm_latch_flag |= FLAG_GAMMA_TABLE_EN;
-
- WRITE_VPP_REG_BITS(VPP_VADJ_CTRL, 1, 0, 1);
+ if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
+ WRITE_VPP_REG_BITS(VPP_VADJ1_MISC, 1, 0, 1);
+ else
+ WRITE_VPP_REG_BITS(VPP_VADJ_CTRL, 1, 0, 1);
} else {
vecm_latch_flag |= FLAG_VE_DNLP_DIS;
vecm_latch_flag |= FLAG_GAMMA_TABLE_DIS;
- WRITE_VPP_REG_BITS(VPP_VADJ_CTRL, 0, 0, 1);
+ if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
+ WRITE_VPP_REG_BITS(VPP_VADJ1_MISC, 0, 0, 1);
+ else
+ WRITE_VPP_REG_BITS(VPP_VADJ_CTRL, 0, 0, 1);
}
}