diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-02-12 08:16:08 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-03-01 08:18:18 +0100 |
commit | fe6b503910e9d794d64e6dd311f4d5c80514069f (patch) | |
tree | dedacbc8dd8819aaea097ad12470b899e6432aa9 /drivers/gpu/drm/omapdrm | |
parent | drm: omapdrm: venc: Allocate the venc private data structure dynamically (diff) | |
download | linux-fe6b503910e9d794d64e6dd311f4d5c80514069f.tar.xz linux-fe6b503910e9d794d64e6dd311f4d5c80514069f.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dispc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index ce470b51e326..d2d95c76a313 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -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; unsigned long flags; - if (need_lock) + if (need_lock) { spin_lock_irqsave(&dispc->control_lock, flags); - - REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low); - - if (need_lock) + REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low); 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) |