From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: linux-media@vger.kernel.org
Cc: dafna.hirschfeld@collabora.com, helen.koike@collabora.com,
ezequiel@collabora.com, hverkuil@xs4all.nl, kernel@collabora.com,
dafna3@gmail.com, sakari.ailus@linux.intel.com,
linux-rockchip@lists.infradead.org, mchehab@kernel.org,
laurent.pinchart@ideasonboard.com
Subject: [PATCH 0/5] media: staging: rkisp1: change workqueue to threaded irq in stats
Date: Tue, 12 May 2020 14:05:17 +0200 [thread overview]
Message-ID: <20200512120522.25960-1-dafna.hirschfeld@collabora.com> (raw)
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(-)
--
2.17.1
next reply other threads:[~2020-05-12 12:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 12:05 Dafna Hirschfeld [this message]
2020-05-12 12:05 ` [PATCH 1/5] media: staging: rkisp1: return IRQ_NONE in isr when irq isn't for ISP Dafna Hirschfeld
2020-05-12 15:42 ` kbuild test robot
2020-05-12 15:42 ` kbuild test robot
2020-05-12 15:42 ` kbuild test robot
2020-05-20 10:58 ` Helen Koike
2020-05-20 20:58 ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 2/5] media: staging: rkisp1: use a macro for the statistics flags mask Dafna Hirschfeld
2020-05-20 11:03 ` Helen Koike
2020-05-20 23:27 ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 3/5] media: staging: rkisp1: stats: use spin_lock_irqsave for irq_lock Dafna Hirschfeld
2020-05-20 11:11 ` Helen Koike
2020-05-20 19:22 ` Dafna Hirschfeld
2020-05-20 23:40 ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 4/5] media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lock Dafna Hirschfeld
2020-05-20 23:48 ` Laurent Pinchart
2020-05-20 23:48 ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 5/5] media: staging: rkisp1: replace workqueue with threaded irq for reading statistics registers Dafna Hirschfeld
2020-05-12 16:41 ` kbuild test robot
2020-05-12 16:41 ` kbuild test robot
2020-05-12 16:41 ` kbuild test robot
2020-05-21 0:09 ` Laurent Pinchart
2020-05-21 10:38 ` Tomasz Figa
2020-05-28 19:19 ` Dafna Hirschfeld
2020-05-28 19:35 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200512120522.25960-1-dafna.hirschfeld@collabora.com \
--to=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=ezequiel@collabora.com \
--cc=helen.koike@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.