From: Ezequiel Garcia <ezequiel@collabora.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
linux-media@vger.kernel.org,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: kernel@collabora.com, Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 4/5] media: coda: Remove pic_run_work worker
Date: Thu, 25 Apr 2019 15:35:45 -0300 [thread overview]
Message-ID: <20190425183546.16244-5-ezequiel@collabora.com> (raw)
In-Reply-To: <20190425183546.16244-1-ezequiel@collabora.com>
There isn't any reason to run the mem2mem job on a separate worker,
because the mem2mem framework guarantees that device_run will never
run in interrupt context.
Therefore, get rid of the extra pic_run_work worker, and instead
run the job in the context of .device_run itself.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
drivers/media/platform/coda/coda-common.c | 9 ---------
drivers/media/platform/coda/coda.h | 1 -
2 files changed, 10 deletions(-)
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 617d4547ec82..e0227593a649 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1306,14 +1306,6 @@ static void coda_device_run(void *m2m_priv)
{
struct coda_ctx *ctx = m2m_priv;
struct coda_dev *dev = ctx->dev;
-
- queue_work(dev->workqueue, &ctx->pic_run_work);
-}
-
-static void coda_pic_run_work(struct work_struct *work)
-{
- struct coda_ctx *ctx = container_of(work, struct coda_ctx, pic_run_work);
- struct coda_dev *dev = ctx->dev;
int ret;
mutex_lock(&ctx->buffer_mutex);
@@ -2233,7 +2225,6 @@ static int coda_open(struct file *file)
ctx->ops = ctx->cvd->ops;
ctx->use_bit = !ctx->cvd->direct;
init_completion(&ctx->completion);
- INIT_WORK(&ctx->pic_run_work, coda_pic_run_work);
if (ctx->ops->seq_end_work)
INIT_WORK(&ctx->seq_end_work, ctx->ops->seq_end_work);
v4l2_fh_init(&ctx->fh, video_devdata(file));
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
index 31c80bda2c0b..6870edeb6324 100644
--- a/drivers/media/platform/coda/coda.h
+++ b/drivers/media/platform/coda/coda.h
@@ -194,7 +194,6 @@ struct coda_context_ops {
struct coda_ctx {
struct coda_dev *dev;
struct mutex buffer_mutex;
- struct work_struct pic_run_work;
struct work_struct seq_end_work;
struct completion completion;
const struct coda_video_device *cvd;
--
2.20.1
next prev parent reply other threads:[~2019-04-25 18:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:35 [PATCH 0/5] Assorted CODA fixes Ezequiel Garcia
2019-04-25 18:35 ` [PATCH 1/5] media: coda: Print a nicer device registered message Ezequiel Garcia
2019-04-25 18:39 ` Hans Verkuil
2019-04-25 18:35 ` [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock Ezequiel Garcia
2019-04-26 7:58 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt Ezequiel Garcia
2019-04-26 7:59 ` Philipp Zabel
2019-04-26 9:16 ` Philipp Zabel
2019-04-26 17:56 ` Ezequiel Garcia
2019-04-29 9:13 ` Philipp Zabel
2019-04-25 18:35 ` Ezequiel Garcia [this message]
2019-04-26 8:11 ` [PATCH 4/5] media: coda: Remove pic_run_work worker Philipp Zabel
2019-04-26 18:19 ` Ezequiel Garcia
2019-04-29 9:55 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 5/5] media: coda: Clear the interrupt reason Ezequiel Garcia
2019-04-26 8:12 ` Philipp Zabel
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=20190425183546.16244-5-ezequiel@collabora.com \
--to=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox