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

Commit 52d94c51 authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: Enable support for slave side CP



Add the required alignment for secure video session
to acheive content protection at slave side.
Also assign the heap mask id to allocate the video
buffers as per the legacy SMMU driver.

Change-Id: I881713e22121d27364fedd0bd2c4cd95a827c114
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 031e28bb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ Optional properties:
  scalable = 0x1 (if the driver should vary the clock's frequency based on load)
- qcom,sw-power-collapse = A bool indicating if video hardware core can be
  power collapsed in idle state.
- qcom,slave-side-cp = A bool indicating the content protection mode for an
  ongoing video session. It is true for targets where the mode is slave side.
- qcom,never-unload-fw = A bool indicating if video firmware should be not be
  unloaded after all active sessions have closed.  Once a new session starts up
  after this, the firmware will be ready to go.  This should be set on platforms
@@ -201,6 +203,7 @@ Example:
						<0x1fe 0x2>;
		qcom,enable-thermal-mitigation;
		qcom,use-non-secure-pil;
		qcom,slave-side-cp;
		qcom,use_dynamic_bw_update;
		qcom,fw-bias = <0xe000000>;
		msm_vidc_cb1: msm_vidc_cb1 {
+6 −0
Original line number Diff line number Diff line
@@ -326,6 +326,12 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,

		ion_flags |= ION_FLAG_SECURE | secure_flag;
		heap_mask = ION_HEAP(ION_SECURE_HEAP_ID);

		if (client->res->slave_side_cp) {
			heap_mask = ION_HEAP(ION_CP_MM_HEAP_ID);
			size = ALIGN(size, SZ_1M);
			align = ALIGN(size, SZ_1M);
		}
	}

	trace_msm_smem_buffer_ion_op_start("ALLOC", (u32)buffer_type,
+5 −0
Original line number Diff line number Diff line
@@ -748,6 +748,11 @@ int read_platform_resources_from_dt(
	of_property_read_u32(pdev->dev.of_node,
			"qcom,pm-qos-latency-us", &res->pm_qos_latency_us);

	res->slave_side_cp = of_property_read_bool(pdev->dev.of_node,
					"qcom,slave-side-cp");
	dprintk(VIDC_DBG, "Slave side cp = %s\n",
				res->slave_side_cp ? "yes" : "no");

	return rc;

err_setup_legacy_cb:
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ struct msm_vidc_platform_resources {
	bool use_non_secure_pil;
	bool sw_power_collapsible;
	bool sys_idle_indicator;
	bool slave_side_cp;
	struct list_head context_banks;
	bool thermal_mitigable;
	const char *fw_name;