public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 6/7] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
Date: Wed, 15 Apr 2026 09:35:59 +0200	[thread overview]
Message-ID: <fd6e7780-12eb-4fb3-bd83-ccbfbc1c09e8@linaro.org> (raw)
In-Reply-To: <faa04229-1070-3a2f-94e6-a7e238fb8121@oss.qualcomm.com>

Hi,

On 4/15/26 08:39, Vishnu Reddy wrote:
> 
> On 4/8/2026 10:13 PM, Neil Armstrong wrote:
>> The 10bit pixel format can be only used when the decoder identifies the
>> stream as decoding into 10bit pixel format buffers, so update the
>> find_format helpers to filter the formats.
> 
> This series breaks the v4l2 compliance tests for the existing platforms.
> Decoder failed for below:
> VIDIOC_S_FMT: FAIL
> Cropping: FAIL
> Composing: FAIL
> Encoder streaming tests failed.
> Please check once.

Sure I'll run the test before posting v2.

Neil

> 
> Regards,
> Vishnu Reddy.
> 
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>   .../platform/qcom/iris/iris_platform_common.h      |  1 +
>>   drivers/media/platform/qcom/iris/iris_vdec.c       | 41 ++++++++++++++++++++--
>>   2 files changed, 40 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
>> index 5a489917580e..cd3509da4b75 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
>> @@ -18,6 +18,7 @@ struct iris_inst;
>>   #define REGISTER_BIT_DEPTH(luma, chroma)    ((luma) << 16 | (chroma))
>>   #define BIT_DEPTH_8                REGISTER_BIT_DEPTH(8, 8)
>> +#define BIT_DEPTH_10                REGISTER_BIT_DEPTH(10, 10)
>>   #define CODED_FRAMES_PROGRESSIVE        0x0
>>   #define DEFAULT_MAX_HOST_BUF_COUNT        64
>>   #define DEFAULT_MAX_HOST_BURST_BUF_COUNT    256
>> diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c
>> index ca0518c27834..bfc13c1044c7 100644
>> --- a/drivers/media/platform/qcom/iris/iris_vdec.c
>> +++ b/drivers/media/platform/qcom/iris/iris_vdec.c
>> @@ -105,6 +105,16 @@ find_format(struct iris_inst *inst, u32 pixfmt, u32 type)
>>       if (i == size || fmt[i].type != type)
>>           return NULL;
>> +    if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
>> +        if (iris_fmt_is_8bit(fmt[i].pixfmt) &&
>> +            inst->fw_caps[BIT_DEPTH].value == BIT_DEPTH_8)
>> +            return NULL;
>> +
>> +        if (iris_fmt_is_10bit(fmt[i].pixfmt) &&
>> +            inst->fw_caps[BIT_DEPTH].value != BIT_DEPTH_10)
>> +            return NULL;
>> +    }
>> +
>>       return &fmt[i];
>>   }
>> @@ -113,6 +123,7 @@ find_format_by_index(struct iris_inst *inst, u32 index, u32 type)
>>   {
>>       const struct iris_fmt *fmt = NULL;
>>       unsigned int size = 0;
>> +    unsigned int i, k = 0;
>>       switch (type) {
>>       case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
>> @@ -127,10 +138,36 @@ find_format_by_index(struct iris_inst *inst, u32 index, u32 type)
>>           return NULL;
>>       }
>> -    if (index >= size || fmt[index].type != type)
>> +    if (index >= size)
>>           return NULL;
>> -    return &fmt[index];
>> +    if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
>> +        if (fmt[index].type != type)
>> +            return NULL;
>> +
>> +        return &fmt[index];
>> +    }
>> +
>> +    /* Loop over the valid capture formats and return the index */
>> +    for (i = 0; i < size; i++) {
>> +        if (fmt[i].type != type)
>> +            continue;
>> +
>> +        if (iris_fmt_is_8bit(fmt[i].pixfmt) &&
>> +            inst->fw_caps[BIT_DEPTH].value == BIT_DEPTH_10)
>> +            continue;
>> +
>> +        if (iris_fmt_is_10bit(fmt[i].pixfmt) &&
>> +            inst->fw_caps[BIT_DEPTH].value != BIT_DEPTH_10)
>> +            continue;
>> +
>> +        if (k == index)
>> +            return &fmt[i];
>> +
>> +        k++;
>> +    }
>> +
>> +    return NULL;
>>   }
>>   int iris_vdec_enum_fmt(struct iris_inst *inst, struct v4l2_fmtdesc *f)
>>


  reply	other threads:[~2026-04-15  7:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 16:43 [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 1/7] media: qcom: iris: add QC10C & P010 buffer size calculations Neil Armstrong
2026-04-08 23:59   ` Dmitry Baryshkov
2026-04-09  7:25     ` Neil Armstrong
2026-04-11 16:13       ` Dmitry Baryshkov
2026-04-17  6:47   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 2/7] media: qcom: iris: gen2: add support for 10bit decoding Neil Armstrong
2026-04-17  7:22   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-21  5:24       ` Dikshita Agarwal
2026-04-21  7:42         ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 3/7] media: qcom: iris: add helpers for 8bit and 10bit formats Neil Armstrong
2026-04-17  7:23   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 4/7] media: qcom: iris: vdec: update size and stride calculations for " Neil Armstrong
2026-04-10 10:10   ` Vishnu Reddy
2026-04-10 11:59     ` Neil Armstrong
2026-04-10 12:57       ` Vishnu Reddy
2026-04-10 13:47         ` Neil Armstrong
2026-04-14 23:39       ` Nicolas Dufresne
2026-04-08 16:43 ` [PATCH RFC 5/7] media: qcom: iris: vdec: forbid g_fmt while waiting for first source change Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 6/7] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats Neil Armstrong
2026-04-15  6:39   ` Vishnu Reddy
2026-04-15  7:35     ` Neil Armstrong [this message]
2026-04-08 16:44 ` [PATCH RFC 7/7] media: qcom: iris: vdec: allow decoding into 10bit format Neil Armstrong
2026-04-09  0:02 ` [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats Dmitry Baryshkov
2026-04-09  1:04   ` Nicolas Dufresne
2026-04-09  1:40     ` Dmitry Baryshkov
2026-04-09  7:43       ` Neil Armstrong
2026-04-09  7:36     ` Neil Armstrong
2026-04-09 13:19       ` Nicolas Dufresne
2026-04-10 12:00         ` Neil Armstrong
2026-04-10 16:25           ` Neil Armstrong
2026-04-11 17:10             ` Dmitry Baryshkov
2026-04-14 15:35             ` Neil Armstrong

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=fd6e7780-12eb-4fb3-bd83-ccbfbc1c09e8@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=vikash.garodia@oss.qualcomm.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