static bool nr_ctrl_reg;
+bool nr_demo_flag;
+
int global_bs_calc_sw(int *pGbsVldCnt,
int *pGbsVldFlg,
int *pGbs,
DI_Wr_reg_bits(DNR_CTRL, value, 16, 1);
}
+
+static void nr_demo_mode(bool enable)
+{
+ if (enable) {
+ DI_Wr_reg_bits(NR4_TOP_CTRL, 0, 6, 3);
+ nr_demo_flag = 1;
+ } else {
+ DI_Wr_reg_bits(NR4_TOP_CTRL, 7, 6, 3);
+ nr_demo_flag = 0;
+ }
+}
+
static ssize_t nr_dbg_store(struct device *dev,
struct device_attribute *attr,
const char *buff, size_t count)
nr_all_ctrl(false);
else if (!strcmp(parm[0], "enable"))
nr_all_ctrl(true);
+ else if (!strcmp(parm[0], "demo")) {
+ if (!strcmp(parm[1], "enable")) {
+ nr_demo_mode(true);
+ pr_info("nr demo enable\n");
+ } else if (!strcmp(parm[1], "disable")) {
+ nr_demo_mode(false);
+ pr_info("nr demo disable\n");
+ }
+ }
kfree(buf_orig);
return count;
#define SR1_OFFSET 0xc80
unsigned int sr_offset[2] = {0, 0};
+unsigned int sr_demo_flag;
+
static int wb_init_bypass_coef[24] = {
0, 0, 0, /* pre offset */
1024, 0, 0,
}
}
+void amvecm_sr_demo(int enable)
+{
+ if (enable) {
+ sr_demo_flag = 1;
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 2, 17, 2);
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 1, 16, 1);
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 0x438, 0, 13);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 2, 17, 2);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 1, 16, 1);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 0x438, 0, 13);
+
+ } else {
+ sr_demo_flag = 0;
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 2, 17, 2);
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 0, 16, 1);
+ WRITE_VPP_REG_BITS(SHARP0_DEMO_CRTL, 0x438, 0, 13);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 2, 17, 2);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 0, 16, 1);
+ WRITE_VPP_REG_BITS(SHARP1_DEMO_CRTL, 0x438, 0, 13);
+ }
+}
+
void amvecm_clip_range_limit(bool limit_en)
{
/*fix mbox av out flicker black dot*/
amvecm_sharpness_enable(11);
amvecm_sharpness_enable(13);
pr_info("SR disable\n");
+ } else if (!strncmp(parm[1], "demo", 4)) {
+ if (!strncmp(parm[2], "enable", 6)) {
+ amvecm_sr_demo(1);
+ pr_info("sr demo enable\n");
+ } else if (!strncmp(parm[2], "disable", 7)) {
+ amvecm_sr_demo(0);
+ pr_info("sr demo disable\n");
+ }
}
} else if (!strcmp(parm[0], "cm")) {
if (!strncmp(parm[1], "enable", 6)) {