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

Commit 3856a267 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: add 32 bit support in video driver"

parents f624b4d6 11c74bcc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -307,7 +307,9 @@ static const struct v4l2_file_operations msm_v4l2_vidc_fops = {
	.open = msm_v4l2_open,
	.release = msm_v4l2_close,
	.unlocked_ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
	.compat_ioctl32 = msm_v4l2_private,
#endif
	.poll = msm_v4l2_poll,
};

+8 −6
Original line number Diff line number Diff line
@@ -597,7 +597,7 @@ static unsigned long msm_vidc_calc_freq_ar50(struct msm_vidc_inst *inst,

		vsp_cycles = mbs_per_second * inst->clk_data.entry->vsp_cycles;
		/* 10 / 7 is overhead factor */
		vsp_cycles += ((fps * filled_len * 8) * 10) / 7;
		vsp_cycles += div_u64((fps * filled_len * 8 * 10), 7);

	} else {
		dprintk(VIDC_ERR, "Unknown session type = %s\n", __func__);
@@ -677,11 +677,12 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst,
			vsp_factor_num *= operating_rate;
			vsp_factor_den *= inst->prop.fps;
		}
		vsp_cycles += ((u64)inst->clk_data.bitrate * vsp_factor_num) /
				vsp_factor_den;
		vsp_cycles += div_u64(((u64)inst->clk_data.bitrate *
				vsp_factor_num), vsp_factor_den);

		/* sw overhead factor */
		sw_overhead = ((u64)vsp_cycles * fw_vpp_cycles) / vpp_cycles;
		sw_overhead = div_u64((u64)vsp_cycles * fw_vpp_cycles,
				vpp_cycles);
		vsp_cycles += max(vsp_cycles/20, sw_overhead);

		/* 21 / 20 is minimum overhead factor */
@@ -697,10 +698,11 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst,
		vsp_cycles = mbs_per_second * inst->clk_data.entry->vsp_cycles;

		/* vsp perf is about 0.5 bits/cycle */
		vsp_cycles += ((fps * filled_len * 8) * 10) / 5;
		vsp_cycles += div_u64((fps * filled_len * 8 * 10), 5);

		/* sw overhead factor */
		sw_overhead = ((u64)vsp_cycles * fw_vpp_cycles) / vpp_cycles;
		sw_overhead = div_u64(((u64)vsp_cycles * fw_vpp_cycles),
				vpp_cycles);
		vsp_cycles += max(vsp_cycles/20, sw_overhead);

		/* 21 / 20 is minimum overhead factor */
+1 −1
Original line number Diff line number Diff line
@@ -1094,7 +1094,7 @@ static int msm_vidc_setup_context_bank(struct msm_vidc_platform_resources *res,
		dev->dma_parms =
			devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
	dma_set_seg_boundary(dev, DMA_BIT_MASK(64));
	dma_set_seg_boundary(dev, (unsigned long)DMA_BIT_MASK(64));

	dprintk(VIDC_DBG, "Attached %s and created mapping\n", dev_name(dev));
	dprintk(VIDC_DBG,