Procházet zdrojové kódy

Merge "video: driver: bump clockrate and bandwidth for 960FPS"

qctecmdr před 3 roky
rodič
revize
4d51b2ba26

+ 10 - 0
driver/variant/iris2/src/msm_vidc_power_iris2.c

@@ -165,6 +165,10 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
 
 		vsp_cycles += mbs_per_second * base_cycles;
 
+		/* Add 25 percent extra for 960fps use case */
+		if (fps >= MAXIMUM_FPS)
+			vsp_cycles += div_u64(vpp_cycles * 25, 100);
+
 		if (inst->codec == MSM_VIDC_VP9 &&
 				inst->capabilities->cap[STAGE].value ==
 					MSM_VIDC_STAGE_2 &&
@@ -367,6 +371,12 @@ static u64 __calculate_decoder(struct vidc_bus_vote_data *d)
 	llc.total = llc.dpb_read + llc.line_buffer_read +
 			llc.line_buffer_write + ddr.total;
 
+	/* Add 25 percent extra for 960fps use case */
+	if (fps >= MAXIMUM_FPS) {
+		ddr.total += div_u64(ddr.total * 25, 100);
+		llc.total += div_u64(llc.total * 25, 100);
+	}
+
 	/* Dump all the variables for easier debugging */
 	if (msm_vidc_debug & VIDC_BUS) {
 		struct dump dump[] = {

+ 8 - 0
driver/vidc/src/msm_vidc_driver.c

@@ -2629,6 +2629,7 @@ void msm_vidc_allow_dcvs(struct msm_vidc_inst *inst)
 {
 	bool allow = false;
 	struct msm_vidc_core *core;
+	u32 fps;
 
 	if (!inst || !inst->core) {
 		d_vpr_e("%s: Invalid args: %pK\n", __func__, inst);
@@ -2684,6 +2685,13 @@ void msm_vidc_allow_dcvs(struct msm_vidc_inst *inst)
 		goto exit;
 	}
 
+	fps =  msm_vidc_get_fps(inst);
+	if (is_decode_session(inst) && fps >= MAXIMUM_FPS) {
+		allow = false;
+		i_vpr_h(inst, "%s: unsupported fps %d\n", __func__, fps);
+		goto exit;
+	}
+
 exit:
 	i_vpr_hp(inst, "%s: dcvs: %s\n", __func__, allow ? "enabled" : "disabled");