msm: mdss: attach iommu dynamically for video mode panel
MDSS driver supports iommu dynamic attach only when splash thread is enabled. Client might want to attach the iommu dynamically without using splash thread to avoid blink for video mode panel. That is possible by doing 1-to-1 memory mapping before iommu attach and splash memory late release. This change supports the dynamic memory mapping to avoid splash thread. Release the splash memory in first commit instead of first suspend resume. CRs-fixed: 755804 Change-Id: I7dcb415644a54a4b80f700c4d0914511a5685830 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org> Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This commit is contained in:
parent
b5d7349b2f
commit
4c8199537e
2 changed files with 19 additions and 4 deletions
|
@ -1315,6 +1315,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
|
||||||
if (!mdp5_data->mdata->batfet)
|
if (!mdp5_data->mdata->batfet)
|
||||||
mdss_mdp_batfet_ctrl(mdp5_data->mdata, true);
|
mdss_mdp_batfet_ctrl(mdp5_data->mdata, true);
|
||||||
mdss_mdp_release_splash_pipe(mfd);
|
mdss_mdp_release_splash_pipe(mfd);
|
||||||
|
mdss_mdp_splash_cleanup(mfd, true);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (mfd->panel_info->cont_splash_enabled) {
|
} else if (mfd->panel_info->cont_splash_enabled) {
|
||||||
mutex_lock(&mdp5_data->list_lock);
|
mutex_lock(&mdp5_data->list_lock);
|
||||||
|
|
|
@ -253,11 +253,24 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,
|
||||||
if (!ctl)
|
if (!ctl)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (mfd->splash_info.iommu_dynamic_attached ||
|
if (!mfd->panel_info->cont_splash_enabled ||
|
||||||
!mfd->panel_info->cont_splash_enabled)
|
(mfd->splash_info.iommu_dynamic_attached && !use_borderfill)) {
|
||||||
|
if (mfd->splash_info.iommu_dynamic_attached &&
|
||||||
|
use_borderfill) {
|
||||||
|
mdss_mdp_splash_unmap_splash_mem(mfd);
|
||||||
|
memblock_free(mdp5_data->splash_mem_addr,
|
||||||
|
mdp5_data->splash_mem_size);
|
||||||
|
mdss_free_bootmem(mdp5_data->splash_mem_addr,
|
||||||
|
mdp5_data->splash_mem_size);
|
||||||
|
}
|
||||||
goto end;
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_borderfill && mdp5_data->handoff) {
|
/* 1-to-1 mapping */
|
||||||
|
mdss_mdp_splash_iommu_attach(mfd);
|
||||||
|
|
||||||
|
if (use_borderfill && mdp5_data->handoff &&
|
||||||
|
!mfd->splash_info.iommu_dynamic_attached) {
|
||||||
/*
|
/*
|
||||||
* Set up border-fill on the handed off pipes.
|
* Set up border-fill on the handed off pipes.
|
||||||
* This is needed to ensure that there are no memory
|
* This is needed to ensure that there are no memory
|
||||||
|
@ -293,7 +306,8 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,
|
||||||
|
|
||||||
mdss_mdp_ctl_splash_finish(ctl, mdp5_data->handoff);
|
mdss_mdp_ctl_splash_finish(ctl, mdp5_data->handoff);
|
||||||
|
|
||||||
if (mdp5_data->splash_mem_addr) {
|
if (mdp5_data->splash_mem_addr &&
|
||||||
|
!mfd->splash_info.iommu_dynamic_attached) {
|
||||||
/* Give back the reserved memory to the system */
|
/* Give back the reserved memory to the system */
|
||||||
memblock_free(mdp5_data->splash_mem_addr,
|
memblock_free(mdp5_data->splash_mem_addr,
|
||||||
mdp5_data->splash_mem_size);
|
mdp5_data->splash_mem_size);
|
||||||
|
|
Loading…
Add table
Reference in a new issue