summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenet Clark <benetc@codeaurora.org>2015-09-15 15:56:21 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:46:11 -0700
commita8d2bc0179052be17c972c8ddb0cfae8fdc71b98 (patch)
tree76d53bb15a5a6592b6b0773b08663cf387d70217
parent5b73c7a4aa299a6e3533cc6efd5eb5bece5f9fb8 (diff)
msm: mdss: Clear PP software state when fb device is released
The postprocessing software state retaining which features are enabled needs to be cleared when an fb device is released. Otherwise, the PP features will be reenabled the next time a fb device is opened, writing stale configurations to the hardware which are no longer valid. Change-Id: Ie02670b731a8a89fb578c16d545af5daa46f8c2e Signed-off-by: Benet Clark <benetc@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c
index 4090b8d1f053..0236b55253ff 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c
@@ -6612,6 +6612,9 @@ static int pp_mfd_release_all(struct msm_fb_data_type *mfd)
if (mdss_mdp_mfd_valid_dspp(mfd))
mdss_mdp_hist_stop(mfd->index + MDP_LOGICAL_BLOCK_DISP_0);
+ memset(&mdss_pp_res->pp_disp_sts[mfd->index], 0,
+ sizeof(mdss_pp_res->pp_disp_sts[mfd->index]));
+ mfd->bl_scale = 1024;
return ret;
}
@@ -6641,10 +6644,13 @@ static int pp_mfd_ad_release_all(struct msm_fb_data_type *mfd)
}
if (!ad->mfd)
return 0;
+
ctl = mfd_to_ctl(mfd);
if (ctl && ctl->ops.remove_vsync_handler)
ctl->ops.remove_vsync_handler(ctl, &ad->handle);
cancel_work_sync(&ad->calc_work);
+ ad->state = 0;
+
return ret;
}