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>
This commit is contained in:

committed by
Tomi Valkeinen

parent
3d84b65aa6
commit
1ceafc0091
@@ -453,6 +453,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr,
|
||||
rg = ofbi->region;
|
||||
|
||||
down_write_nested(&rg->lock, rg->id);
|
||||
atomic_inc(&rg->lock_count);
|
||||
|
||||
if (atomic_read(&rg->map_count)) {
|
||||
r = -EBUSY;
|
||||
@@ -484,6 +485,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
r = count;
|
||||
out:
|
||||
atomic_dec(&rg->lock_count);
|
||||
up_write(&rg->lock);
|
||||
|
||||
unlock_fb_info(fbi);
|
||||
|
Reference in New Issue
Block a user