else
WRITE_VPP_REG_BITS(VPU_VLOCK_MISC_CTRL,
1, 28, 1);
+ } else {
+ if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1))
+ WRITE_VPP_REG_BITS(VPU_VLOCK_MISC_CTRL,
+ 1, 28, 1);
}
freq_hz = input_hz | (output_hz << 8);
WRITE_VPP_REG_BITS(VPU_VLOCK_MISC_CTRL, freq_hz, 0, 16);
} else {
if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1))
WRITE_VPP_REG_BITS(VPU_VLOCK_MISC_CTRL,
- 0, 28, 1);
+ 1, 28, 1);
}
freq_hz = input_hz | (output_hz << 8);
WRITE_VPP_REG_BITS(VPU_VLOCK_MISC_CTRL, freq_hz, 0, 16);
{
/*vs_i*/
u32 ia = READ_VPP_REG(VPU_VLOCK_RO_VS_I_DIST);
+ u32 oa = READ_VPP_REG(VPU_VLOCK_RO_VS_O_DIST);
u32 val, pre;
if (vlock.phlock_en) {
- if ((pvlock->frame_cnt_in%100) == 0) {
- ia = READ_VPP_REG(VPU_VLOCK_RO_VS_I_DIST);
+ if ((pvlock->frame_cnt_in % 20) == 0) {
+ /*ia = READ_VPP_REG(VPU_VLOCK_RO_VS_I_DIST);*/
+ ia = (ia + oa) / 2;
pre = READ_VPP_REG(VPU_VLOCK_LOOP1_PHSDIF_TGT);
val = (ia * (100 + vlock.phlock_percent))/200;
if (val != pre) {
#include <linux/amlogic/media/vfm/vframe.h>
#include "linux/amlogic/media/amvecm/ve.h"
-#define VLOCK_VER "Ref.2019/5/23:vlock for hdmi pll"
+#define VLOCK_VER "Ref.2019/6/18:finetune vlock setting"
#define VLOCK_REG_NUM 33