Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b38e5989 authored by Sowmya Pandiri's avatar Sowmya Pandiri
Browse files

msm: vidc: Increase the MIN DRAIN RATE when DCVS is enabled



This change increases the MIN_DRAIN_RATE from 1 to 2 initially
and the low threshold gets calculated based on drain rate later on.
It also includes the fix to avoid updating the FTB statistics for
output buffers with zero filled length in case of port reconfiguration.

Change-Id: Ia9065e1d761e0cc944091a1dd21ebcfb0cd8a5a8
Signed-off-by: default avatarSowmya Pandiri <spandiri@codeaurora.org>
parent 4d11bc8f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1594,7 +1594,8 @@ static void handle_fbd(enum command_response cmd, void *data)
		default:
			break;
		}
		if (msm_vidc_dcvs_mode && inst->dcvs_mode) {
		if (msm_vidc_dcvs_mode && inst->dcvs_mode &&
			fill_buf_done->filled_len1) {
			msm_comm_monitor_ftb(inst);
			rc = msm_comm_scale_clocks_dcvs(inst, true);
			if (rc)
@@ -2017,10 +2018,10 @@ static int msm_comm_scale_clocks_dcvs(struct msm_vidc_inst *inst, bool fbd)
		* more than high threshold
		*/
		if (!dcvs->change_initial_freq &&
			buffers_outside_fw > dcvs->threshold_disp_buf_high)
			buffers_outside_fw >= dcvs->threshold_disp_buf_high)
			dcvs->change_initial_freq = true;

		if (buffers_outside_fw > dcvs->threshold_disp_buf_high &&
		if (buffers_outside_fw >= dcvs->threshold_disp_buf_high &&
			!dcvs->prev_freq_increased) {
			dcvs->load = dcvs->load_low;
			dcvs->prev_freq_lowered = true;
+2 −2
Original line number Diff line number Diff line
@@ -78,8 +78,8 @@
#define DCVS_BUFFER_SAFEGUARD 1
/* Considering one output buffer in transition after decode */
#define DCVS_BUFFER_RELEASED_DEC 1
/* Considering atleast one FTB between each FBD */
#define DCVS_MIN_DRAIN_RATE 1
/* Considering at least two FTB's between each FBD */
#define DCVS_MIN_DRAIN_RATE 2
/* Ensures difference of 4 between min and max threshold always*/
#define DCVS_MIN_THRESHOLD_DIFF 4
/* Maintains the number of FTB's between each FBD over a window */