msm: mdss: Ensure remove vsync handler called during ctl stop
With current implementation, vsync handler is never removed in case of shell stop if the call doesn't come from HAL. Due to this in certain cases the vsync ref count is unbalanced. MDP driver should ensure that the vsync handler is always removed explicitly during shell stop. Fix this issue by using separate variable for SLAVE ctx and using MASTER ctx for removing vsync handler. Change-Id: I281b9db0623f9760efea5b2ceb978e648083f156 Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This commit is contained in:
parent
086f9fbaf6
commit
3b7c593e88
1 changed files with 6 additions and 6 deletions
|
@ -497,7 +497,7 @@ static int mdss_mdp_video_intfs_stop(struct mdss_mdp_ctl *ctl,
|
||||||
{
|
{
|
||||||
struct mdss_data_type *mdata;
|
struct mdss_data_type *mdata;
|
||||||
struct mdss_panel_info *pinfo;
|
struct mdss_panel_info *pinfo;
|
||||||
struct mdss_mdp_video_ctx *ctx;
|
struct mdss_mdp_video_ctx *ctx, *sctx = NULL;
|
||||||
struct mdss_mdp_vsync_handler *tmp, *handle;
|
struct mdss_mdp_vsync_handler *tmp, *handle;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -525,18 +525,18 @@ static int mdss_mdp_video_intfs_stop(struct mdss_mdp_ctl *ctl,
|
||||||
if (is_pingpong_split(ctl->mfd)) {
|
if (is_pingpong_split(ctl->mfd)) {
|
||||||
pinfo = &pdata->next->panel_info;
|
pinfo = &pdata->next->panel_info;
|
||||||
|
|
||||||
ctx = (struct mdss_mdp_video_ctx *) ctl->intf_ctx[SLAVE_CTX];
|
sctx = (struct mdss_mdp_video_ctx *) ctl->intf_ctx[SLAVE_CTX];
|
||||||
if (!ctx->ref_cnt) {
|
if (!sctx->ref_cnt) {
|
||||||
pr_err("Intf %d not in use\n", (inum + MDSS_MDP_INTF0));
|
pr_err("Intf %d not in use\n", (inum + MDSS_MDP_INTF0));
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
pr_debug("stop ctl=%d video Intf #%d base=%p", ctl->num,
|
pr_debug("stop ctl=%d video Intf #%d base=%p", ctl->num,
|
||||||
ctx->intf_num, ctx->base);
|
sctx->intf_num, sctx->base);
|
||||||
|
|
||||||
ret = mdss_mdp_video_ctx_stop(ctl, pinfo, ctx);
|
ret = mdss_mdp_video_ctx_stop(ctl, pinfo, sctx);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("mdss_mdp_video_ctx_stop failed for intf: %d",
|
pr_err("mdss_mdp_video_ctx_stop failed for intf: %d",
|
||||||
ctx->intf_num);
|
sctx->intf_num);
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue