Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Avi Weiss <thnkslprpt@gmail.com>
Cc: Mirela Rabulea <mirela.rabulea@nxp.com>,
	linux-media@vger.kernel.org, Ming Qian <ming.qian@nxp.com>,
	Hans Verkuil <hverkuil@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	imx@lists.linux.dev
Subject: Re: [PATCH] media: imx-jpeg: propagate encoder command errors
Date: Mon, 12 Oct 2026 13:59:38 -0500	[thread overview]
Message-ID: <as0uGtw28KYy_Tzo@SMW015318> (raw)
In-Reply-To: <20261012141824.497906-1-thnkslprpt@gmail.com>

On Mon, Oct 12, 2026 at 05:18:24PM +0300, Avi Weiss wrote:
> [You don't often get email from thnkslprpt@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> mxc_jpeg_encoder_cmd() returns success when
> v4l2_m2m_ioctl_encoder_cmd() fails. When an encoder command is issued
> while the mem2mem context is draining, the helper returns -EBUSY,
> but userspace sees success.
>
> Return the helper error, as mxc_jpeg_decoder_cmd() already does.
> No obvious reason to clobber the error here.
>
> Fixes: 4911c5acf935 ("media: imx-jpeg: Implement drain using v4l2-mem2mem helpers")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> index e17085935435..5e466ea65a92 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> @@ -1726,7 +1726,7 @@ static int mxc_jpeg_encoder_cmd(struct file *file, void *priv,
>         ret = v4l2_m2m_ioctl_encoder_cmd(file, fh, cmd);
>         spin_unlock_irqrestore(&ctx->mxc_jpeg->hw_lock, flags);
>         if (ret < 0)
> -               return 0;
> +               return ret;
>
>         if (cmd->cmd == V4L2_ENC_CMD_STOP &&
>             v4l2_m2m_has_stopped(fh->m2m_ctx))
>
> base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8
> --
> 2.43.0
>
>

  reply	other threads:[~2026-10-12 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 14:18 [PATCH] media: imx-jpeg: propagate encoder command errors Avi Weiss
2026-10-12 18:59 ` Frank Li [this message]
2026-10-13  2:01 ` [EXT] " Ming Qian
2026-10-13 14:47   ` Frank Li

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=as0uGtw28KYy_Tzo@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=hverkuil@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=mirela.rabulea@nxp.com \
    --cc=thnkslprpt@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox