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

Commit 5397d43a authored by Srinu Gorle's avatar Srinu Gorle
Browse files

msm: vidc_3x: Add changes to read video CMA configuration information



this change reads video CMA address ranges and stage 1 bypass information
associated with video context bank.

Change-Id: I2305552081a24f94267081e3980a92663be59ab1
Signed-off-by: default avatarSrinu Gorle <sgorle@codeaurora.org>
parent 5d5cee52
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1473,6 +1473,13 @@ static int msm_vidc_populate_context_bank(struct device *dev,
		goto err_setup_cb;
	}

	rc = of_property_read_u32_array(np, "cma-addr-pool",
			(u32 *)&cb->cma.addr_range, 2);

	cb->cma.s1_bypass = of_property_read_bool(np, "qcom,cma-s1-bypass");
	if (cb->cma.s1_bypass && !rc)
		core->resources.cma_exist = true;

	cb->is_secure = of_property_read_bool(np, "qcom,secure-context-bank");
	dprintk(VIDC_DBG, "context bank %s : secure = %d\n",
			cb->name, cb->is_secure);
@@ -1485,9 +1492,10 @@ static int msm_vidc_populate_context_bank(struct device *dev,
		goto err_setup_cb;
	}
	dprintk(VIDC_DBG,
		"context bank %s address start = %x address size = %x buffer_type = %x\n",
		cb->name, cb->addr_range.start,
		cb->addr_range.size, cb->buffer_type);
		"context bank %s address start = %x size = %x cma address start = %x size = %x s1 bypass = %d buffer_type = %x\n",
		cb->name, cb->addr_range.start, cb->addr_range.size,
		cb->cma.addr_range.start, cb->cma.addr_range.size,
		cb->cma.s1_bypass, cb->buffer_type);

	rc = msm_vidc_setup_context_bank(cb, dev);
	if (rc) {
+7 −0
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@ struct addr_set {
	int count;
};

struct cma_info {
	struct addr_range addr_range;
	bool s1_bypass;
};

struct context_bank_info {
	struct list_head list;
	const char *name;
@@ -78,6 +83,7 @@ struct context_bank_info {
	struct dma_iommu_mapping *mapping;
	int sids[VENUS_SID_MAX];
	int num_sids;
	struct cma_info cma;
};

struct buffer_usage_table {
@@ -193,6 +199,7 @@ struct msm_vidc_platform_resources {
	uint32_t pm_qos_latency_us;
	uint32_t max_inst_count;
	uint32_t max_secure_inst_count;
	bool cma_exist;
};

static inline bool is_iommu_present(struct msm_vidc_platform_resources *res)