Commit 238a4132 authored by Jani Nikula's avatar Jani Nikula Committed by Tomi Valkeinen

OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking order

Framebuffer ioctl processing forces lock_fb_info() -> omapfb_lock()
locking order. Follow that order to avoid possible circular locking
dependency, detected by lockdep.
Signed-off-by: default avatarJani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@nokia.com>
parent 508886cf
...@@ -183,13 +183,13 @@ int omapfb_update_window(struct fb_info *fbi, ...@@ -183,13 +183,13 @@ int omapfb_update_window(struct fb_info *fbi,
struct omapfb2_device *fbdev = ofbi->fbdev; struct omapfb2_device *fbdev = ofbi->fbdev;
int r; int r;
omapfb_lock(fbdev);
lock_fb_info(fbi); lock_fb_info(fbi);
omapfb_lock(fbdev);
r = omapfb_update_window_nolock(fbi, x, y, w, h); r = omapfb_update_window_nolock(fbi, x, y, w, h);
unlock_fb_info(fbi);
omapfb_unlock(fbdev); omapfb_unlock(fbdev);
unlock_fb_info(fbi);
return r; return r;
} }
......
...@@ -137,8 +137,8 @@ static ssize_t show_overlays(struct device *dev, ...@@ -137,8 +137,8 @@ static ssize_t show_overlays(struct device *dev,
ssize_t l = 0; ssize_t l = 0;
int t; int t;
omapfb_lock(fbdev);
lock_fb_info(fbi); lock_fb_info(fbi);
omapfb_lock(fbdev);
for (t = 0; t < ofbi->num_overlays; t++) { for (t = 0; t < ofbi->num_overlays; t++) {
struct omap_overlay *ovl = ofbi->overlays[t]; struct omap_overlay *ovl = ofbi->overlays[t];
...@@ -154,8 +154,8 @@ static ssize_t show_overlays(struct device *dev, ...@@ -154,8 +154,8 @@ static ssize_t show_overlays(struct device *dev,
l += snprintf(buf + l, PAGE_SIZE - l, "\n"); l += snprintf(buf + l, PAGE_SIZE - l, "\n");
unlock_fb_info(fbi);
omapfb_unlock(fbdev); omapfb_unlock(fbdev);
unlock_fb_info(fbi);
return l; return l;
} }
...@@ -195,8 +195,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr, ...@@ -195,8 +195,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
len = len - 1; len = len - 1;
omapfb_lock(fbdev);
lock_fb_info(fbi); lock_fb_info(fbi);
omapfb_lock(fbdev);
if (len > 0) { if (len > 0) {
char *p = (char *)buf; char *p = (char *)buf;
...@@ -303,8 +303,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr, ...@@ -303,8 +303,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
r = count; r = count;
out: out:
unlock_fb_info(fbi);
omapfb_unlock(fbdev); omapfb_unlock(fbdev);
unlock_fb_info(fbi);
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment