]> git.baikalelectronics.ru Git - kernel.git/commit
media: cx23885: Handle additional bufs on interrupt
authorBrad Love <brad@nextdimension.cc>
Tue, 8 May 2018 21:20:16 +0000 (17:20 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 11 May 2018 15:27:36 +0000 (11:27 -0400)
commit5874d2d9398bc34f13ea2a3bc427e1743554c62d
tree0d3c196657aa29e0e99a48682675b12dc9f65de9
parent6a7aef77b956637139940b1651d606a405c28c1f
media: cx23885: Handle additional bufs on interrupt

On Ryzen systems interrupts are occasionally missed:

cx23885: cx23885_wakeup: [ffff99b384b83c00/28] wakeup reg=5406 buf=5405
cx23885: cx23885_wakeup: [ffff99b40bf79400/31] wakeup reg=9537 buf=9536

This patch loops up to five times on wakeup, marking any buffers
found done.

Since the count register is u16, but the vb2 counter is u32, some modulo
arithmetic is used to accommodate wraparound and ensure current active
buffer is the buffer expected.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/pci/cx23885/cx23885-core.c