msm: mdss: Fix mdp img mapping and unmapping for ion memory
Setting the correct return value for successful ion memory mapping and handling the unmapping for ion memory. Change-Id: I005ed3c4b09ddc9e559fa41929f11beb702d373d Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
31646184c9
commit
88c7adfadd
1 changed files with 9 additions and 7 deletions
|
@ -687,14 +687,15 @@ int mdss_mdp_put_img(struct mdss_mdp_img_data *data)
|
||||||
msm_unmap_dma_buf(data->srcp_table,
|
msm_unmap_dma_buf(data->srcp_table,
|
||||||
mdss_get_iommu_domain(domain), 0);
|
mdss_get_iommu_domain(domain), 0);
|
||||||
|
|
||||||
dma_buf_unmap_attachment(data->srcp_attachment,
|
|
||||||
data->srcp_table,
|
|
||||||
DMA_BIDIRECTIONAL);
|
|
||||||
|
|
||||||
dma_buf_detach(data->srcp_dma_buf,
|
|
||||||
data->srcp_attachment);
|
|
||||||
dma_buf_put(data->srcp_dma_buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dma_buf_unmap_attachment(data->srcp_attachment,
|
||||||
|
data->srcp_table, DMA_BIDIRECTIONAL);
|
||||||
|
|
||||||
|
dma_buf_detach(data->srcp_dma_buf,
|
||||||
|
data->srcp_attachment);
|
||||||
|
dma_buf_put(data->srcp_dma_buf);
|
||||||
|
|
||||||
data->srcp_dma_buf = NULL;
|
data->srcp_dma_buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -774,6 +775,7 @@ int mdss_mdp_get_img(struct msmfb_data *img, struct mdss_mdp_img_data *data,
|
||||||
} else {
|
} else {
|
||||||
*start = sg_phys(data->srcp_table->sgl);
|
*start = sg_phys(data->srcp_table->sgl);
|
||||||
*len = data->srcp_table->sgl->length;
|
*len = data->srcp_table->sgl->length;
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR_VALUE(ret)) {
|
if (IS_ERR_VALUE(ret)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue