diff options
| author | Dhaval Patel <pdhaval@codeaurora.org> | 2015-12-22 14:22:33 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:14:47 -0700 |
| commit | 23249cac8fb15b6ebcef7c3057d08aea5e491deb (patch) | |
| tree | cde0cc9b65fdfe6fe53497369d48c66b90636c3c /drivers/video/fbdev/msm/mdss_util.c | |
| parent | 6c8c0f62d3ced4b8bb812a6fbe13cfa1902718f5 (diff) | |
msm: mdss: check intr line status before handling isr
Hardware might return/call the pending interrupt
on one CPU when same interrupt is disabled from other
core. Such parallel processing may lead to unclocked
register access in interrupt context followed by
panic. It is safe to check the interrupt line status
before handling isr to avoid crash in such race
condition.
Change-Id: I460550cb5188c7f77b9f741682917010f9231a50
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm/mdss_util.c')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_util.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_util.c b/drivers/video/fbdev/msm/mdss_util.c index 965be3bf09db..3a9ff9b6adb3 100644 --- a/drivers/video/fbdev/msm/mdss_util.c +++ b/drivers/video/fbdev/msm/mdss_util.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2007-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2007-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -160,3 +160,15 @@ struct mdss_util_intf *mdss_get_util_intf() return &mdss_util; } EXPORT_SYMBOL(mdss_get_util_intf); + +/* This routine should only be called from interrupt context */ +bool mdss_get_irq_enable_state(struct mdss_hw *hw) +{ + bool is_irq_enabled; + + spin_lock(&mdss_lock); + is_irq_enabled = hw->irq_info->irq_ena; + spin_unlock(&mdss_lock); + + return is_irq_enabled; +} |
