Loading drivers/media/platform/msm/camera_v3/cam_sensor_module/cam_eeprom/cam_eeprom_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -913,7 +913,7 @@ static int32_t cam_eeprom_pkt_parse(struct cam_eeprom_ctrl_t *e_ctrl, void *arg) vfree(e_ctrl->cal_data.map); e_ctrl->cal_data.num_data = 0; e_ctrl->cal_data.num_map = 0; e_ctrl->cam_eeprom_state = CAM_EEPROM_INIT; e_ctrl->cam_eeprom_state = CAM_EEPROM_ACQUIRE; release_buf: if (cam_mem_put_cpu_buf(dev_config.packet_handle)) CAM_WARN(CAM_EEPROM, "Put cpu buffer failed : %llu", Loading drivers/media/platform/msm/camera_v3/cam_sync/cam_sync.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ int cam_sync_get_obj_ref(int32_t sync_obj) if (row->state != CAM_SYNC_STATE_ACTIVE) { spin_unlock(&sync_dev->row_spinlocks[sync_obj]); CAM_ERR(CAM_SYNC, CAM_ERR_RATE_LIMIT_CUSTOM(CAM_SYNC, 1, 5, "accessing an uninitialized sync obj = %d state = %d", sync_obj, row->state); return -EINVAL; Loading drivers/media/platform/msm/camera_v3/cam_utils/cam_debug_util.h +43 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -119,6 +119,27 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT_CUSTOM * @brief : This Macro will print info logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -138,4 +159,25 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_ERR_RATE_LIMIT_CUSTOM * @brief : This Macro will print error logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_ERR_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_err("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) #endif /* _CAM_DEBUG_UTIL_H_ */ Loading
drivers/media/platform/msm/camera_v3/cam_sensor_module/cam_eeprom/cam_eeprom_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -913,7 +913,7 @@ static int32_t cam_eeprom_pkt_parse(struct cam_eeprom_ctrl_t *e_ctrl, void *arg) vfree(e_ctrl->cal_data.map); e_ctrl->cal_data.num_data = 0; e_ctrl->cal_data.num_map = 0; e_ctrl->cam_eeprom_state = CAM_EEPROM_INIT; e_ctrl->cam_eeprom_state = CAM_EEPROM_ACQUIRE; release_buf: if (cam_mem_put_cpu_buf(dev_config.packet_handle)) CAM_WARN(CAM_EEPROM, "Put cpu buffer failed : %llu", Loading
drivers/media/platform/msm/camera_v3/cam_sync/cam_sync.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ int cam_sync_get_obj_ref(int32_t sync_obj) if (row->state != CAM_SYNC_STATE_ACTIVE) { spin_unlock(&sync_dev->row_spinlocks[sync_obj]); CAM_ERR(CAM_SYNC, CAM_ERR_RATE_LIMIT_CUSTOM(CAM_SYNC, 1, 5, "accessing an uninitialized sync obj = %d state = %d", sync_obj, row->state); return -EINVAL; Loading
drivers/media/platform/msm/camera_v3/cam_utils/cam_debug_util.h +43 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -119,6 +119,27 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT_CUSTOM * @brief : This Macro will print info logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -138,4 +159,25 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_ERR_RATE_LIMIT_CUSTOM * @brief : This Macro will print error logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_ERR_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_err("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) #endif /* _CAM_DEBUG_UTIL_H_ */