diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2020-04-15 05:17:14 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-04-15 05:17:13 -0700 |
| commit | 460e8d10e88cbba45baf76ccfdfa23ceacc6d600 (patch) | |
| tree | e4203ad6bd4ef0a597b469e20153712cacacc5b9 | |
| parent | a4896cc8c835959d2cd37168547765b949695838 (diff) | |
| parent | f25360d98491203b1691e63b89c251a0c2f57a8a (diff) | |
Merge "fbdev: msm: Fix race condition during te_irq calls"
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.c | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_panel.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index cc5f21131809..bffbb731dd4a 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -3685,6 +3685,7 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev) pdata = &ctrl_pdata->panel_data; init_completion(&pdata->te_done); + mutex_init(&pdata->te_mutex); if (pdata->panel_info.type == MIPI_CMD_PANEL) { if (!te_irq_registered) { rc = devm_request_irq(&pdev->dev, diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h index 200acc5e61aa..bc2513296fd8 100644 --- a/drivers/video/fbdev/msm/mdss_panel.h +++ b/drivers/video/fbdev/msm/mdss_panel.h @@ -1014,6 +1014,7 @@ struct mdss_panel_data { int panel_te_gpio; bool is_te_irq_enabled; + struct mutex te_mutex; struct completion te_done; }; @@ -1033,6 +1034,7 @@ static inline void panel_update_te_irq(struct mdss_panel_data *pdata, return; } + mutex_lock(&pdata->te_mutex); if (enable && !pdata->is_te_irq_enabled) { enable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = true; @@ -1040,6 +1042,8 @@ static inline void panel_update_te_irq(struct mdss_panel_data *pdata, disable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = false; } + mutex_unlock(&pdata->te_mutex); + } /** |
