From 950306d1aa13c999f0d4b73c65cac6e4421c6915 Mon Sep 17 00:00:00 2001 From: Anshul Agarwal Date: Fri, 9 Jun 2023 11:14:25 +0530 Subject: [PATCH] video: driver: fix some checker err Fix some checker err Change-Id: I357059999dd43b58d6c414868a8b4060b6b691da Signed-off-by: Anshul Agarwal --- driver/variant/iris3/src/msm_vidc_bus_iris3.c | 2 +- driver/variant/iris33/src/msm_vidc_bus_iris33.c | 2 +- driver/variant/iris33/src/msm_vidc_iris33.c | 6 ++---- driver/vidc/inc/venus_hfi_queue.h | 4 ++-- driver/vidc/src/msm_vidc_debug.c | 5 ++--- driver/vidc/src/msm_vidc_driver.c | 8 ++++---- driver/vidc/src/resources.c | 2 +- driver/vidc/src/resources_ext.c | 2 +- 8 files changed, 14 insertions(+), 17 deletions(-) diff --git a/driver/variant/iris3/src/msm_vidc_bus_iris3.c b/driver/variant/iris3/src/msm_vidc_bus_iris3.c index 96b0f57981..26d13baf9e 100644 --- a/driver/variant/iris3/src/msm_vidc_bus_iris3.c +++ b/driver/variant/iris3/src/msm_vidc_bus_iris3.c @@ -608,7 +608,7 @@ static int calculate_bandwidth_encoder_iris3( (codec_input.codec == CODEC_H264_CAVLC)) { frame_lcu_size = 16; collocated_bytes_per_lcu = 16; - } if (codec_input.codec == CODEC_HEVC) { + } else if (codec_input.codec == CODEC_HEVC) { frame_lcu_size = 32; collocated_bytes_per_lcu = 64; } else { diff --git a/driver/variant/iris33/src/msm_vidc_bus_iris33.c b/driver/variant/iris33/src/msm_vidc_bus_iris33.c index 36fa1fb3e0..4339c85abe 100644 --- a/driver/variant/iris33/src/msm_vidc_bus_iris33.c +++ b/driver/variant/iris33/src/msm_vidc_bus_iris33.c @@ -608,7 +608,7 @@ static int calculate_bandwidth_encoder_iris33( (codec_input.codec == CODEC_H264_CAVLC)) { frame_lcu_size = 16; collocated_bytes_per_lcu = 16; - } if (codec_input.codec == CODEC_HEVC) { + } else if (codec_input.codec == CODEC_HEVC) { frame_lcu_size = 32; collocated_bytes_per_lcu = 64; } else { diff --git a/driver/variant/iris33/src/msm_vidc_iris33.c b/driver/variant/iris33/src/msm_vidc_iris33.c index c85d00a54f..545d42f88d 100644 --- a/driver/variant/iris33/src/msm_vidc_iris33.c +++ b/driver/variant/iris33/src/msm_vidc_iris33.c @@ -38,8 +38,7 @@ #define HFI_CTRL_INIT_IRIS33 VCODEC_VPU_CPU_CS_SCIACMD_IRIS33 #define HFI_CTRL_STATUS_IRIS33 VCODEC_VPU_CPU_CS_SCIACMDARG0_IRIS33 -typedef enum -{ +typedef enum { HFI_CTRL_NOT_INIT = 0x0, HFI_CTRL_READY = 0x1, HFI_CTRL_ERROR_FATAL = 0x2, @@ -50,8 +49,7 @@ typedef enum } hfi_ctrl_status_type; #define HFI_QTBL_INFO_IRIS33 VCODEC_VPU_CPU_CS_SCIACMDARG1_IRIS33 -typedef enum -{ +typedef enum { HFI_QTBL_DISABLED = 0x00, HFI_QTBL_ENABLED = 0x01, } hfi_qtbl_status_type; diff --git a/driver/vidc/inc/venus_hfi_queue.h b/driver/vidc/inc/venus_hfi_queue.h index f4c188ef8d..83237c201a 100644 --- a/driver/vidc/inc/venus_hfi_queue.h +++ b/driver/vidc/inc/venus_hfi_queue.h @@ -63,8 +63,8 @@ struct hfi_queue_header { VIDC_IFACEQ_MAX_BUF_COUNT * VIDC_IFACE_MAX_PARALLEL_CLNTS) #define VIDC_IFACEQ_GET_QHDR_START_ADDR(ptr, i) \ - (void *)((ptr + sizeof(struct hfi_queue_table_header)) + \ - (i * sizeof(struct hfi_queue_header))) + ((void *)((ptr + sizeof(struct hfi_queue_table_header)) + \ + (i * sizeof(struct hfi_queue_header)))) #define QDSS_SIZE 4096 #define SFR_SIZE 4096 diff --git a/driver/vidc/src/msm_vidc_debug.c b/driver/vidc/src/msm_vidc_debug.c index 31ac5aaa31..b3b8cdc66e 100644 --- a/driver/vidc/src/msm_vidc_debug.c +++ b/driver/vidc/src/msm_vidc_debug.c @@ -25,7 +25,7 @@ unsigned int msm_vidc_debug = DRV_LOG; unsigned int msm_fw_debug = FW_LOG; /* disabled synx fence by default temporarily */ -bool msm_vidc_synx_fence_enable = false; +bool msm_vidc_synx_fence_enable; static int debug_level_set_drv(const char *val, const struct kernel_param *kp) @@ -405,8 +405,7 @@ static ssize_t trigger_ssr_write(struct file *filp, const char __user *buf, if (rc) { d_vpr_e("returning error err %d\n", rc); rc = -EINVAL; - } - else { + } else { msm_vidc_trigger_ssr(core, ssr_trigger_val); rc = count; } diff --git a/driver/vidc/src/msm_vidc_driver.c b/driver/vidc/src/msm_vidc_driver.c index 154e925c7f..8c7f2633be 100644 --- a/driver/vidc/src/msm_vidc_driver.c +++ b/driver/vidc/src/msm_vidc_driver.c @@ -999,7 +999,7 @@ bool is_hevc_10bit_decode_session(struct msm_vidc_inst *inst) /* in case of decoder session return false */ if (!is_decode_session(inst)) - return false; + return false; colorformat = v4l2_colorformat_to_driver(inst, inst->fmts[OUTPUT_PORT].fmt.pix_mp.pixelformat, __func__); @@ -4934,8 +4934,8 @@ static int msm_vidc_get_inst_load(struct msm_vidc_inst *inst) return mbpf * fps; } -static bool msm_vidc_ignore_session_load(struct msm_vidc_inst *inst) { - +static bool msm_vidc_ignore_session_load(struct msm_vidc_inst *inst) +{ if (!is_realtime_session(inst) || is_thumbnail_session(inst) || is_image_session(inst) || is_session_error(inst)) return true; @@ -5010,7 +5010,7 @@ int msm_vidc_check_core_mbps(struct msm_vidc_inst *inst) } core_unlock(core, __func__); } - } else if (is_decode_session(inst)){ + } else if (is_decode_session(inst)) { /* * if total_mbps is greater than max_mbps then allow this * decoder by reducing its piority (moving it to NRT) diff --git a/driver/vidc/src/resources.c b/driver/vidc/src/resources.c index 9c79e30a66..63fe8d2247 100644 --- a/driver/vidc/src/resources.c +++ b/driver/vidc/src/resources.c @@ -1265,7 +1265,7 @@ static int update_residency_stats( int rc = 0; /* skip update if high or stats logs not enabled */ - if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT))) + if (!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT))) return 0; if (!core || !cl) { diff --git a/driver/vidc/src/resources_ext.c b/driver/vidc/src/resources_ext.c index c9f87d5308..e9cab8044c 100644 --- a/driver/vidc/src/resources_ext.c +++ b/driver/vidc/src/resources_ext.c @@ -338,7 +338,7 @@ static int update_residency_stats( int rc = 0; /* skip update if high or stats logs not enabled */ - if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT))) + if (!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT))) return 0; if (!core || !cl) {