diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-03-17 22:28:50 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-03 16:18:46 +0400 |
commit | 1ceafc00910439c8e5450fae189b69427725992c (patch) | |
tree | 5b98fb03b1885dc64b335965bd73686b818e368c /drivers/video/omap2/omapfb/omapfb.h | |
parent | 3d84b65aa63833a2ac07b1cc626984a1e1485fed (diff) | |
download | linux-1ceafc00910439c8e5450fae189b69427725992c.tar.xz |
OMAP: DSS2: OMAPFB: Add some locking debug checks
Trigger WARN_ON() messages from various places in the code in case the
memory region is not currently locked.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb.h')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index 676b55d98941..1305fc9880ba 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h @@ -56,6 +56,7 @@ struct omapfb2_mem_region { bool map; /* kernel mapped by the driver */ atomic_t map_count; struct rw_semaphore lock; + atomic_t lock_count; }; /* appended to fb_info */ @@ -166,11 +167,13 @@ static inline struct omapfb2_mem_region * omapfb_get_mem_region(struct omapfb2_mem_region *rg) { down_read_nested(&rg->lock, rg->id); + atomic_inc(&rg->lock_count); return rg; } static inline void omapfb_put_mem_region(struct omapfb2_mem_region *rg) { + atomic_dec(&rg->lock_count); up_read(&rg->lock); } |