Skip to content

media: staging: rkisp1: change workqueue to threaded irq in stats

Dafna Hirschfeld linux-media linux-rockchip oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5media: staging: rkisp1: return IRQ_NONE in isr when irq isn't for ISPdrivers/staging/media/rkisp1/rkisp1-capture.c drivers/staging/media/rkisp1/rkisp1-common.h drivers/staging/media/rkisp1/rkisp1-dev.c +1 more+27 -122 replies
2/5media: staging: rkisp1: use a macro for the statistics flags maskdrivers/staging/media/rkisp1/rkisp1-common.h drivers/staging/media/rkisp1/rkisp1-isp.c drivers/staging/media/rkisp1/rkisp1-stats.c+8 -132 replies
3/5media: staging: rkisp1: stats: use spin_lock_irqsave for irq_lockdrivers/staging/media/rkisp1/rkisp1-stats.c+3 -23 replies
4/5media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lockdrivers/staging/media/rkisp1/rkisp1-common.h drivers/staging/media/rkisp1/rkisp1-stats.c+15 -171 reply
5/5media: staging: rkisp1: replace workqueue with threaded irq for reading statistics registersdrivers/staging/media/rkisp1/TODO drivers/staging/media/rkisp1/rkisp1-common.h drivers/staging/media/rkisp1/rkisp1-dev.c +2 more+76 -1104 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchHelen KoikeLaurent Pinchart
1/5A-b R-b
2/5A-b R-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] media: staging: rkisp1: change workqueue to threaded irq in stats

Reading the statistics registers might take too long
to run inside the irq handler. Currently it is deferred to bottom half using workqueues. This patch replaces the workqueue with threaded interrupts.
This fixes an item in the TODO file to move the driver from staging.

Patches Summary:
1. Since the irq is shared, the isr should return either IRQ_NONE or IRQ_HANDELD. This patch fixes it. In later patch, IRQ_WAKE_THREAD will be added.
2. Replace a long bitwise-or of the statistics flags with a macro to improve readability
3. Fixes a bug of using spin_lock instead of spin_lock_irqsave inside an irq handler
3. Replace two locks in the rkisp1_stats object with one lock that protects the 'is_streaming' variable and the 'stat' list of buffers.
4. Replaces the workqueue with threaded irq in the statistics.

The code is tested using the 'cam' command from libcamera:

cam -c 1 -C -s width=1280,height=960 --file="/tmp/libcamframe#.data"

Dafna Hirschfeld (4):
media: staging: rkisp1: use a macro for the statistics flags mask
media: staging: rkisp1: stats: use spin_lock_irqsave for irq_lock
media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with
one lock
media: staging: rkisp1: replace workqueue with threaded irq for
reading statistics registers

Helen Koike (1):
media: staging: rkisp1: return IRQ_NONE in isr when irq isn't for ISP

 drivers/staging/media/rkisp1/TODO             |   1 -
 drivers/staging/media/rkisp1/rkisp1-capture.c |   7 +-
 drivers/staging/media/rkisp1/rkisp1-common.h  |  20 +-
 drivers/staging/media/rkisp1/rkisp1-dev.c     |  22 +-
 drivers/staging/media/rkisp1/rkisp1-isp.c     |  20 +-
 drivers/staging/media/rkisp1/rkisp1-stats.c   | 197 +++++++-----------
 6 files changed, 121 insertions(+), 146 deletions(-)
Signature · 1 line
2.17.1