From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51D1125B0BC for ; Thu, 21 May 2026 09:52:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779357128; cv=none; b=P/fxrEr98Wqw0gijN3DtLFWbgVkiXMl8lgjAznrAMK8syctbXTblQrIldRNZvb41SgSSGYihyrP6ss13fc7kf5f+MwOAngqvPQMTtj27xzgpfSKIgI7rfqLwyEuaZxMFhf/L7RTmg5Y93L9ob5VxwlK29HKkXH6blhoQEFTCAbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779357128; c=relaxed/simple; bh=PFzCd1ME+IUGqIX1zCgjT2rjAFDO7ig/5gyjqIdXHrA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kkW2ETqWm6scwynuZ3trJQxF6K0o/06etMoGr0VYr1Mtmc5rf+4aj7Tii1wyaP5oeibpa8wJ8lRjI2Cuzzl0PaKa4BDMr5F5RFYC+nHhxuSchl4NmQJ26QLHqxNzFNwIvr4rM+EbVrD34Rs/xTTINKGurcLNybUpSWc5j1aSIiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=EOMi8A+X; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=U1XwvVGr; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="EOMi8A+X"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="U1XwvVGr" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64L9AMbT3556071 for ; Thu, 21 May 2026 09:52:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= HIP7W+4Ot926uFKgVUKYwj6jEusZ85Di/Ri8exHnTMU=; b=EOMi8A+X8SaZd7Tg Urc1qqFdEdoROuL3jr72KDYht8t5TRT+bdYl2eivt9Pb/1FwpFV0LSPGEn/jMsL+ nrHAQBqgMlBw9Q00S+VnPWGgQwqRgyOYtT1OQQdQnke+IxLofpxYUsG+njeFJNEX HJEsU5/5ClCM2RoWJc48AKVTFSWJi/dDym87f/aNnbczMCLtwEzrP+X6l8e51BVG p7z3AGuvjeQ9QlKKdcSRwju8Sa7pZzD/ZlyALJ5y4k/zWyCLOvqBCCAhwvB6Wuun 4gdRNtrar6Euwsct0nR9wfjSWD5f8+8DFSry7lYWPPkDmJ+P5W5/wK63HMsKO7yl zrXAHw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e9fb6kw76-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 21 May 2026 09:52:06 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-369ef27fd09so4131829a91.3 for ; Thu, 21 May 2026 02:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779357126; x=1779961926; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HIP7W+4Ot926uFKgVUKYwj6jEusZ85Di/Ri8exHnTMU=; b=U1XwvVGrElQ5ivS3UBdv1pqwjHZ2Ad6/RKJ8RdPyFkWRCgeJOr7lLmsd2edb9wfZ/a f1hoQCNJoTn2kCmAlr7pnmdq3ABbxZ6olGjDNQVmzc33qrOt2KZhyBgdwEyEgsF7S+kq X36H431zM1DP9oF89sPtxGwzWzlgulHgfKlfGvJZBuNU1R8Tvge+W2bsfyMr8NqFk+3y DGihucREr2AZ5b7DCwdeWsm/X4qzAYco1FxoUVjNCNX4lylJy7bPdhVkdsup2DhLYXsR rWwNLkOOf3FeLJCqG1pHn84zI4Eb3+63uKOQ0mwdtGNtSM6+bR6niKYHUkL13XB+PG7B 55Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779357126; x=1779961926; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HIP7W+4Ot926uFKgVUKYwj6jEusZ85Di/Ri8exHnTMU=; b=rAchIRFbBGIj54OhJM56+c7JfshH0y5dlPRA7a5GQhVcXGmB0C31QLeqBgrJxHx0cH 3Os6neoZuUQfnilP8/QVcZ3reQ5nSVj28+I05Gw7LotrdW8TbV25Khio/k1OrxcNBM7S x/AayzIBUz8fqfT6sWmfuk7ip0rRad56uFQwM7BkwlXQMhYfnpncGF/pZkz52Tl/+zKo gbVUwa/006eR69PVWCUtC8m35dZRD5SHFh3sxZ2RAEV/KwatWpJkj6/0GdVr/lb1GUPL ksMVPhmeCo23+FPkptAmGH784jrPte6JZ11UV79zMYXt7p6iTeUkpnISy0rPfMIpsu8i 9wyQ== X-Forwarded-Encrypted: i=1; AFNElJ+36jlwJMDtYpFJ5fTVe8dDFLY62bTqxHGgTBFwxGHYJnnl2ZOWzC+Oy+nidsVL5S2L862CEtrbtdYkf7U=@vger.kernel.org X-Gm-Message-State: AOJu0YyStcErNgvUBufrgTiTa2sHM2b0/p9QIGt/tC0LNRk/IAJRwbiD X6qo/r8tAhk9uwj1el8sWkMnuVRG0uyT+T1eid8BonFRUEtUrcuqTLL04uRV5gGn0kmfQw3lv/V ItMQ4jzEdHlzP40vBxj9OuvxNxUYG4AT6nWebQ7AnvzUg6Ob4NZZSiAWmMdH/MUH4Njs= X-Gm-Gg: Acq92OEzrzbc6CIbJnf/JyQPDRufA4Xkg+r2iPyqSKgizwT5Vc92p515wlkQxGcsUBC SG2q9++R/v1HYAC91T5ctQT3tFry8UnLlbt4ZHzvI+v0bvLjD6tn+aaurWSdUPeKcoxbKm3htDU sK1R7rtrJp3sJ0EPZrnzX0bE6rL17v2ACloil/A1k33cWA1niCtUAySplibQugTk3ca3hcTrf1U ZzrMKMPymn2ssul4GzzxbtKQsnWUA4ReFeLy4vw/ar9DfqbWWm9wtCggfAl3Yd8SsuurfmCIrQ1 s0nQucjoJp7PUwrygSwxymTm9OpogqjEYm9x326xYKnFHeGGTLbf3UlQzkz9c9zz4eDCx393Yo+ gqH+/Wkekhuj7UQBIZ0D4NEoZBOTcA2J7qeIKoEp2bvHIcH5OSl2tT14= X-Received: by 2002:a17:90b:2e8e:b0:369:bddb:79b0 with SMTP id 98e67ed59e1d1-36a4576327fmr2114570a91.26.1779357125835; Thu, 21 May 2026 02:52:05 -0700 (PDT) X-Received: by 2002:a17:90b:2e8e:b0:369:bddb:79b0 with SMTP id 98e67ed59e1d1-36a4576327fmr2114552a91.26.1779357125322; Thu, 21 May 2026 02:52:05 -0700 (PDT) Received: from [10.204.101.125] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36a4690a4c2sm605162a91.10.2026.05.21.02.52.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 02:52:04 -0700 (PDT) Message-ID: <3b7b86b8-2cdf-4c91-bbd0-0ab3c6861b90@oss.qualcomm.com> Date: Thu, 21 May 2026 15:22:00 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format To: Neil Armstrong , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org> <20260511-topic-sm8x50-iris-10bit-decoding-v3-6-7fc049b93042@linaro.org> <89a81b27-b217-4c74-96c0-c6f813a0768f@linaro.org> Content-Language: en-US From: Vikash Garodia In-Reply-To: <89a81b27-b217-4c74-96c0-c6f813a0768f@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=do/rzVg4 c=1 sm=1 tr=0 ts=6a0ed5c6 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=KKAkSRfTAAAA:8 a=r17rQ0tmIEUrj-diuPAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: dihPWe0B-B-KPn3QWZOYEoWAgyBd-Vsj X-Proofpoint-GUID: dihPWe0B-B-KPn3QWZOYEoWAgyBd-Vsj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDA5OCBTYWx0ZWRfX9aSNKcDUqVnF 1CRqEX6/i/OnjgULVedEBVx0NsqR8ThwEtwC7a94WchZbjQmzDA3NNSGhsOc0S4xXvvrlmeA9TA 3HYLPg/MIGqQ6kKQsoZRnVtYsnhF7r33VFOuEI09ECyeCTSuw0u2sEkcoysRSvSbT73cURd+Qxw PIZc/Neeqx9Fg31nMLkmjKeNNbIjEFucGy1Cw6u9rPvHTB24/+EayyY7GFgXS3SZ08Wb2xd3PiV 4HblwdEqQ26tNNXsTLvNIQ8F66KW0fMXTCmORQ1CXiakyzpJcRqB0/DC4npkyzUwTJwO06QkHcJ p6hqpmT3ujYjtEj8rT9IFPLM+nGxdm+XG0ynIFsjUFF0cv317t8vQeUN2kDNspr8H9XQ29IfI6w bj6tb64KW5GZ89zbvSXfJk9QZzJGuzkULc7xLMdrdeLoctNpnzJFl/573227IxTw+c4hGxRZ7xO oHGrnDMqu1kAQ1o1ttw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-21_01,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605210098 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 >>>>> --- >>>>>   .../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