mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
[media] v4l: vsp1: Fix spinlock in mixed IRQ context function
The wpf_configure() function can be called both from IRQ and non-IRQ contexts, use spin_lock_irqsave(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
fc6e514a72
commit
225c2926d8
1 changed files with 3 additions and 2 deletions
|
@ -189,11 +189,12 @@ static void wpf_configure(struct vsp1_entity *entity,
|
|||
if (params == VSP1_ENTITY_PARAMS_RUNTIME) {
|
||||
const unsigned int mask = BIT(WPF_CTRL_VFLIP)
|
||||
| BIT(WPF_CTRL_HFLIP);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&wpf->flip.lock);
|
||||
spin_lock_irqsave(&wpf->flip.lock, flags);
|
||||
wpf->flip.active = (wpf->flip.active & ~mask)
|
||||
| (wpf->flip.pending & mask);
|
||||
spin_unlock(&wpf->flip.lock);
|
||||
spin_unlock_irqrestore(&wpf->flip.lock, flags);
|
||||
|
||||
outfmt = (wpf->alpha << VI6_WPF_OUTFMT_PDV_SHIFT) | wpf->outfmt;
|
||||
|
||||
|
|
Loading…
Reference in a new issue