mirror of https://gitee.com/openkylin/linux.git
drm/omap: reorganize locking in mgr_fld_write
Fix sparse warning: drivers/gpu/drm/omapdrm/dss/dispc.c:387:9: warning: context imbalance in 'mgr_fld_write' - different lock contexts for basic block Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
663ac57b28
commit
fe6b503910
|
@ -396,13 +396,13 @@ static void mgr_fld_write(struct dispc_device *dispc, enum omap_channel channel,
|
||||||
const bool need_lock = rfld.reg == DISPC_CONTROL || rfld.reg == DISPC_CONFIG;
|
const bool need_lock = rfld.reg == DISPC_CONTROL || rfld.reg == DISPC_CONFIG;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (need_lock)
|
if (need_lock) {
|
||||||
spin_lock_irqsave(&dispc->control_lock, flags);
|
spin_lock_irqsave(&dispc->control_lock, flags);
|
||||||
|
REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low);
|
||||||
REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low);
|
|
||||||
|
|
||||||
if (need_lock)
|
|
||||||
spin_unlock_irqrestore(&dispc->control_lock, flags);
|
spin_unlock_irqrestore(&dispc->control_lock, flags);
|
||||||
|
} else {
|
||||||
|
REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dispc_get_num_ovls(struct dispc_device *dispc)
|
static int dispc_get_num_ovls(struct dispc_device *dispc)
|
||||||
|
|
Loading…
Reference in New Issue