Просмотр исходного кода

video: driver: add space and move "{" to previous line

This change will fix some checker err.

Change-Id: I93da24e9b54bb1d5f6145b438858a977b06ca09c
Signed-off-by: Ankush Mitra <[email protected]>
Ankush Mitra 2 лет назад
Родитель
Сommit
400a782851

+ 25 - 25
driver/variant/iris2/inc/hfi_buffer_iris2.h

@@ -73,9 +73,11 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_NV12_IL_CALC_BUF_SIZE(buf_size, y_bufSize, y_stride, y_buf_height, \
 	uv_buf_size, uv_stride, uv_buf_height) \
-	y_bufSize = (y_stride * y_buf_height); \
-	uv_buf_size = (uv_stride * uv_buf_height); \
-	buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096)
+	do { \
+		y_bufSize = (y_stride * y_buf_height); \
+		uv_buf_size = (uv_stride * uv_buf_height); \
+		buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096) \
+	} while (0)
 
 #define HFI_NV12_UBWC_IL_CALC_Y_BUF_SIZE(y_bufSize, y_stride, y_buf_height) \
 	(y_bufSize = HFI_ALIGN(y_stride * y_buf_height, HFI_ALIGNMENT_4096))
@@ -125,16 +127,20 @@ typedef HFI_U32 HFI_BOOL;
 	} while (0)
 
 #define HFI_YUV420_TP10_CALC_Y_STRIDE(stride, frame_width, stride_multiple) \
+	do { \
 	stride = HFI_ALIGN(frame_width, 192); \
-	stride = HFI_ALIGN(stride * 4 / 3, stride_multiple)
+	stride = HFI_ALIGN(stride * 4 / 3, stride_multiple) \
+	} while (0)
 
 #define HFI_YUV420_TP10_CALC_Y_BUFHEIGHT(buf_height, frame_height, \
 				min_buf_height_multiple) \
 	(buf_height = HFI_ALIGN(frame_height, min_buf_height_multiple))
 
 #define HFI_YUV420_TP10_CALC_UV_STRIDE(stride, frame_width, stride_multiple) \
-	stride = HFI_ALIGN(frame_width, 192); \
-	stride = HFI_ALIGN(stride * 4 / 3, stride_multiple)
+	do { \
+		stride = HFI_ALIGN(frame_width, 192); \
+		stride = HFI_ALIGN(stride * 4 / 3, stride_multiple); \
+	} while (0)
 
 #define HFI_YUV420_TP10_CALC_UV_BUFHEIGHT(buf_height, frame_height, \
 				min_buf_height_multiple) \
@@ -143,9 +149,11 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_YUV420_TP10_CALC_BUF_SIZE(buf_size, y_buf_size, y_stride,\
 		y_buf_height, uv_buf_size, uv_stride, uv_buf_height) \
+	do { \
 	y_buf_size = (y_stride * y_buf_height); \
 	uv_buf_size = (uv_stride * uv_buf_height); \
-	buf_size = y_buf_size + uv_buf_size
+	buf_size = y_buf_size + uv_buf_size \
+	} while (0)
 
 #define HFI_YUV420_TP10_UBWC_CALC_Y_BUF_SIZE(y_buf_size, y_stride, \
 					y_buf_height) \
@@ -490,8 +498,7 @@ typedef HFI_U32 HFI_BOOL;
 			SIZE_H264D_HW_BIN_BUFFER(_size, n_aligned_w, \
 				n_aligned_h, delay, num_vpp_pipes); \
 		}     \
-		else  \
-		{     \
+		else { \
 			_size = 0;  \
 		} \
 	} while (0)
@@ -575,8 +582,7 @@ typedef HFI_U32 HFI_BOOL;
 		_size = MIN(_size, H265D_MAX_SLICE + 1);    \
 		_size = HFI_ALIGN(_size, 4);  \
 		_size = 2 * _size * SIZE_H265D_VPP_CMD_PER_BUF; \
-		if (_size > VPP_CMD_MAX_SIZE)      \
-		{                               \
+		if (_size > VPP_CMD_MAX_SIZE) { \
 			_size = VPP_CMD_MAX_SIZE;   \
 		}                          \
 	} while (0)
@@ -641,8 +647,7 @@ typedef HFI_U32 HFI_BOOL;
 			VENUS_DMA_ALIGNMENT) * 4 +  \
 			HFI_ALIGN(SIZE_H265D_QP(frame_width, frame_height),\
 			VENUS_DMA_ALIGNMENT);           \
-		if (is_opb)       \
-		{                              \
+		if (is_opb) { \
 			SIZE_VPSS_LB(vpss_lb_size, frame_width, frame_height,\
 						 num_vpp_pipes); \
 		} \
@@ -746,7 +751,7 @@ typedef HFI_U32 HFI_BOOL;
 #define HFI_IRIS2_VP9D_LB_SIZE(_size, frame_width, frame_height, num_vpp_pipes)\
 	do { \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
-		frame_height),VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
+		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VPXD_LB_SE_LEFT_CTRL(frame_width, frame_height),\
 		VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VP9D_LB_VSP_TOP(frame_width, frame_height), \
@@ -826,8 +831,7 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_BUFFER_LINE_MP2D(_size, frame_width, frame_height, \
 _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
-	do                                                \
-	{                                              \
+	do { \
 		HFI_U32 vpss_lb_size = 0;     \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
 		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
@@ -887,8 +891,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 #define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
 	do { \
 		HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0;    \
-		while (lcu_size && !(lcu_size & 0x1))   \
-		{                                         \
+		while (lcu_size && !(lcu_size & 0x1)) { \
 			n_shift++;                          \
 			lcu_size = lcu_size >> 1;          \
 		}                                      \
@@ -915,7 +918,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	do { \
 		HFI_BUFFER_INPUT_METADATA_ENC(size_metadata, frame_width, \
 			frame_height, is_roi_enabled, 16); \
-	}while (0)
+	} while (0)
 
 #define HFI_BUFFER_INPUT_METADATA_H265E(size_metadata, frame_width, \
 		frame_height, is_roi_enabled)    \
@@ -979,13 +982,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 		size_aligned_width = HFI_ALIGN((frame_width), lcu_size); \
 		size_aligned_height = HFI_ALIGN((frame_height), lcu_size); \
 		if (work_mode == HFI_WORKMODE_2) { \
-			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) \
-			{ \
+			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) { \
 				bitstream_size_eval = (((size_aligned_width) * \
 							(size_aligned_height) * 3) >> 1); \
 			} \
-			else \
-			{ \
+			else { \
 				bitstream_size_eval = ((size_aligned_width) * \
 							(size_aligned_height) * 3); \
 				if (rc_type == HFI_RC_LOSSLESS) { \
@@ -1448,8 +1449,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	} while (0)
 
 #define HFI_IRIS2_ENC_MIN_INPUT_BUF_COUNT(numInput, TotalHBLayers) \
-	do                                                                \
-	{                                                                 \
+	do { \
 		numInput = 3;                                             \
 		if (TotalHBLayers >= 2)                                   \
 		{                                                         \

+ 20 - 25
driver/variant/iris3/inc/hfi_buffer_iris3.h

@@ -73,9 +73,11 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_NV12_IL_CALC_BUF_SIZE(buf_size, y_bufSize, y_stride, y_buf_height, \
 	uv_buf_size, uv_stride, uv_buf_height) \
-	y_bufSize = (y_stride * y_buf_height); \
-	uv_buf_size = (uv_stride * uv_buf_height); \
-	(buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096))
+	do { \
+		y_bufSize = (y_stride * y_buf_height); \
+		uv_buf_size = (uv_stride * uv_buf_height); \
+		buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096) \
+	} while (0)
 
 #define HFI_NV12_UBWC_IL_CALC_Y_BUF_SIZE(y_bufSize, y_stride, y_buf_height) \
 	(y_bufSize = HFI_ALIGN(y_stride * y_buf_height, HFI_ALIGNMENT_4096))
@@ -133,8 +135,10 @@ typedef HFI_U32 HFI_BOOL;
 	(buf_height = HFI_ALIGN(frame_height, min_buf_height_multiple))
 
 #define HFI_YUV420_TP10_CALC_UV_STRIDE(stride, frame_width, stride_multiple) \
-	stride = HFI_ALIGN(frame_width, 192); \
-	stride = HFI_ALIGN(stride * 4 / 3, stride_multiple)
+	do { \
+		stride = HFI_ALIGN(frame_width, 192); \
+		stride = HFI_ALIGN(stride * 4 / 3, stride_multiple); \
+	} while (0)
 
 #define HFI_YUV420_TP10_CALC_UV_BUFHEIGHT(buf_height, frame_height, \
 				min_buf_height_multiple) \
@@ -490,8 +494,7 @@ typedef HFI_U32 HFI_BOOL;
 			SIZE_H264D_HW_BIN_BUFFER(_size, n_aligned_w, \
 				n_aligned_h, delay, num_vpp_pipes); \
 		}     \
-		else  \
-		{     \
+		else { \
 			_size = 0;  \
 		} \
 	} while (0)
@@ -575,8 +578,7 @@ typedef HFI_U32 HFI_BOOL;
 		_size = MIN(_size, H265D_MAX_SLICE + 1);    \
 		_size = HFI_ALIGN(_size, 4);  \
 		_size = 2 * _size * SIZE_H265D_VPP_CMD_PER_BUF; \
-		if (_size > VPP_CMD_MAX_SIZE)      \
-		{                               \
+		if (_size > VPP_CMD_MAX_SIZE) { \
 			_size = VPP_CMD_MAX_SIZE;   \
 		}                          \
 	} while (0)
@@ -641,8 +643,7 @@ typedef HFI_U32 HFI_BOOL;
 			VENUS_DMA_ALIGNMENT) * 4 +  \
 			HFI_ALIGN(SIZE_H265D_QP(frame_width, frame_height),\
 			VENUS_DMA_ALIGNMENT);           \
-		if (is_opb)       \
-		{                              \
+		if (is_opb) { \
 			SIZE_VPSS_LB(vpss_lb_size, frame_width, frame_height,\
 						 num_vpp_pipes); \
 		} \
@@ -746,7 +747,7 @@ typedef HFI_U32 HFI_BOOL;
 #define HFI_IRIS3_VP9D_LB_SIZE(_size, frame_width, frame_height, num_vpp_pipes)\
 	do { \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
-		frame_height),VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
+		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VPXD_LB_SE_LEFT_CTRL(frame_width, frame_height),\
 		VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VP9D_LB_VSP_TOP(frame_width, frame_height), \
@@ -826,8 +827,7 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_BUFFER_LINE_MP2D(_size, frame_width, frame_height, \
 _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
-	do                                                \
-	{                                              \
+	do { \
 		HFI_U32 vpss_lb_size = 0;     \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
 		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
@@ -1173,8 +1173,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 			tile_size = fixed_tile_width; \
 			tile_count = (frame_width_coded + tile_size - 1) / tile_size; \
 			last_tile_size = (frame_width_coded - (tile_size * (tile_count - 1))); \
-			if (last_tile_size < min_tile_size) \
-			{ \
+			if (last_tile_size < min_tile_size) { \
 				tile_count -= 1; \
 				last_tile_size = (tile_size + min_tile_size); \
 			} \
@@ -1217,8 +1216,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 #define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
 	do { \
 		HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0;    \
-		while (lcu_size && !(lcu_size & 0x1))   \
-		{                                         \
+		while (lcu_size && !(lcu_size & 0x1)) { \
 			n_shift++;                          \
 			lcu_size = lcu_size >> 1;          \
 		}                                      \
@@ -1245,7 +1243,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	do { \
 		HFI_BUFFER_INPUT_METADATA_ENC(size_metadata, frame_width, \
 			frame_height, is_roi_enabled, 16); \
-	}while (0)
+	} while (0)
 
 #define HFI_BUFFER_INPUT_METADATA_H265E(size_metadata, frame_width, \
 		frame_height, is_roi_enabled)    \
@@ -1309,13 +1307,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 		size_aligned_width = HFI_ALIGN((frame_width), lcu_size); \
 		size_aligned_height = HFI_ALIGN((frame_height), lcu_size); \
 		if (work_mode == HFI_WORKMODE_2) { \
-			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) \
-			{ \
+			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) { \
 				bitstream_size_eval = (((size_aligned_width) * \
 							(size_aligned_height) * 3) >> 1); \
 			} \
-			else \
-			{ \
+			else { \
 				bitstream_size_eval = ((size_aligned_width) * \
 							(size_aligned_height) * 3); \
 				if (rc_type == HFI_RC_LOSSLESS) { \
@@ -1779,8 +1775,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	} while (0)
 
 #define HFI_IRIS3_ENC_MIN_INPUT_BUF_COUNT(numInput, TotalHBLayers) \
-	do                                                                \
-	{                                                                 \
+	do { \
 		numInput = 3;                                             \
 		if (TotalHBLayers >= 2)                                   \
 		{                                                         \

+ 3 - 3
driver/variant/iris3/src/msm_vidc_power_iris3.c

@@ -80,7 +80,7 @@ static int msm_vidc_init_codec_input_freq(struct msm_vidc_inst *inst, u32 data_s
 
 	/*
 	 * Used for calculating Encoder GOP Complexity
-	 * hierachical_layer=0..7 used as Array Index
+	 * hierachical_layer= 0..7 used as Array Index
 	 * inst->capabilities[B_FRAME].value=[ 0 1 2]
 	 * TODO how to map?
 	 */
@@ -169,7 +169,7 @@ static int msm_vidc_init_codec_input_bus(struct msm_vidc_inst *inst, struct vidc
 
 	/*
 	 * Used for calculating Encoder GOP Complexity
-	 * hierachical_layer=0..7 used as Array Index
+	 * hierachical_layer= 0..7 used as Array Index
 	 * TODO how to map?
 	 */
 	codec_input->hierachical_layer = 0; /* set as IPP */
@@ -760,7 +760,7 @@ static u64 __calculate_decoder(struct vidc_bus_vote_data *d)
 			FP_INT(bps(1)));
 
 	if (is_h264_category)
-		ddr.line_buffer_write = fp_div(ddr.line_buffer_read,FP_INT(2));
+		ddr.line_buffer_write = fp_div(ddr.line_buffer_read, FP_INT(2));
 	else
 		ddr.line_buffer_write = ddr.line_buffer_read;
 	if (llc_top_line_buf_enabled) {

+ 22 - 27
driver/variant/iris33/inc/hfi_buffer_iris33.h

@@ -73,9 +73,11 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_NV12_IL_CALC_BUF_SIZE(buf_size, y_bufSize, y_stride, y_buf_height, \
 	uv_buf_size, uv_stride, uv_buf_height) \
-	y_bufSize = (y_stride * y_buf_height); \
-	uv_buf_size = (uv_stride * uv_buf_height); \
-	buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096)
+	do { \
+		y_bufSize = (y_stride * y_buf_height); \
+		uv_buf_size = (uv_stride * uv_buf_height); \
+		buf_size = HFI_ALIGN(y_bufSize + uv_buf_size, HFI_ALIGNMENT_4096) \
+	} while (0)
 
 #define HFI_NV12_UBWC_IL_CALC_Y_BUF_SIZE(y_bufSize, y_stride, y_buf_height) \
 	(y_bufSize = HFI_ALIGN(y_stride * y_buf_height, HFI_ALIGNMENT_4096))
@@ -133,8 +135,10 @@ typedef HFI_U32 HFI_BOOL;
 	(buf_height = HFI_ALIGN(frame_height, min_buf_height_multiple))
 
 #define HFI_YUV420_TP10_CALC_UV_STRIDE(stride, frame_width, stride_multiple) \
-	stride = HFI_ALIGN(frame_width, 192); \
-	stride = HFI_ALIGN(stride * 4 / 3, stride_multiple)
+	do { \
+		stride = HFI_ALIGN(frame_width, 192); \
+		stride = HFI_ALIGN(stride * 4 / 3, stride_multiple); \
+	} while (0)
 
 #define HFI_YUV420_TP10_CALC_UV_BUFHEIGHT(buf_height, frame_height, \
 				min_buf_height_multiple) \
@@ -490,8 +494,7 @@ typedef HFI_U32 HFI_BOOL;
 			SIZE_H264D_HW_BIN_BUFFER(_size, n_aligned_w, \
 				n_aligned_h, delay, num_vpp_pipes); \
 		}     \
-		else  \
-		{     \
+		else { \
 			_size = 0;  \
 		} \
 	} while (0)
@@ -575,8 +578,7 @@ typedef HFI_U32 HFI_BOOL;
 		_size = MIN(_size, H265D_MAX_SLICE + 1);    \
 		_size = HFI_ALIGN(_size, 4);  \
 		_size = 2 * _size * SIZE_H265D_VPP_CMD_PER_BUF; \
-		if (_size > VPP_CMD_MAX_SIZE)      \
-		{                               \
+		if (_size > VPP_CMD_MAX_SIZE) { \
 			_size = VPP_CMD_MAX_SIZE;   \
 		}                          \
 	} while (0)
@@ -641,8 +643,7 @@ typedef HFI_U32 HFI_BOOL;
 			VENUS_DMA_ALIGNMENT) * 4 +  \
 			HFI_ALIGN(SIZE_H265D_QP(frame_width, frame_height),\
 			VENUS_DMA_ALIGNMENT);           \
-		if (is_opb)       \
-		{                              \
+		if (is_opb) { \
 			SIZE_VPSS_LB(vpss_lb_size, frame_width, frame_height,\
 						 num_vpp_pipes); \
 		} \
@@ -746,7 +747,7 @@ typedef HFI_U32 HFI_BOOL;
 #define HFI_IRIS3_VP9D_LB_SIZE(_size, frame_width, frame_height, num_vpp_pipes)\
 	do { \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
-		frame_height),VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
+		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VPXD_LB_SE_LEFT_CTRL(frame_width, frame_height),\
 		VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
 		HFI_ALIGN(SIZE_VP9D_LB_VSP_TOP(frame_width, frame_height), \
@@ -826,8 +827,7 @@ typedef HFI_U32 HFI_BOOL;
 
 #define HFI_BUFFER_LINE_MP2D(_size, frame_width, frame_height, \
 _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
-	do                                                \
-	{                                              \
+	do { \
 		HFI_U32 vpss_lb_size = 0;     \
 		_size = HFI_ALIGN(SIZE_VPXD_LB_FE_LEFT_CTRL(frame_width, \
 		frame_height), VENUS_DMA_ALIGNMENT) * num_vpp_pipes + \
@@ -864,7 +864,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 
 #define HFI_BUFFER_COMV_AV1D(_size, frame_width, frame_height, \
 				_comv_bufcount) \
-	do {  \
+	do { \
 		_size = 2 * HFI_ALIGN(MAX(((frame_width + 63) / 64) * \
 				((frame_height + 63) / 64) * 512, \
 				((frame_width + 127) / 128) * \
@@ -1056,7 +1056,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	} while (0)
 
 #define HFI_BUFFER_IBC_AV1D(_size, frame_width, frame_height) \
-	do {  \
+	do { \
 		HFI_U32 ibc8, ibc10; \
 		SIZE_AV1D_IBC_NV12_UBWC(ibc8, frame_width, frame_height); \
 		SIZE_AV1D_IBC_TP10_UBWC(ibc10, frame_width, frame_height); \
@@ -1173,8 +1173,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 			tile_size = fixed_tile_width; \
 			tile_count = (frame_width_coded + tile_size - 1) / tile_size; \
 			last_tile_size = (frame_width_coded - (tile_size * (tile_count - 1))); \
-			if (last_tile_size < min_tile_size) \
-			{ \
+			if (last_tile_size < min_tile_size) { \
 				tile_count -= 1; \
 				last_tile_size = (tile_size + min_tile_size); \
 			} \
@@ -1217,8 +1216,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 #define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
 	do { \
 		HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0;    \
-		while (lcu_size && !(lcu_size & 0x1))   \
-		{                                         \
+		while (lcu_size && !(lcu_size & 0x1)) { \
 			n_shift++;                          \
 			lcu_size = lcu_size >> 1;          \
 		}                                      \
@@ -1245,7 +1243,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	do { \
 		HFI_BUFFER_INPUT_METADATA_ENC(size_metadata, frame_width, \
 			frame_height, is_roi_enabled, 16); \
-	}while (0)
+	} while (0)
 
 #define HFI_BUFFER_INPUT_METADATA_H265E(size_metadata, frame_width, \
 		frame_height, is_roi_enabled)    \
@@ -1309,13 +1307,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 		size_aligned_width = HFI_ALIGN((frame_width), lcu_size); \
 		size_aligned_height = HFI_ALIGN((frame_height), lcu_size); \
 		if (work_mode == HFI_WORKMODE_2) { \
-			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) \
-			{ \
+			if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) { \
 				bitstream_size_eval = (((size_aligned_width) * \
 							(size_aligned_height) * 3) >> 1); \
 			} \
-			else \
-			{ \
+			else { \
 				bitstream_size_eval = ((size_aligned_width) * \
 							(size_aligned_height) * 3); \
 				if (rc_type == HFI_RC_LOSSLESS) { \
@@ -1781,8 +1777,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes)           \
 	} while (0)
 
 #define HFI_IRIS3_ENC_MIN_INPUT_BUF_COUNT(numInput, TotalHBLayers) \
-	do                                                                \
-	{                                                                 \
+	do { \
 		numInput = 3;                                             \
 		if (TotalHBLayers >= 2)                                   \
 		{                                                         \

+ 7 - 7
driver/variant/iris33/src/msm_vidc_bus_iris33.c

@@ -819,13 +819,13 @@ static int calculate_bandwidth_encoder_iris33(
 	/* I frame only */
 	if (codec_input.hierachical_layer == CODEC_GOP_IONLY) {
 		codec_output->dpb_rd_y_noc = 0;
-		codec_output->dpb_rd_crcb_noc =0;
-		codec_output->dpb_rdwr_duetooverlap_noc =0;
-		codec_output->dpb_wr_noc =0;
-		codec_output->dpb_rd_y_ddr=0;
-		codec_output->dpb_rd_crcb_ddr =0;
-		codec_output->dpb_rdwr_duetooverlap_ddr=0;
-		codec_output->dpb_wr_ddr =0;
+		codec_output->dpb_rd_crcb_noc = 0;
+		codec_output->dpb_rdwr_duetooverlap_noc = 0;
+		codec_output->dpb_wr_noc = 0;
+		codec_output->dpb_rd_y_ddr = 0;
+		codec_output->dpb_rd_crcb_ddr = 0;
+		codec_output->dpb_rdwr_duetooverlap_ddr = 0;
+		codec_output->dpb_wr_ddr = 0;
 	}
 
 	/* accumulation */

+ 1 - 1
driver/variant/iris33/src/msm_vidc_power_iris33.c

@@ -913,7 +913,7 @@ static u64 __calculate_decoder(struct vidc_bus_vote_data *d)
 			FP_INT(bps(1)));
 
 	if (is_h264_category)
-		ddr.line_buffer_write = fp_div(ddr.line_buffer_read,FP_INT(2));
+		ddr.line_buffer_write = fp_div(ddr.line_buffer_read, FP_INT(2));
 	else
 		ddr.line_buffer_write = ddr.line_buffer_read;
 	if (llc_top_line_buf_enabled) {

+ 1 - 1
driver/vidc/inc/msm_vidc_internal.h

@@ -938,7 +938,7 @@ struct msm_vidc_mem {
 	 * Kalama uses Kernel Version 5.15.x,
 	 * Pineapple uses Kernel version 5.18.x
 	 */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0))
 	struct iosys_map            dmabuf_map;
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0))
 	struct dma_buf_map          dmabuf_map;

+ 1 - 1
driver/vidc/src/hfi_packet.c

@@ -237,7 +237,7 @@ u32 get_hfi_colorformat(struct msm_vidc_inst *inst,
 {
 	u32 hfi_colorformat = HFI_COLOR_FMT_NV12_UBWC;
 
-	switch(colorformat) {
+	switch (colorformat) {
 	case MSM_VIDC_FMT_NV12:
 		hfi_colorformat = HFI_COLOR_FMT_NV12;
 		break;

+ 2 - 2
driver/vidc/src/msm_vdec.c

@@ -73,7 +73,7 @@ static int msm_vdec_codec_change(struct msm_vidc_inst *inst, u32 v4l2_codec)
 		goto exit;
 
 	rc = msm_vidc_ctrl_handler_init(inst, session_init);
-	if(rc)
+	if (rc)
 		goto exit;
 
 	rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
@@ -819,7 +819,7 @@ int msm_vdec_release_input_internal_buffers(struct msm_vidc_inst *inst)
 	int rc = 0;
 	u32 i = 0;
 
-	i_vpr_h(inst, "%s()\n",__func__);
+	i_vpr_h(inst, "%s()\n", __func__);
 
 	for (i = 0; i < ARRAY_SIZE(msm_vdec_internal_buffer_type); i++) {
 		rc = msm_vidc_release_internal_buffers(inst, msm_vdec_internal_buffer_type[i]);

+ 1 - 1
driver/vidc/src/msm_venc.c

@@ -91,7 +91,7 @@ static int msm_venc_codec_change(struct msm_vidc_inst *inst, u32 v4l2_codec)
 		goto exit;
 
 	rc = msm_vidc_ctrl_handler_init(inst, session_init);
-	if(rc)
+	if (rc)
 		goto exit;
 
 	rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);

+ 2 - 2
driver/vidc/src/msm_vidc_driver.c

@@ -3375,7 +3375,7 @@ int msm_vidc_session_streamoff(struct msm_vidc_inst *inst,
 	}
 	inst_lock(inst, __func__);
 
-	if(rc)
+	if (rc)
 		goto error;
 
 	if (port == INPUT_PORT) {
@@ -4247,7 +4247,7 @@ void msm_vidc_fw_unload_handler(struct work_struct *work)
 		return;
 	}
 
-	d_vpr_h("%s: deinitializing video core\n",__func__);
+	d_vpr_h("%s: deinitializing video core\n", __func__);
 	rc = msm_vidc_core_deinit(core, false);
 	if (rc)
 		d_vpr_e("%s: Failed to deinit core\n", __func__);

+ 1 - 1
driver/vidc/src/msm_vidc_memory.c

@@ -17,7 +17,7 @@
 #include "msm_vidc_platform.h"
 #include "venus_hfi.h"
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0))
 	MODULE_IMPORT_NS(DMA_BUF);
 #endif
 

+ 1 - 1
driver/vidc/src/msm_vidc_memory_ext.c

@@ -197,7 +197,7 @@ static int msm_vidc_memory_alloc_ext(struct msm_vidc_core *core, struct msm_vidc
 			rc = -EIO;
 			goto error;
 		}
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0))
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
 		rc = dma_buf_vmap(mem->dmabuf, &mem->dmabuf_map);
 		if (rc) {
 			d_vpr_e("%s: kernel map failed\n", __func__);

+ 1 - 1
driver/vidc/src/msm_vidc_vb2.c

@@ -433,7 +433,7 @@ int msm_vidc_start_streaming(struct msm_vidc_inst *inst, struct vb2_queue *q)
 				MSM_VIDC_BUF_ARP);
 			if (rc)
 				return rc;
-		} else if(is_decode_session(inst)) {
+		} else if (is_decode_session(inst)) {
 			rc = msm_vidc_session_set_default_header(inst);
 			if (rc)
 				return rc;