mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
	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 v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Date: Thu, 21 May 2026 15:22:00 +0530	[thread overview]
Message-ID: <3b7b86b8-2cdf-4c91-bbd0-0ab3c6861b90@oss.qualcomm.com> (raw)
In-Reply-To: <89a81b27-b217-4c74-96c0-c6f813a0768f@linaro.org>


On 5/21/2026 12:57 PM, Neil Armstrong wrote:
> On 5/20/26 17:55, Vikash Garodia wrote:
>>
>> On 5/18/2026 1:09 PM, Neil Armstrong wrote:
>>> On 5/13/26 21:39, Vikash Garodia wrote:
>>>>
>>>> On 5/11/2026 2:50 PM, Neil Armstrong wrote:
>>>>> Add the necessary bits into the gen2 platforms tables and handlers
>>>>> to allow decoding streams into 10bit pixel formats.
>>>>>
>>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>>> ---
>>>>>   .../media/platform/qcom/iris/iris_hfi_gen2_response.c    | 16 +++ 
>>>>> ++ ++++++++++-
>>>>>   drivers/media/platform/qcom/iris/iris_instance.h         |  2 ++
>>>>>   drivers/media/platform/qcom/iris/iris_platform_gen2.c    |  8 +++ 
>>>>> ++---
>>>>>   drivers/media/platform/qcom/iris/iris_vdec.c             |  8 +++ 
>>>>> +++++
>>>>>   4 files changed, 30 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/drivers/media/platform/qcom/iris/ 
>>>>> iris_hfi_gen2_response.c b/drivers/media/platform/qcom/iris/ 
>>>>> iris_hfi_gen2_response.c
>>>>> index 0541e02d7507..b6d815c01f1d 100644
>>>>> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>>> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>>> @@ -542,6 +542,15 @@ static void 
>>>>> iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
>>>>>       pixmp_ip->width = width;
>>>>>       pixmp_ip->height = height;
>>>>> +    if (subsc_params.bit_depth == BIT_DEPTH_8 &&
>>>>> +        pixmp_op->pixelformat != V4L2_PIX_FMT_NV12 &&
>>>>> +        pixmp_op->pixelformat != V4L2_PIX_FMT_QC08C)
>>>>> +        pixmp_op->pixelformat = V4L2_PIX_FMT_NV12;
>>>>> +    else if (subsc_params.bit_depth == BIT_DEPTH_10 &&
>>>>> +         pixmp_op->pixelformat != V4L2_PIX_FMT_P010 &&
>>>>> +         pixmp_op->pixelformat != V4L2_PIX_FMT_QC10C)
>>>>> +        pixmp_op->pixelformat = V4L2_PIX_FMT_P010;
>>>>> +
>>>>>       switch (pixmp_op->pixelformat) {
>>>>>       case V4L2_PIX_FMT_P010:
>>>>>           pixmp_op->width = ALIGN(width, 128);
>>>>> @@ -625,7 +634,12 @@ static void 
>>>>> iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
>>>>>       inst->fw_caps[POC].value = subsc_params.pic_order_cnt;
>>>>>       inst->fw_caps[TIER].value = subsc_params.tier;
>>>>> -    if (subsc_params.bit_depth != BIT_DEPTH_8 ||
>>>>> +    if (subsc_params.bit_depth == BIT_DEPTH_8)
>>>>> +        inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_8;
>>>>> +    else
>>>>> +        inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_10;
>>>>> +
>>>>> +    if ((subsc_params.bit_depth != BIT_DEPTH_8 && 
>>>>> subsc_params.bit_depth != BIT_DEPTH_10) ||
>>>>>           !(subsc_params.coded_frames & 
>>>>> HFI_BITMASK_FRAME_MBS_ONLY_FLAG)) {
>>>>>           dev_err(core->dev, "unsupported content, bit depth: %x, 
>>>>> pic_struct = %x\n",
>>>>>               subsc_params.bit_depth, subsc_params.coded_frames);
>>>>> diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/ 
>>>>> drivers/media/platform/qcom/iris/iris_instance.h
>>>>> index 16965150f427..16424d1e94a6 100644
>>>>> --- a/drivers/media/platform/qcom/iris/iris_instance.h
>>>>> +++ b/drivers/media/platform/qcom/iris/iris_instance.h
>>>>> @@ -25,6 +25,8 @@ enum iris_fmt_type_out {
>>>>>   enum iris_fmt_type_cap {
>>>>>       IRIS_FMT_NV12,
>>>>>       IRIS_FMT_QC08C,
>>>>> +    IRIS_FMT_TP10,
>>>>> +    IRIS_FMT_QC10C,
>>>>>   };
>>>>>   struct iris_fmt {
>>>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c 
>>>>> b/ drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>>>> index 5da90d47f9c6..ceed4b5d96ca 100644
>>>>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>>>> @@ -56,9 +56,10 @@ static const struct platform_inst_fw_cap 
>>>>> inst_fw_cap_sm8550_dec[] = {
>>>>>       {
>>>>>           .cap_id = PROFILE_HEVC,
>>>>>           .min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
>>>>> -        .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
>>>>> +        .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
>>>>
>>>> what about gen1 platforms ?
>>>
>>> With this patchset gen platforms will reject 10bit since all the
>>> plumbing in the HFI response handling is missing.
>>>
>>> Once the Gen1 HFI gets the bit_depth and calculates the buffer sizes, it
>>> should work. But looking at Venus, the 10bit buffer calculation seems 
>>> much
>>> more complex in Gen1.
>>
>> Is it more than accommodating higher buffer size by adding 25% extra 
>> for higher bits for decode scenario ?
> 
> No idea, I haven't looked closely how to implement 10bit on gen1, I just 
> checked if this patchset
> wouldn't cause any regressions.
> 
> It may show P010 and QC10C in enum_fmt, but the PROFILE_HEVC and would 
> not expose MAIN10 on gen1.
> 

I can sense this could lead to compliance failure on gen1 as the driver 
exposes 10bit as supported format but does not allow the configuration. 
I could be wrong here though.

Regards,
Vikash


  reply	other threads:[~2026-05-21  9:52 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5Yg7em0Xca9girDZT52cxZaTg93xJtZD7C2ExswhAkholGSsMsWXMWxtbtsWmkGeJWjp56SmJlLhj55vO4e0nw==@protonmail.internalid>
2026-05-11  9:20 ` [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats Neil Armstrong
2026-05-11  9:20   ` [PATCH v3 1/6] media: qcom: iris: add helpers for 8bit and " Neil Armstrong
2026-05-13 10:25     ` Dmitry Baryshkov
2026-05-13 18:25     ` Vikash Garodia
2026-05-11  9:20   ` [PATCH v3 2/6] media: qcom: iris: add QC10C & P010 buffer size calculations Neil Armstrong
2026-05-13 18:43     ` Vikash Garodia
2026-05-21  8:50       ` Neil Armstrong
2026-05-11  9:20   ` [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding Neil Armstrong
2026-05-13 10:38     ` Dmitry Baryshkov
2026-05-13 18:50     ` Vikash Garodia
2026-05-18  7:32       ` Neil Armstrong
2026-05-21  9:44         ` Vikash Garodia
2026-05-21 12:57           ` Neil Armstrong
2026-05-11  9:20   ` [PATCH v3 4/6] media: qcom: iris: vdec: update size and stride calculations for 10bit formats Neil Armstrong
2026-05-13 10:39     ` Dmitry Baryshkov
2026-05-13 19:05     ` Vikash Garodia
2026-05-18  7:33       ` Neil Armstrong
2026-05-20 15:55         ` Vikash Garodia
2026-05-11  9:20   ` [PATCH v3 5/6] media: qcom: iris: vdec: update find_format to handle 8bit and " Neil Armstrong
2026-05-13 10:47     ` Dmitry Baryshkov
2026-05-13 19:27     ` Vikash Garodia
2026-05-18  7:36       ` Neil Armstrong
2026-05-20 15:30         ` Vikash Garodia
2026-05-20 15:39           ` Neil Armstrong
2026-05-20 15:47             ` Vikash Garodia
2026-05-21  7:18               ` Neil Armstrong
2026-05-15  9:37     ` Bryan O'Donoghue
2026-05-15  9:42     ` Bryan O'Donoghue
2026-05-11  9:20   ` [PATCH v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format Neil Armstrong
2026-05-13 10:45     ` Dmitry Baryshkov
2026-05-13 11:59       ` Neil Armstrong
2026-05-13 12:04         ` Dmitry Baryshkov
2026-05-13 19:39     ` Vikash Garodia
2026-05-18  7:39       ` Neil Armstrong
2026-05-20 15:55         ` Vikash Garodia
2026-05-21  7:27           ` Neil Armstrong
2026-05-21  9:52             ` Vikash Garodia [this message]
2026-05-13  8:50   ` [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats Wangao Wang
2026-05-13 12:11     ` Neil Armstrong
2026-05-13 16:02       ` Neil Armstrong
2026-05-13 16:04         ` Dmitry Baryshkov
2026-05-13 17:33   ` Vikash Garodia
2026-05-18  7:42     ` Neil Armstrong
2026-05-20 15:44       ` Vikash Garodia
2026-05-21  7:24         ` Neil Armstrong
2026-05-21  9:33           ` Vikash Garodia
2026-05-15  9:35   ` Bryan O'Donoghue
2026-05-15  9:38     ` Vikash Garodia
2026-05-21  8:56     ` 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=3b7b86b8-2cdf-4c91-bbd0-0ab3c6861b90@oss.qualcomm.com \
    --to=vikash.garodia@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --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=neil.armstrong@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

all inboxes | Powered by JetHome®