Explorar el Código

disp: msm: sde: fix DSC initial line calculation

Update the DSC initial line calculations to use logical
or operator instead of bitwise operator. Additionally
this change takes care of removing unnecessary brackets.

Change-Id: Ie7fd099e726f0dbed012d5406860300a48d9b2eb
Signed-off-by: Abhijit Kulkarni <[email protected]>
Abhijit Kulkarni hace 5 años
padre
commit
78f4cffab0
Se han modificado 1 ficheros con 15 adiciones y 15 borrados
  1. 15 15
      msm/sde/sde_encoder_dce.c

+ 15 - 15
msm/sde/sde_encoder_dce.c

@@ -133,22 +133,22 @@ static int _dce_dsc_initial_line_calc(struct msm_display_dsc_info *dsc,
 		split_panel_enable = 0;
 	container_slice_width = (native_422 ?
 			dsc->config.slice_width / 2 : dsc->config.slice_width);
-	max_muxword_size = ((rtl_max_bpc >= 12) ? 64 : 48);
+	max_muxword_size = (rtl_max_bpc >= 12) ? 64 : 48;
 	max_se_size = 4 * (rtl_max_bpc + 1);
 	max_ssm_delay = max_se_size + max_muxword_size - 1;
-	mux_word_size = (bpc >= 12 ? 64 : 48);
-	compress_bpp_group = (native_422 ? 2 * bpp : bpp);
-	input_ssm_out_latency = pipeline_latency + (3 * (max_ssm_delay + 2)
-			* num_of_active_ss);
-	rtl_num_components = (native_420 | native_422 ? 4 : 3);
-	ob_data_width_4comps = ((rtl_output_data_width >= (2 *
+	mux_word_size = (bpc >= 12) ? 64 : 48;
+	compress_bpp_group = native_422 ? (2 * bpp) : bpp;
+	input_ssm_out_latency = pipeline_latency + 3 * (max_ssm_delay + 2)
+			* num_of_active_ss;
+	rtl_num_components = (native_420 || native_422) ? 4 : 3;
+	ob_data_width_4comps = (rtl_output_data_width >= (2 *
 			max_muxword_size)) ?
 			rtl_output_data_width :
-			(2 * rtl_output_data_width));
-	ob_data_width_3comps = (rtl_output_data_width >= max_muxword_size ?
-			rtl_output_data_width : 2 * rtl_output_data_width);
-	ob_data_width = (rtl_num_components == 4 ?
-			ob_data_width_4comps : ob_data_width_3comps);
+			(2 * rtl_output_data_width);
+	ob_data_width_3comps = (rtl_output_data_width >= max_muxword_size) ?
+			rtl_output_data_width : 2 * rtl_output_data_width;
+	ob_data_width = (rtl_num_components == 4) ?
+			ob_data_width_4comps : ob_data_width_3comps;
 	obuf_latency = DIV_ROUND_UP((9 * ob_data_width + mux_word_size),
 			compress_bpp_group) + 1;
 	base_hs_latency = dsc->config.initial_xmit_delay +
@@ -157,13 +157,13 @@ static int _dce_dsc_initial_line_calc(struct msm_display_dsc_info *dsc,
 	output_rate_ratio_complement = ob_data_width - compress_bpp_group;
 	output_rate_extra_budget_bits =
 		(output_rate_ratio_complement * chunk_bits) >>
-		(ob_data_width == 128 ? 7 : 6);
+		((ob_data_width == 128) ? 7 : 6);
 	multi_hs_c = split_panel_enable * multiplex_mode_enable;
 	multi_hs_d = (num_of_active_ss > 1) * (ob_data_width >
 			compress_bpp_group);
-	multi_hs_extra_budget_bits = (multi_hs_c ?
+	multi_hs_extra_budget_bits = multi_hs_c ?
 				chunk_bits : (multi_hs_d ? chunk_bits :
-					output_rate_extra_budget_bits));
+					output_rate_extra_budget_bits);
 	multi_hs_extra_latency = DIV_ROUND_UP(multi_hs_extra_budget_bits,
 			compress_bpp_group);
 	dsc->initial_lines = DIV_ROUND_UP((base_hs_latency +