Browse Source

video: driver: fix for initial input_rate calculation

1. do not update input_rate until 30 inputs are
   received.
2. Fixes unwated downgrade from RT to NRT in UHD cases

Change-Id: I8d38a64829b44a0e335b69329ac5279a7b8a782d
Signed-off-by: Deepa Guthyappa Madivalara <[email protected]>
Deepa Guthyappa Madivalara 3 years ago
parent
commit
ea5082d827
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver/vidc/src/msm_vidc_driver.c

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

@@ -2419,7 +2419,7 @@ int msm_vidc_update_input_rate(struct msm_vidc_inst *inst, u64 time_us)
 		prev_timer = input_timer;
 	}
 
-	if (input_timer_sum_us)
+	if (input_timer_sum_us && counter >= INPUT_TIMER_LIST_SIZE)
 		inst->capabilities->cap[INPUT_RATE].value =
 			(s32)(DIV64_U64_ROUND_CLOSEST(counter * 1000000,
 				input_timer_sum_us) << 16);