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

Commit 4b5a5280 authored by QCTECMDR Service's avatar QCTECMDR Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "vidc: Skip unsupported session load in load calculation"

parents 332abefb 817eb40d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1488,6 +1488,7 @@ void *msm_vidc_open(int core_id, int session_type)
	inst->entropy_mode = HFI_H264_ENTROPY_CABAC;
	inst->full_range = COLOR_RANGE_UNSPECIFIED;
	inst->active = true;
	inst->supported = true;

	for (i = SESSION_MSG_INDEX(SESSION_MSG_START);
		i <= SESSION_MSG_INDEX(SESSION_MSG_END); i++) {
+6 −3
Original line number Diff line number Diff line
@@ -817,8 +817,8 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst,
	 *                 |          res * max(op, fps)|
	 * ----------------|----------------------------|
	 */

	if (is_thumbnail_session(inst) ||
	if (!is_supported_session(inst) ||
		is_thumbnail_session(inst) ||
		(!is_realtime_session(inst) &&
		 quirks == LOAD_ADMISSION_CONTROL)) {
		load = 0;
@@ -858,7 +858,6 @@ int msm_comm_get_device_load(struct msm_vidc_core *core,
	list_for_each_entry(inst, &core->instances, list) {
		if (inst->session_type != sess_type)
			continue;

		if (load_type == MSM_VIDC_VIDEO && !is_video_session(inst))
			continue;
		else if (load_type == MSM_VIDC_IMAGE && !is_grid_session(inst))
@@ -3547,6 +3546,7 @@ static int msm_vidc_load_resources(int flipped_state,
			"H/W is overloaded. needed: %d max: %d\n",
			video_load, max_video_load);
		msm_vidc_print_running_insts(inst->core);
		inst->supported = false;
		return -EBUSY;
	}

@@ -3555,6 +3555,7 @@ static int msm_vidc_load_resources(int flipped_state,
			"H/W is overloaded. needed: [video + image][%d + %d], max: [video + image][%d + %d]\n",
			video_load, image_load, max_video_load, max_image_load);
		msm_vidc_print_running_insts(inst->core);
		inst->supported = false;
		return -EBUSY;
	}

@@ -5962,6 +5963,7 @@ static int msm_vidc_check_mbps_supported(struct msm_vidc_inst *inst)
				"H/W is overloaded. needed: %d max: %d\n",
				video_load, max_video_load);
			msm_vidc_print_running_insts(inst->core);
			inst->supported = false;
			return -EBUSY;
		}

@@ -5971,6 +5973,7 @@ static int msm_vidc_check_mbps_supported(struct msm_vidc_inst *inst)
				video_load, image_load,
				max_video_load, max_image_load);
			msm_vidc_print_running_insts(inst->core);
			inst->supported = false;
			return -EBUSY;
		}
	}
+4 −1
Original line number Diff line number Diff line
@@ -157,7 +157,10 @@ static inline bool is_encode_session(struct msm_vidc_inst *inst)
{
	return inst->session_type == MSM_VIDC_ENCODER;
}

static inline bool is_supported_session(struct msm_vidc_inst *inst)
{
	return inst->supported;
}
static inline bool is_primary_output_mode(struct msm_vidc_inst *inst)
{
	return inst->stream_output_mode == HAL_VIDEO_DECODER_PRIMARY;
+1 −0
Original line number Diff line number Diff line
@@ -577,6 +577,7 @@ struct msm_vidc_inst {
	int full_range;
	u64 last_qbuf_time_ns;
	bool active;
	bool supported;
};

extern struct msm_vidc_drv *vidc_driver;