diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-03-17 15:28:50 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-03 08:18:46 -0400 |
commit | 1ceafc00910439c8e5450fae189b69427725992c (patch) | |
tree | 5b98fb03b1885dc64b335965bd73686b818e368c /drivers/video/omap2/omapfb/omapfb-main.c | |
parent | 3d84b65aa63833a2ac07b1cc626984a1e1485fed (diff) |
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-main.c')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index a3f72ba79958..a545e8d4817f 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -668,6 +668,8 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var) | |||
668 | 668 | ||
669 | DBG("check_fb_var %d\n", ofbi->id); | 669 | DBG("check_fb_var %d\n", ofbi->id); |
670 | 670 | ||
671 | WARN_ON(!atomic_read(&ofbi->region->lock_count)); | ||
672 | |||
671 | r = fb_mode_to_dss_mode(var, &mode); | 673 | r = fb_mode_to_dss_mode(var, &mode); |
672 | if (r) { | 674 | if (r) { |
673 | DBG("cannot convert var to omap dss mode\n"); | 675 | DBG("cannot convert var to omap dss mode\n"); |
@@ -873,6 +875,8 @@ int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, | |||
873 | int rotation = var->rotate; | 875 | int rotation = var->rotate; |
874 | int i; | 876 | int i; |
875 | 877 | ||
878 | WARN_ON(!atomic_read(&ofbi->region->lock_count)); | ||
879 | |||
876 | for (i = 0; i < ofbi->num_overlays; i++) { | 880 | for (i = 0; i < ofbi->num_overlays; i++) { |
877 | if (ovl != ofbi->overlays[i]) | 881 | if (ovl != ofbi->overlays[i]) |
878 | continue; | 882 | continue; |
@@ -966,6 +970,8 @@ int omapfb_apply_changes(struct fb_info *fbi, int init) | |||
966 | fill_fb(fbi); | 970 | fill_fb(fbi); |
967 | #endif | 971 | #endif |
968 | 972 | ||
973 | WARN_ON(!atomic_read(&ofbi->region->lock_count)); | ||
974 | |||
969 | for (i = 0; i < ofbi->num_overlays; i++) { | 975 | for (i = 0; i < ofbi->num_overlays; i++) { |
970 | ovl = ofbi->overlays[i]; | 976 | ovl = ofbi->overlays[i]; |
971 | 977 | ||