diff options
| author | Ingrid Gallardo <ingridg@codeaurora.org> | 2014-10-10 18:50:19 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:34:56 -0700 |
| commit | 51494f8d469413a04e1f9fcde89a52f0039751df (patch) | |
| tree | cf0ac01c3e8778ec84122e008f2d64ca341de747 /drivers/video/fbdev/msm | |
| parent | e4cf22a1fe47e554496c04e2f2aabfcaba5abd92 (diff) | |
msm: mdss: avoid skip pipe reconfiguration if pipe was freed
Current driver does not configure the pipe if the requested
data is same as the data already in the pipe.
This is a problem and can cause underruns in cases where
the pipe is freed due some error and driver tries to
setup previous configuration.
These changes make sure that if pipe was freed due some error,
driver will not skip the re-configuration of the pipe.
Change-Id: I36fc1644b4bdf413b308f7f7b5edcf97dcc8ec0b
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_overlay.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index def5f7f167fe..20eda2b9d2d8 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -452,6 +452,7 @@ struct mdss_mdp_pipe { struct mdp_overlay req_data; u32 params_changed; + bool dirty; struct mdss_mdp_pipe_smp_map smp_map[MAX_PLANES]; diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index c6be61f8bfbd..614407246022 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -775,7 +775,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, req->flags ^= mfd->panel_orientation; req->priority = pipe->priority; - if (!memcmp(req, &pipe->req_data, sizeof(*req))) { + if (!pipe->dirty && !memcmp(req, &pipe->req_data, sizeof(*req))) { pr_debug("skipping pipe_reconfiguration\n"); goto skip_reconfigure; } @@ -972,6 +972,7 @@ cursor_done: req->vert_deci = pipe->vert_deci; pipe->req_data = *req; + pipe->dirty = false; pipe->params_changed++; skip_reconfigure: @@ -996,6 +997,7 @@ exit_fail: pr_debug("freeing allocations for pipe %d\n", pipe->num); mdss_mdp_smp_unreserve(pipe); pipe->params_changed = 0; + pipe->dirty = true; } mutex_unlock(&mdp5_data->list_lock); return ret; |
