summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb/omapfb.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-04 14:55:18 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-07 16:55:03 +0200
commitb41deecbda70067b26a3a7704fdf967a7940935b (patch)
tree5d609dc0469c58a29f18cd8e3eb427e427e9cca3 /drivers/video/omap2/omapfb/omapfb.h
parent636f4e1b45c6204c6912cefa2bdbe22e00784a43 (diff)
downloadlinux-b41deecbda70067b26a3a7704fdf967a7940935b.tar.gz
linux-b41deecbda70067b26a3a7704fdf967a7940935b.tar.bz2
linux-b41deecbda70067b26a3a7704fdf967a7940935b.zip
OMAPFB: simplify locking
Kernel lock verification code has lately detected possible circular locking in omapfb. The exact problem is unclear, but omapfb's current locking seems to be overly complex. This patch simplifies the locking in the following ways: - Remove explicit omapfb mem region locking. I couldn't figure out the need for this, as long as we take care to take omapfb lock. - Get omapfb lock always, even if the operation is possibly only related to one fb_info. Better safe than sorry, and normally there's only one user for the fb so this shouldn't matter. - Make sure fb_info lock is taken first, then omapfb lock. With this patch the warnings about possible circular locking does not happen anymore. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb.h')
-rw-r--r--drivers/video/omap2/omapfb/omapfb.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
index b93086f4306d..71cd8bab31c0 100644
--- a/drivers/video/omap2/omapfb/omapfb.h
+++ b/drivers/video/omap2/omapfb/omapfb.h
@@ -62,8 +62,6 @@ struct omapfb2_mem_region {
bool alloc; /* allocated by the driver */
bool map; /* kernel mapped by the driver */
atomic_t map_count;
- struct rw_semaphore lock;
- atomic_t lock_count;
};
/* appended to fb_info */
@@ -191,18 +189,4 @@ static inline int omapfb_overlay_enable(struct omap_overlay *ovl,
return ovl->disable(ovl);
}
-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);
-}
-
#endif