From: Jordan Crouse <jorcrous@amazon.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: <linux-kernel@vger.kernel.org>,
Albert Esteve <aesteve@redhat.com>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Sergio Lopez <slp@redhat.com>,
Enric Balletbo i Serra <eballetb@redhat.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: venus: dec: Fix capture formats enumeration order
Date: Fri, 3 Mar 2023 15:09:18 -0700 [thread overview]
Message-ID: <20230303220918.qr5ydbin3nye3qtz@amazon.com> (raw)
In-Reply-To: <20230210081835.2054482-1-javierm@redhat.com>
On Fri, Feb 10, 2023 at 09:18:35AM +0100, Javier Martinez Canillas wrote:
> Commit 9593126dae3e ("media: venus: Add a handling of QC08C compressed
> format") and commit cef92b14e653 ("media: venus: Add a handling of QC10C
> compressed format") added support for the QC08C and QC10C compressed
> formats respectively.
>
> But these also caused a regression, because the new formats where added
> at the beginning of the vdec_formats[] array and the vdec_inst_init()
> function sets the default format output and capture using fixed indexes
> of that array:
>
> static void vdec_inst_init(struct venus_inst *inst)
> {
> ...
> inst->fmt_out = &vdec_formats[8];
> inst->fmt_cap = &vdec_formats[0];
> ...
> }
>
> Since now V4L2_PIX_FMT_NV12 is not the first entry in the array anymore,
> the default capture format is not set to that as it was done before.
>
> Both commits changed the first index to keep inst->fmt_out default format
> set to V4L2_PIX_FMT_H264, but did not update the latter to keep .fmt_out
> default format set to V4L2_PIX_FMT_NV12.
>
> Rather than updating the index to the current V4L2_PIX_FMT_NV12 position,
> let's reorder the entries so that this format is the first entry again.
>
> This would also make VIDIOC_ENUM_FMT report the V4L2_PIX_FMT_NV12 format
> with an index 0 as it did before the QC08C and QC10C formats were added.
>
> Fixes: 9593126dae3e ("media: venus: Add a handling of QC08C compressed format")
> Fixes: cef92b14e653 ("media: venus: Add a handling of QC10C compressed format")
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
I just came across this issue independently and can confirm this patch fixes
the GStreamer V4L2 decoder on QRB5165.
Tested-by: Jordan Crouse <jorcrous@amazon.com>
> ---
>
> drivers/media/platform/qcom/venus/vdec.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 4ceaba37e2e5..bb14bea9fe09 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -31,15 +31,15 @@
> */
> static const struct venus_format vdec_formats[] = {
> {
> - .pixfmt = V4L2_PIX_FMT_QC08C,
> + .pixfmt = V4L2_PIX_FMT_NV12,
> .num_planes = 1,
> .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
> }, {
> - .pixfmt = V4L2_PIX_FMT_QC10C,
> + .pixfmt = V4L2_PIX_FMT_QC08C,
> .num_planes = 1,
> .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
> - },{
> - .pixfmt = V4L2_PIX_FMT_NV12,
> + }, {
> + .pixfmt = V4L2_PIX_FMT_QC10C,
> .num_planes = 1,
> .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
> }, {
next prev parent reply other threads:[~2023-03-03 22:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 8:18 [PATCH] media: venus: dec: Fix capture formats enumeration order Javier Martinez Canillas
2023-03-03 22:09 ` Jordan Crouse [this message]
2023-03-06 10:08 ` Javier Martinez Canillas
2023-03-07 4:45 ` Dikshita Agarwal
2023-03-07 8:13 ` Javier Martinez Canillas
2023-03-07 16:20 ` Enric Balletbo i Serra
2023-03-08 18:12 ` Jordan Crouse
2023-03-09 15:18 ` Javier Martinez Canillas
2023-03-22 14:13 ` Javier Martinez Canillas
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=20230303220918.qr5ydbin3nye3qtz@amazon.com \
--to=jorcrous@amazon.com \
--cc=aesteve@redhat.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=eballetb@redhat.com \
--cc=javierm@redhat.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_vgarodia@quicinc.com \
--cc=slp@redhat.com \
--cc=stanimir.k.varbanov@gmail.com \
--cc=stanimir.varbanov@linaro.org \
/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