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

Commit 5f6c821e authored by Pawan Kumar's avatar Pawan Kumar
Browse files

msm: mdss: add bus bandwidth request enable/disable during get/free buffer



Enable bus bandwidth request during get/free buffer to ensure
iommu is in proper state while mapping/un-mapping any buffers.

Change-Id: I85cc74a666dbfd29abd26609cbdd3e968d1ecd01
Signed-off-by: default avatarPawan Kumar <pavaku@codeaurora.org>
parent 4ae3b6a5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -695,6 +695,7 @@ int mdss_mdp_overlay_get_buf(struct msm_fb_data_type *mfd,
	if ((num_planes <= 0) || (num_planes > MAX_PLANES))
		return -EINVAL;

	mdss_bus_bandwidth_ctrl(1);
	memset(data, 0, sizeof(*data));
	for (i = 0; i < num_planes; i++) {
		data->p[i].flags = flags;
@@ -708,6 +709,7 @@ int mdss_mdp_overlay_get_buf(struct msm_fb_data_type *mfd,
			break;
		}
	}
	mdss_bus_bandwidth_ctrl(0);

	data->num_planes = i;

@@ -717,8 +719,11 @@ int mdss_mdp_overlay_get_buf(struct msm_fb_data_type *mfd,
int mdss_mdp_overlay_free_buf(struct mdss_mdp_data *data)
{
	int i;

	mdss_bus_bandwidth_ctrl(1);
	for (i = 0; i < data->num_planes && data->p[i].len; i++)
		mdss_mdp_put_img(&data->p[i]);
	mdss_bus_bandwidth_ctrl(0);

	data->num_planes = 0;