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

Commit dfdce271 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Disable DCVS when Turbo mode is enabled"

parents 1fc9fe2c 390f7a41
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ static void msm_comm_generate_session_error(struct msm_vidc_inst *inst);
static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst);
static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst);
static void handle_session_error(enum hal_command_response cmd, void *data);
static void handle_session_error(enum hal_command_response cmd, void *data);


static inline bool is_turbo_session(struct msm_vidc_inst *inst)
bool msm_comm_turbo_session(struct msm_vidc_inst *inst)
{
{
	return !!(inst->flags & VIDC_TURBO);
	return !!(inst->flags & VIDC_TURBO);
}
}
@@ -122,7 +122,7 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst,
			load = 0;
			load = 0;
	}
	}


	if (is_turbo_session(inst)) {
	if (msm_comm_turbo_session(inst)) {
		if (!(quirks & LOAD_CALC_IGNORE_TURBO_LOAD))
		if (!(quirks & LOAD_CALC_IGNORE_TURBO_LOAD))
			load = inst->core->resources.max_load;
			load = inst->core->resources.max_load;
	}
	}
@@ -304,7 +304,7 @@ static int msm_comm_vote_bus(struct msm_vidc_core *core)
		vote_data[i].width = inst->prop.width[CAPTURE_PORT];
		vote_data[i].width = inst->prop.width[CAPTURE_PORT];
		vote_data[i].height = inst->prop.height[CAPTURE_PORT];
		vote_data[i].height = inst->prop.height[CAPTURE_PORT];
		vote_data[i].fps = inst->prop.fps;
		vote_data[i].fps = inst->prop.fps;
		if (is_turbo_session(inst))
		if (msm_comm_turbo_session(inst))
			vote_data[i].power_mode = VIDC_POWER_TURBO;
			vote_data[i].power_mode = VIDC_POWER_TURBO;
		else if (is_low_power_session(inst))
		else if (is_low_power_session(inst))
			vote_data[i].power_mode = VIDC_POWER_LOW;
			vote_data[i].power_mode = VIDC_POWER_LOW;
@@ -2331,7 +2331,7 @@ static void msm_vidc_print_running_insts(struct msm_vidc_core *core)
			if (is_thumbnail_session(temp))
			if (is_thumbnail_session(temp))
				strlcat(properties, "N", sizeof(properties));
				strlcat(properties, "N", sizeof(properties));


			if (is_turbo_session(temp))
			if (msm_comm_turbo_session(temp))
				strlcat(properties, "T", sizeof(properties));
				strlcat(properties, "T", sizeof(properties));


			dprintk(VIDC_ERR, "%4d|%4d|%4d|%4d|%4s\n",
			dprintk(VIDC_ERR, "%4d|%4d|%4d|%4d|%4s\n",
+1 −0
Original line number Original line Diff line number Diff line
@@ -86,4 +86,5 @@ int msm_comm_set_color_format(struct msm_vidc_inst *inst,
int msm_comm_g_ctrl(struct msm_vidc_inst *inst, int id);
int msm_comm_g_ctrl(struct msm_vidc_inst *inst, int id);
void msm_comm_cleanup_internal_buffers(struct msm_vidc_inst *inst);
void msm_comm_cleanup_internal_buffers(struct msm_vidc_inst *inst);
int msm_vidc_comm_s_parm(struct msm_vidc_inst *inst, struct v4l2_streamparm *a);
int msm_vidc_comm_s_parm(struct msm_vidc_inst *inst, struct v4l2_streamparm *a);
bool msm_comm_turbo_session(struct msm_vidc_inst *inst);
#endif
#endif
+4 −2
Original line number Original line Diff line number Diff line
@@ -507,7 +507,8 @@ static int msm_dcvs_check_supported(struct msm_vidc_inst *inst)
	dcvs = &inst->dcvs;
	dcvs = &inst->dcvs;
	instance_count = msm_dcvs_count_active_instances(core);
	instance_count = msm_dcvs_count_active_instances(core);


	if (instance_count == 1 && inst->session_type == MSM_VIDC_DECODER) {
	if (instance_count == 1 && inst->session_type == MSM_VIDC_DECODER &&
		!msm_comm_turbo_session(inst)) {
		num_mbs_per_frame = msm_dcvs_get_mbs_per_frame(inst);
		num_mbs_per_frame = msm_dcvs_get_mbs_per_frame(inst);
		output_buf_req = get_buff_req_buffer(inst,
		output_buf_req = get_buff_req_buffer(inst,
			msm_comm_get_hal_output_buffer(inst));
			msm_comm_get_hal_output_buffer(inst));
@@ -533,7 +534,8 @@ static int msm_dcvs_check_supported(struct msm_vidc_inst *inst)
			return -EINVAL;
			return -EINVAL;
		}
		}
	} else if (instance_count == 1 &&
	} else if (instance_count == 1 &&
			inst->session_type == MSM_VIDC_ENCODER) {
			inst->session_type == MSM_VIDC_ENCODER &&
			!msm_comm_turbo_session(inst)) {
		if (!msm_dcvs_enc_check(inst) ||
		if (!msm_dcvs_enc_check(inst) ||
			!inst->dcvs.is_additional_buff_added)
			!inst->dcvs.is_additional_buff_added)
			return -ENOTSUPP;
			return -ENOTSUPP;