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

Commit a1f9ca13 authored by Dhaval Patel's avatar Dhaval Patel Committed by Matt Wagantall
Browse files

msm: mdss: add trace points for external API calls



Add trace points for buffer map/unamp and
msm bus scale request API calls to find
the actual latency.

Change-Id: Ic141af071f7edaa9814b4c341d7468e1d76e573b
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent b2b5b4e6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -304,6 +304,7 @@ static int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt,
	int new_uc_idx;
	u64 ab_quota[MAX_AXI_PORT_COUNT] = {0, 0};
	u64 ib_quota[MAX_AXI_PORT_COUNT] = {0, 0};
	int rc;

	if (mdss_res->bus_hdl < 1) {
		pr_err("invalid bus handle %d\n", mdss_res->bus_hdl);
@@ -390,8 +391,12 @@ static int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt,
	}
	mdss_res->curr_bw_uc_idx = new_uc_idx;

	return msm_bus_scale_client_update_request(mdss_res->bus_hdl,
	ATRACE_BEGIN("msm_bus_scale_req");
	rc = msm_bus_scale_client_update_request(mdss_res->bus_hdl,
		new_uc_idx);
	ATRACE_END("msm_bus_scale_req");

	return rc;
}

int mdss_enable_bus_vote(int usecase_ndx)
+4 −1
Original line number Diff line number Diff line
@@ -258,12 +258,13 @@ static int mdss_smmu_map_dma_buf_v2(struct dma_buf *dma_buf,
		pr_err("not able to get smmu context\n");
		return -EINVAL;
	}

	ATRACE_BEGIN("map_buffer");
	rc = dma_map_sg(mdss_smmu->dev, table->sgl, table->nents, dir);
	if (!rc) {
		pr_err("dma map sg failed\n");
		return -ENOMEM;
	}
	ATRACE_END("map_buffer");
	*iova = table->sgl->dma_address;
	*size = table->sgl->dma_length;
	return 0;
@@ -278,7 +279,9 @@ static void mdss_smmu_unmap_dma_buf_v2(struct sg_table *table, int domain,
		return;
	}

	ATRACE_BEGIN("unmap_buffer");
	dma_unmap_sg(mdss_smmu->dev, table->sgl, table->nents, dir);
	ATRACE_END("unmap_buffer");
}

/*