From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, Hans Verkuil <hverkuil@xs4all.nl>,
Philipp Zabel <p.zabel@pengutronix.de>,
Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 6/6] hantro: Make sure we don't use post-processor on an encoder
Date: Thu, 25 Jun 2020 13:35:25 -0300 [thread overview]
Message-ID: <20200625163525.5119-7-ezequiel@collabora.com> (raw)
In-Reply-To: <20200625163525.5119-1-ezequiel@collabora.com>
Commit 986eee3a5234f fixed hantro_needs_postproc condition,
but missed one case. Encoders don't have any post-processor
hardware block, so also can't be disabled.
Fix it.
Fixes: 986eee3a5234f ("media: hantro: Prevent encoders from using post-processing")
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
drivers/staging/media/hantro/hantro_drv.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
index 0936f0c41af9..b622bbe181c1 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -122,10 +122,12 @@ void hantro_start_prepare_run(struct hantro_ctx *ctx)
v4l2_ctrl_request_setup(src_buf->vb2_buf.req_obj.req,
&ctx->ctrl_handler);
- if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt))
- hantro_postproc_enable(ctx);
- else
- hantro_postproc_disable(ctx);
+ if (!hantro_is_encoder_ctx(ctx)) {
+ if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt))
+ hantro_postproc_enable(ctx);
+ else
+ hantro_postproc_disable(ctx);
+ }
}
void hantro_end_prepare_run(struct hantro_ctx *ctx)
--
2.26.0.rc2
prev parent reply other threads:[~2020-06-25 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 16:35 [PATCH 0/6] Hantro low-hanging cleanups Ezequiel Garcia
2020-06-25 16:35 ` [PATCH 1/6] hantro: h264: Remove unused macro definition Ezequiel Garcia
2020-06-25 16:35 ` [PATCH 2/6] hantro: h264: Rename scaling list handling function Ezequiel Garcia
2020-06-25 16:35 ` [PATCH 3/6] hantro: Rework how encoder and decoder are identified Ezequiel Garcia
2020-06-26 7:58 ` Philipp Zabel
2020-06-26 18:30 ` Ezequiel Garcia
2020-06-26 9:52 ` Robin Murphy
2020-06-26 18:31 ` Ezequiel Garcia
2020-06-25 16:35 ` [PATCH 4/6] hantro: Move hantro_enc_buf_finish to JPEG codec_ops.done Ezequiel Garcia
2020-06-25 16:35 ` [PATCH 5/6] hantro: Remove unused bytesused argument Ezequiel Garcia
2020-06-25 16:35 ` Ezequiel Garcia [this message]
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=20200625163525.5119-7-ezequiel@collabora.com \
--to=ezequiel@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).