Sfoglia il codice sorgente

video: driver: update the bandwidth calculation logic

- Driver code gets the compression ratio(CR) from FW. This CR is used
  to calculate the compression factor(CF) and used in BW calculations.
  Perf. model code for BW calculations always assumes that CF will be in
  fractional format. But, driver already converts the CR to integer format.
  So, we need to remove the x100 multiplication in BW calculation code.
- As CF is used as division factor for BW calculations,
  due to this x100 bump in CF values, we see very low calculated BW values.

Change-Id: Ifbddee68b6799b2fe0fc6d5ffa623514e1abd13f
Signed-off-by: Ashish Patil <[email protected]>
Ashish Patil 2 anni fa
parent
commit
9fad8ef79e
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7 7
      driver/variant/iris33/src/msm_vidc_bus_iris33.c

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

@@ -165,9 +165,9 @@ u32 get_compression_factors(struct compression_factors *compression_factor,
 		if ((codec_input.regression_mode == 3) &&
 			/* input cr numbers from interface */
 			((codec_input.cr_dpb != 0) || (codec_input.cr_opb != 0))) {
-			compression_factor->dpb_cf_y = (u32)(codec_input.cr_dpb * 100);
-			compression_factor->dpb_cf_cbcr = (u32)(codec_input.cr_dpb * 100);
-			compression_factor->opb_cf_ycbcr = (u32)(codec_input.cr_opb * 100);
+			compression_factor->dpb_cf_y = codec_input.cr_dpb;
+			compression_factor->dpb_cf_cbcr = codec_input.cr_dpb;
+			compression_factor->opb_cf_ycbcr = codec_input.cr_opb;
 		}
 	} else { /* encoder */
 		/*
@@ -196,9 +196,9 @@ u32 get_compression_factors(struct compression_factors *compression_factor,
 		if ((codec_input.regression_mode == 3) &&
 			/* input cr from interface */
 			((codec_input.cr_ipb != 0) || (codec_input.cr_rpb != 0))) {
-			compression_factor->dpb_cf_y = (u32)(codec_input.cr_rpb * 100);
-			compression_factor->dpb_cf_cbcr = (u32)(codec_input.cr_rpb * 100);
-			compression_factor->ipb_cr_y = (u32)(codec_input.cr_ipb * 100);
+			compression_factor->dpb_cf_y = codec_input.cr_rpb;
+			compression_factor->dpb_cf_cbcr = codec_input.cr_rpb;
+			compression_factor->ipb_cr_y = codec_input.cr_ipb;
 		}
 	}
 
@@ -1020,4 +1020,4 @@ int msm_vidc_calculate_bandwidth(struct api_calculation_input codec_input,
 	}
 
 	return rc;
-}
+}