mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-23 15:21:39 +00:00
74 lines
3.6 KiB
Text
74 lines
3.6 KiB
Text
From a45575d87bb0af69aacb5911808172369eea30c0 Mon Sep 17 00:00:00 2001
|
|
From: wwd <ericrock@foxmail.com>
|
|
Date: Wed, 7 Sep 2016 13:44:45 +0800
|
|
Subject: [PATCH] vfe: not print debug info when camera is detached
|
|
|
|
---
|
|
drivers/media/video/sunxi-vfe/csi_cci/bsp_cci.c | 4 ++--
|
|
drivers/media/video/sunxi-vfe/vfe.c | 6 +++---
|
|
drivers/media/video/sunxi-vfe/vfe_os.h | 4 ++--
|
|
3 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/drivers/media/video/sunxi-vfe/csi_cci/bsp_cci.c b/drivers/media/video/sunxi-vfe/csi_cci/bsp_cci.c
|
|
index c6aa44d..bdfca7f 100755
|
|
--- a/drivers/media/video/sunxi-vfe/csi_cci/bsp_cci.c
|
|
+++ b/drivers/media/video/sunxi-vfe/csi_cci/bsp_cci.c
|
|
@@ -191,7 +191,7 @@ static int bsp_cci_tx_start_wait_done_unlocked(unsigned int sel, struct cci_msg
|
|
//printk("cci_cnt_done = %d, cci_cnt_irq = %d\n",cci_cnt_done, cci_cnt_irq);
|
|
if(1 == status_err_flag[sel])
|
|
{
|
|
- printk("[VFE CCI_%d ERR] Status error at addr_8bit = %x, wr_flag = %d, val = %x\n", sel, msg->bus_fmt.saddr_7bit<<1,msg->bus_fmt.wr_flag, *(int *)msg->pkt_buf);
|
|
+ // printk("[VFE CCI_%d ERR] Status error at addr_8bit = %x, wr_flag = %d, val = %x\n", sel, msg->bus_fmt.saddr_7bit<<1,msg->bus_fmt.wr_flag, *(int *)msg->pkt_buf);
|
|
ret = -1;
|
|
}
|
|
if(msg->bus_fmt.wr_flag == 1)
|
|
@@ -216,7 +216,7 @@ static int bsp_cci_tx_start_wait_done_unlocked(unsigned int sel, struct cci_msg
|
|
cci_int_get_status(sel, &status);
|
|
if(status.error) {
|
|
cci_int_clear_status(sel, CCI_INT_ERROR);
|
|
- printk("[VFE CCI_%d ERR] Status error at addr_8bit = %x, wr_flag = %d\n", sel, msg->bus_fmt.saddr_7bit<<1,msg->bus_fmt.wr_flag);
|
|
+ //printk("[VFE CCI_%d ERR] Status error at addr_8bit = %x, wr_flag = %d\n", sel, msg->bus_fmt.saddr_7bit<<1,msg->bus_fmt.wr_flag);
|
|
bsp_cci_bus_error_process(sel);
|
|
bsp_csi_cci_exit(sel);
|
|
bsp_csi_cci_init_helper(sel);
|
|
diff --git a/drivers/media/video/sunxi-vfe/vfe.c b/drivers/media/video/sunxi-vfe/vfe.c
|
|
index e0afc3f..225dac8 100755
|
|
--- a/drivers/media/video/sunxi-vfe/vfe.c
|
|
+++ b/drivers/media/video/sunxi-vfe/vfe.c
|
|
@@ -5120,9 +5120,9 @@ static void probe_work_handle(struct work_struct *work)
|
|
dev->input = input_num;
|
|
if(vfe_sensor_register_check(dev,&dev->v4l2_dev,dev->ccm_cfg[input_num],&dev->dev_sensor[input_num],input_num) == NULL)
|
|
{
|
|
- vfe_err("vfe sensor register check error at input_num = %d\n",input_num);
|
|
+ vfe_warn("vfe sensor register check error at input_num = %d\n",input_num);
|
|
dev->device_valid_flag[input_num] = 0;
|
|
- //goto snesor_register_end;
|
|
+ goto probe_hdl_unreg_dev;
|
|
}
|
|
else{
|
|
dev->device_valid_flag[input_num] = 1;
|
|
@@ -5222,7 +5222,7 @@ static void probe_work_handle(struct work_struct *work)
|
|
vfe_print("vfe_exit @ probe_hdl!\n");
|
|
//vfe_exit();
|
|
|
|
- vfe_err("Failed to install at probe handle\n");
|
|
+ vfe_warn("Failed to install at probe handle\n");
|
|
mutex_unlock(&probe_hdl_lock);
|
|
return ;
|
|
}
|
|
diff --git a/drivers/media/video/sunxi-vfe/vfe_os.h b/drivers/media/video/sunxi-vfe/vfe_os.h
|
|
index 5e76104..6fa09c1 100755
|
|
--- a/drivers/media/video/sunxi-vfe/vfe_os.h
|
|
+++ b/drivers/media/video/sunxi-vfe/vfe_os.h
|
|
@@ -28,9 +28,9 @@ extern unsigned int vfe_dbg_lv;
|
|
#define vfe_dbg(l,x,arg...) if(vfe_dbg_en && l <= vfe_dbg_lv) printk(KERN_DEBUG"[VFE_DEBUG]"x,##arg)
|
|
//print when error happens
|
|
#define vfe_err(x,arg...) printk(KERN_ERR"[VFE_ERR]"x,##arg)
|
|
-#define vfe_warn(x,arg...) printk(KERN_WARNING"[VFE_WARN]"x,##arg)
|
|
+#define vfe_warn(x,arg...) if(vfe_dbg_en) printk(KERN_WARNING"[VFE_WARN]"x,##arg)
|
|
//print unconditional, for important info
|
|
-#define vfe_print(x,arg...) printk(KERN_NOTICE"[VFE]"x,##arg)
|
|
+#define vfe_print(x,arg...) if(vfe_dbg_en) printk(KERN_NOTICE"[VFE]"x,##arg)
|
|
|
|
typedef unsigned int __hdle;
|
|
|