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

Commit 47e7f77b authored by George Shen's avatar George Shen
Browse files

msm: cvp: CVP power management enhancement for video use



Session priority and new usage of operational fps in CVP
power management.

Change-Id: I6132a0b17f2095019de9aa31f1f358f63b6231ad
Signed-off-by: default avatarGeorge Shen <sqiao@codeaurora.org>
parent 6d464a5c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -987,6 +987,8 @@ static int adjust_bw_freqs(void)

	core_sum = max_3(core_sum, ctlr_sum, fw_sum);
	op_core_max = max_3(op_core_max, op_ctlr_max, op_fw_max);
	op_core_max = (op_core_max > tbl[tbl_size - 1].clock_rate) ?
				tbl[tbl_size - 1].clock_rate : op_core_max;
	core_sum = (core_sum >= op_core_max) ? core_sum : op_core_max;

	if (core_sum < tbl[0].clock_rate) {
+4 −4
Original line number Diff line number Diff line
@@ -91,9 +91,9 @@ int msm_cvp_est_cycles(struct cvp_kmd_usecase_desc *cvp_desc,
				ds_pixel_read = ((cvp_desc->fullres_width
					* cvp_desc->fullres_height * 121)>>7);
			} else {
				/*w*h*1.5/2.38 = w*h*81/128*/
				/*w*h*1.5/1.61 = w*h*119/128*/
				ds_pixel_read = ((cvp_desc->fullres_width
					* cvp_desc->fullres_height * 81)>>7);
					* cvp_desc->fullres_height * 119)>>7);
			}
			break;
		}
@@ -105,9 +105,9 @@ int msm_cvp_est_cycles(struct cvp_kmd_usecase_desc *cvp_desc,
				ds_pixel_read = ((cvp_desc->fullres_width
					* cvp_desc->fullres_height * 5)>>2);
			} else {
				/*w*h*1.33*1.5/2.38 = w*h*54/64*/
				/*w*h*1.33*1.5/1.61 = w*h*79/64*/
				ds_pixel_read = ((cvp_desc->fullres_width
					* cvp_desc->fullres_height * 54)>>6);
					* cvp_desc->fullres_height * 79)>>6);
			}
			break;
		}
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ struct cvp_kmd_usecase_desc {
	int reserved[16];
};

#define VIDEO_NONREALTIME 1
#define VIDEO_REALTIME 5

#ifdef CONFIG_MSM_CVP_V4L2
void *msm_cvp_open(int core_id, int session_type);
int msm_cvp_close(void *instance);