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

Commit fbc2f1ba authored by Arun Menon's avatar Arun Menon Committed by Matt Wagantall
Browse files

msm: vidc: Update capture port only for non-DS usecases after reconfig



Do not update height and width on capture port, if downscalar
is explicitly enabled from v4l2 client. Without this change,
when OPB-DPB were configured in split mode, driver would not
update the new frame dimensions on capture port.

Change-Id: Ic6668406ced61565ae3cc96c145acc81f9ecc3b1
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent 86a27c8c
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1055,13 +1055,20 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
	f->fmt.pix_mp.pixelformat = fmt->fourcc;
	f->fmt.pix_mp.num_planes = fmt->num_planes;
	if (inst->in_reconfig) {
		bool ds_enabled = msm_comm_g_ctrl(inst,
			V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO);

		/*
		 * Do not update height and width on capture port, if
		 * downscalar is explicitly enabled from v4l2 client.
		 */
		if (msm_comm_get_stream_output_mode(inst) ==
				HAL_VIDEO_DECODER_PRIMARY) {
			inst->prop.height[CAPTURE_PORT] = inst->reconfig_height;
			inst->prop.width[CAPTURE_PORT] = inst->reconfig_width;
			HAL_VIDEO_DECODER_SECONDARY && ds_enabled) {
			inst->prop.height[OUTPUT_PORT] = inst->reconfig_height;
			inst->prop.width[OUTPUT_PORT] = inst->reconfig_width;
		} else {
			inst->prop.height[CAPTURE_PORT] = inst->reconfig_height;
			inst->prop.width[CAPTURE_PORT] = inst->reconfig_width;
			inst->prop.height[OUTPUT_PORT] = inst->reconfig_height;
			inst->prop.width[OUTPUT_PORT] = inst->reconfig_width;
		}
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static inline bool is_thumbnail_session(struct msm_vidc_inst *inst)
	return !!(inst->flags & VIDC_THUMBNAIL);
}

static int msm_comm_g_ctrl(struct msm_vidc_inst *inst, int id)
int msm_comm_g_ctrl(struct msm_vidc_inst *inst, int id)
{
	int rc = 0;
	struct v4l2_control ctrl = {
+1 −0
Original line number Diff line number Diff line
@@ -83,4 +83,5 @@ int msm_comm_get_load(struct msm_vidc_core *core,
			enum session_type type, enum load_calc_quirks quirks);
int msm_comm_set_color_format(struct msm_vidc_inst *inst,
		enum hal_buffer buffer_type, int fourcc);
int msm_comm_g_ctrl(struct msm_vidc_inst *inst, int id);
#endif