amvecm: printk optimize [1/1]

PD#SWPL-30668

Problem:
too many vecm printk durning boot.

Solution:
Unnecessary prints by annotated

Verify:
on x301

Change-Id: Ia15dc9c83d62e1055bbf2c4dedf7d0619be17344
Signed-off-by: Cheng Wang <cheng.wang@amlogic.com>
This commit is contained in:
Cheng Wang
2020-08-03 15:13:14 +08:00
committed by Chris
parent ab1f0787d3
commit d41d256e47
3 changed files with 25 additions and 33 deletions

View File

@@ -96,7 +96,7 @@ int codecio_read_cbus(unsigned int reg)
ret = codecio_reg_read(CODECIO_CBUS_BASE, reg << 2, &val);
if (ret) {
pr_err("read cbus reg %x error %d\n", reg, ret);
// pr_err("read cbus reg %x error %d\n", reg, ret);
return -1;
} else
return val;
@@ -120,7 +120,7 @@ int codecio_read_dosbus(unsigned int reg)
ret = codecio_reg_read(CODECIO_DOSBUS_BASE, reg << 2, &val);
if (ret) {
pr_err("read cbus reg %x error %d\n", reg, ret);
// pr_err("read cbus reg %x error %d\n", reg, ret);
return -1;
} else
return val;

View File

@@ -7137,22 +7137,22 @@ static void aml_vecm_dt_parse(struct platform_device *pdev)
if (node) {
ret = of_property_read_u32(node, "gamma_en", &val);
if (ret)
pr_info("Can't find gamma_en.\n");
pr_amvecm_dbg("Can't find gamma_en.\n");
else
gamma_en = val;
ret = of_property_read_u32(node, "wb_en", &val);
if (ret)
pr_info("Can't find wb_en.\n");
pr_amvecm_dbg("Can't find wb_en.\n");
else
wb_en = val;
ret = of_property_read_u32(node, "cm_en", &val);
if (ret)
pr_info("Can't find cm_en.\n");
pr_amvecm_dbg("Can't find cm_en.\n");
else
cm_en = val;
ret = of_property_read_u32(node, "detect_colorbar", &val);
if (ret) {
pr_info("Can't find detect_colorbar.\n");
pr_amvecm_dbg("Can't find detect_colorbar.\n");
} else {
if (val == 0)
pattern_mask =
@@ -7165,7 +7165,7 @@ static void aml_vecm_dt_parse(struct platform_device *pdev)
}
ret = of_property_read_u32(node, "detect_face", &val);
if (ret) {
pr_info("Can't find detect_face.\n");
pr_amvecm_dbg("Can't find detect_face.\n");
} else {
if (val == 0)
pattern_mask =
@@ -7178,7 +7178,7 @@ static void aml_vecm_dt_parse(struct platform_device *pdev)
}
ret = of_property_read_u32(node, "detect_corn", &val);
if (ret) {
pr_info("Can't find detect_corn.\n");
pr_amvecm_dbg("Can't find detect_corn.\n");
} else {
if (val == 0)
pattern_mask =
@@ -7191,32 +7191,32 @@ static void aml_vecm_dt_parse(struct platform_device *pdev)
}
ret = of_property_read_u32(node, "wb_sel", &val);
if (ret)
pr_info("Can't find wb_sel.\n");
pr_amvecm_dbg("Can't find wb_sel.\n");
else
video_rgb_ogo_xvy_mtx = val;
/*hdr:cfg:osd_100*/
ret = of_property_read_u32(node, "cfg_en_osd_100", &val);
if (ret) {
hdr_set_cfg_osd_100(0);
pr_info("hdr:Can't find cfg_en_osd_100.\n");
pr_amvecm_dbg("hdr:Can't find cfg_en_osd_100.\n");
} else {
hdr_set_cfg_osd_100((int)val);
}
ret = of_property_read_u32(node, "tx_op_color_primary", &val);
if (ret)
pr_info("Can't find tx_op_color_primary.\n");
pr_amvecm_dbg("Can't find tx_op_color_primary.\n");
else
tx_op_color_primary = val;
/*get compatible matched device, to get chip related data*/
of_id = of_match_device(aml_vecm_dt_match, &pdev->dev);
if (of_id != NULL) {
pr_info("%s", of_id->compatible);
pr_amvecm_dbg("%s", of_id->compatible);
matchdata = (struct vecm_match_data_s *)of_id->data;
} else {
matchdata = (struct vecm_match_data_s *)&vecm_dt_xxx;
pr_info("unable to get matched device\n");
pr_amvecm_dbg("unable to get matched device\n");
}
vlock_dt_match_init(matchdata);
@@ -7301,7 +7301,7 @@ static int aml_vecm_probe(struct platform_device *pdev)
struct amvecm_dev_s *devp = &amvecm_dev;
memset(devp, 0, (sizeof(struct amvecm_dev_s)));
pr_info("\n VECM probe start\n");
pr_info("VECM probe start\n");
ret = alloc_chrdev_region(&devp->devno, 0, 1, AMVECM_NAME);
if (ret < 0)
goto fail_alloc_region;

View File

@@ -1770,8 +1770,8 @@ void vlock_status_init(void)
/*enc mode initial val*/
pre_enc_max_line = READ_VPP_REG(enc_max_line_addr);
pre_enc_max_pixel = READ_VPP_REG(enc_max_pixel_addr);
pr_info("vlock: maxLine %d,maxPixel %d\n",
pre_enc_max_line, pre_enc_max_pixel);
//pr_info("vlock: maxLine %d,maxPixel %d\n",
//pre_enc_max_line, pre_enc_max_pixel);
vlock.fsm_sts = VLOCK_STATE_NULL;
vlock.fsm_prests = VLOCK_STATE_NULL;
vlock.vf_sts = false;
@@ -1794,10 +1794,10 @@ void vlock_dt_match_init(struct vecm_match_data_s *pdata)
{
vlock.dtdata = pdata;
/*vlock_en = vlock.dtdata.vlk_support;*/
pr_info("vlock dt support: %d\n", vlock.dtdata->vlk_support);
pr_info("vlock dt new_fsm: %d\n", vlock.dtdata->vlk_new_fsm);
pr_info("vlock dt hwver: %d\n", vlock.dtdata->vlk_hwver);
pr_info("vlock dt phlock_en: %d\n", vlock.dtdata->vlk_phlock_en);
// pr_info("vlock dt support: %d\n", vlock.dtdata->vlk_support);
// pr_info("vlock dt new_fsm: %d\n", vlock.dtdata->vlk_new_fsm);
// pr_info("vlock dt hwver: %d\n", vlock.dtdata->vlk_hwver);
// pr_info("vlock dt phlock_en: %d\n", vlock.dtdata->vlk_phlock_en);
}
void vlock_set_phase(u32 percent)
@@ -2650,25 +2650,17 @@ void vlock_param_config(struct device_node *node)
int ret;
ret = of_property_read_u32(node, "vlock_en", &val);
if (ret)
pr_info("Can't find vlock_en.\n");
else
if (!ret)
vlock_en = val;
ret = of_property_read_u32(node, "vlock_mode", &val);
if (ret)
pr_info("Can't find vlock_mode.\n");
else
if (!ret)
vlock_mode = val;
ret = of_property_read_u32(node, "vlock_pll_m_limit", &val);
if (ret)
pr_info("Can't find vlock_pll_m_limit.\n");
else
if (!ret)
vlock_pll_m_limit = val;
ret = of_property_read_u32(node, "vlock_line_limit", &val);
if (ret)
pr_info("Can't find vlock_line_limit.\n");
else
if (!ret)
vlock_line_limit = val;
#ifdef CONFIG_AMLOGIC_LCD
@@ -2680,7 +2672,7 @@ void vlock_param_config(struct device_node *node)
vlock_mode &= ~VLOCK_MODE_MANUAL_MIX_PLL_ENC;
vlock_mode |= VLOCK_MODE_MANUAL_PLL;
}
pr_info("param_config vlock_en:%d md=0x%x\n", vlock_en, vlock_mode);
}
int vlock_notify_callback(struct notifier_block *block, unsigned long cmd,