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

Commit 319e7923 authored by Praneeth Paladugu's avatar Praneeth Paladugu
Browse files

msm: vidc: Enhance bus scaling algorithm



Enhance current bus scaling algorithm to make use of run time
UBWC stats of compression ratios(CR) and complexity factor(CF).

CRs-Fixed: 2012520
Change-Id: I3d2f61ab7e49b8fa9f953e3fb381261fde34c42a
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent 998590af
Loading
Loading
Loading
Loading
+196 −374

File changed.

Preview size limit exceeded, changes collapsed.

+7 −0
Original line number Diff line number Diff line
@@ -1320,6 +1320,13 @@ static int hfi_process_session_etb_done(u32 device_id,
	data_done.status = hfi_map_err_status(pkt->error_type);
	data_done.size = sizeof(struct msm_vidc_cb_data_done);
	data_done.clnt_data = pkt->input_tag;
	data_done.input_done.recon_stats.buffer_index =
		pkt->ubwc_cr_stats.frame_index;
	memcpy(&data_done.input_done.recon_stats.ubwc_stats_info,
		&pkt->ubwc_cr_stats.ubwc_stats_info,
		sizeof(data_done.input_done.recon_stats.ubwc_stats_info));
	data_done.input_done.recon_stats.complexity_number =
		pkt->ubwc_cr_stats.complexity_number;
	data_done.input_done.offset = pkt->offset;
	data_done.input_done.filled_len = pkt->filled_len;
	data_done.input_done.packet_buffer =
+1 −0
Original line number Diff line number Diff line
@@ -710,6 +710,7 @@ static int msm_vidc_remove(struct platform_device *pdev)
	v4l2_device_unregister(&core->v4l2_dev);

	msm_vidc_free_platform_resources(&core->resources);
	kfree(core->vote_data);
	sysfs_remove_group(&pdev->dev.kobj, &msm_vidc_core_attr_group);
	dev_set_drvdata(&pdev->dev, NULL);
	mutex_destroy(&core->lock);
+2 −0
Original line number Diff line number Diff line
@@ -513,6 +513,7 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
				msm_comm_get_hal_output_buffer(inst),
				f->fmt.pix_mp.pixelformat);

		inst->clk_data.opb_fourcc = f->fmt.pix_mp.pixelformat;
		if (msm_comm_get_stream_output_mode(inst) ==
			HAL_VIDEO_DECODER_SECONDARY) {
			frame_sz.buffer_type = HAL_BUFFER_OUTPUT2;
@@ -1056,6 +1057,7 @@ int msm_vdec_s_ext_ctrl(struct msm_vidc_inst *inst,
							"%s Failed to get buffer requirements : %d\n",
							__func__, rc);
				}
				inst->clk_data.dpb_fourcc = fourcc;
				break;
			default:
				dprintk(VIDC_ERR,
+13 −0
Original line number Diff line number Diff line
@@ -1482,6 +1482,13 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
		goto fail_start;
	}

	rc = msm_comm_set_recon_buffers(inst);
	if (rc) {
		dprintk(VIDC_ERR,
				"Failed to set recon buffers: %d\n", rc);
		goto fail_start;
	}

	if (msm_comm_get_stream_output_mode(inst) ==
			HAL_VIDEO_DECODER_SECONDARY) {
		rc = msm_comm_set_output_buffers(inst);
@@ -2085,6 +2092,7 @@ void *msm_vidc_open(int core_id, int session_type)
	INIT_MSM_VIDC_LIST(&inst->pending_getpropq);
	INIT_MSM_VIDC_LIST(&inst->outputbufs);
	INIT_MSM_VIDC_LIST(&inst->registeredbufs);
	INIT_MSM_VIDC_LIST(&inst->reconbufs);

	kref_init(&inst->kref);

@@ -2219,6 +2227,11 @@ static void cleanup_instance(struct msm_vidc_inst *inst)
				"Failed to release scratch buffers\n");
		}

		if (msm_comm_release_recon_buffers(inst)) {
			dprintk(VIDC_ERR,
				"Failed to release recon buffers\n");
		}

		if (msm_comm_release_persist_buffers(inst)) {
			dprintk(VIDC_ERR,
				"Failed to release persist buffers\n");
Loading