From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 CB0FB340412 for ; Wed, 20 May 2026 15:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779292514; cv=none; b=gKDU38DokWNzyPKPfPQ+9Cnv3aQUn1h7rpJn/tbOxUpTgjYv/dCG2pcLZn0phfsh85kv/+dBD9BBJnyMNLHiKjG2eAJlehOripiqUssnAiQ7OrSvr4dHSYdt2l18mdAdqzhjz4xFUF+Q9mJy7uHNheNkTAegLCUzKCzrYhNDTok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779292514; c=relaxed/simple; bh=MydiYcdXJJMPGn73m/PQRjZzWFHIM0/ltWmmjFvlNTs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=F4W3vNVpp+glelz+I8ST83vt1eRr+/bHKxtmbErb2oJnWdHaVGh8AXtOmFQakFEloPPpEmtuh8mLPpisOxEpba+2qbq2LmS48zvIzL28/yeVq4lD3OwArPpEP4eAfJNjxhKm9Qc8zYr4YknvaEW68j+KK145UeW7Ct5YeQNEB3E= 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=gC+SUY9T; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IKzR4tjf; arc=none smtp.client-ip=205.220.180.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="gC+SUY9T"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IKzR4tjf" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64KCe254316416 for ; Wed, 20 May 2026 15:55:08 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= qUEo38Z2UW1bOtQms5iEEXiqGfAj5J5aVFe+L1H443A=; b=gC+SUY9TytPD84Lz nLaz2UD3iJnhCx15pYJ5krXjDqdfFIH+mIEwZS/s+SLrOTtf3eSqZFDM9SXAVLua WB1gLIuPa5PMDk9TLXs9P6vwENE2ofXr90KVU117ph1CMvAYR6duFwc2oufgQNjY WgpWGuSKgoCzzoOXf8EZDVX47dLqNJ6jIVvwg7h2f4mygRDgzYlenbWplDTYMfcQ ykREZLuniKH7yDTTQY7VxhRWTXwFCilkA4+OZMvRi4eJj3qF3he+DmXaW+tATTSA /bDWXg6ai6o+8m8sQ+473k38WD4MpeJjGGGSBxstpxe3vzQYXe/eKa+C2iEiyGbo vcQF2Q== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e9d5qrsku-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 20 May 2026 15:55:07 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-365faf6006dso5128357a91.1 for ; Wed, 20 May 2026 08:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779292507; x=1779897307; 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=qUEo38Z2UW1bOtQms5iEEXiqGfAj5J5aVFe+L1H443A=; b=IKzR4tjfee9WZP4bf2suY4IM13RcajAMVn/q6vjV+k4oHBNlZYU+3n4lqAHPzTyvBT Ewm9bKBdGbQnK4eaORHAyrdGQeWb8l69FLJ+srjS4vxPKe+hfas/biZHWwxAIcw2LLV0 oAfC3DRBIDVNICqxiGoLrvWPRA8XnU/x3CAsACo9tQAZPzQCrdACESNIG6aVIXF+KBV3 HUHiix7pAwuVksMSxAON9U09kdkTyF8McWG2otGigDNZoQ1v1Bnud0Qo6vLpY9Md4132 soO7+x5zsV8gxGXxA3zNjsvEe+s31wH+QPPmWhxfCH/AqZmNl1gPmYphvWI2BJlLSj6C CSHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779292507; x=1779897307; 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=qUEo38Z2UW1bOtQms5iEEXiqGfAj5J5aVFe+L1H443A=; b=KKb44nvZqjBHCv2wyWEx8B3dnDUKVb+dPwInNpVC1ZdM1dO7tz/GKcNs7Z4melULKq WWMmFVkLJETbyjNlV2gZNWO1GhtTkgMgwkbm2eDwfubRAOFQT0yM8P1Io2IrwLwArSxx V6T9n8EXNOWwGEPtLRqpRptjKyE5PUcEuTCKKO8pJAe4KSP4B2gA3ai1L2ENRkIO8UD+ dGF/y7QFqkKyB0m7htq427Ss2QZ0stkUU7TcBPrZqSN1yn7pz4yB4otf5cHsJBSJE7/h 2wsTEinBqYpN/H9QxzHgM+byumrv5GBeyx/Tmf0vwrpsEnkZlVAtKCGFIoHO36l64TaX I3AA== X-Forwarded-Encrypted: i=1; AFNElJ+DccQDZgxDjEUCCICfYGXkGzPBA9FHI1rHLXnVSgP+y7z3m6CJxH0ip1nNoAogGN/PRStCMYS/FxTVZcE=@vger.kernel.org X-Gm-Message-State: AOJu0YxQDNrLI/Kc5Pyhpksm1CjjxVBA73AiviBDUHEclyDEJ+0Achke SLzzbK0P3ldVxzlZFaABvGQltQG1AZ+8Z93oxo1PXPMRBcq8x+uKT5JSdxzCmhSW9QkMV+TrHpM Lb4xiD0COFrj3nG2xzkJig3alnLfQWxStP1iEjX5VRfQRcUIymd+hkFTTI1q52mX1sEs= X-Gm-Gg: Acq92OE/bJe2eRe/od89BsVt6Njw/EcbQbcWFNmk9KxnDS450ArO5zo6dIBrjRWdvP+ DEF1C8fhUBYTDu5qgmDFhoTw0CwYlKrocmmP+VMNociz7McJk4LZnCDXFt352Y3fBMmF8jk3t/J BKyPUxJryuLatmMVKsMwAHyN2K0pbNO8lDDfpoWaV8LkAWgf34+4FmDal/dx2P7DuZTTZuCb8N8 GYnIK1df+zodreHPX8oTJhMJKouCHl2FxDZ+1yOJMT2FJiGB6vKu6Z8Nu5kwmfjzh1vz2Ocqlnh Hp2KmZCa7X3ucyhWqR3ZCWMpD8Lwazu6gTu7f7xR3RyyJbZA/AftFhtl/T76rqyoX/vWH+NCYxP ZMwlniLGN3jc75BPUbugzkUwjIaWEbuffXN3kr4oUkfomYvP8UF3LdRohg2vlNplKgA== X-Received: by 2002:a17:90b:3149:b0:35e:5051:fb18 with SMTP id 98e67ed59e1d1-36951cc9a37mr23651357a91.26.1779292506791; Wed, 20 May 2026 08:55:06 -0700 (PDT) X-Received: by 2002:a17:90b:3149:b0:35e:5051:fb18 with SMTP id 98e67ed59e1d1-36951cc9a37mr23651323a91.26.1779292506292; Wed, 20 May 2026 08:55:06 -0700 (PDT) Received: from [10.204.101.125] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-369f59656a9sm3939235a91.2.2026.05.20.08.55.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 May 2026 08:55:05 -0700 (PDT) Message-ID: Date: Wed, 20 May 2026 21:25:01 +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> Content-Language: en-US From: Vikash Garodia In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIwMDE1NCBTYWx0ZWRfX6cM3AHn4En0D MUfVEbHUhxDy/OZDb7j2yJAPX221t7zbsGmaku/Y9U7tyxwzZGTg+CHQzIKKbcPokeLysvoFo7F uFfUZjsUflLd5Qjw4/C7qP8iPUkpyB7kC6Cww1elwoy2GBoYEfqn8geQyKvMImis1R3vuv6n5+2 GetVQAYyh75TDFOb8TfnKT5os7H0IVbdmYUsYP83wFf0d/60xog2tGNAKoqt3bwHH53TvgoMSl/ 127FuCIW2m7TQdp+TsMk8uL1gyeqIDTYY5QoBGp5KxaiWXMdD4gN/ToVtCZBi7MP2tG9KPBeF0b JGkseq18zftr7RevBYJdqREXmEAy3Ty4bFcGRlHjp+Y4Oaprl1aDXzEE1n5XCziwO6rH07g96uY FJTqHm7UeFTNigU6Gbb1y6kqQz2M3dhFl9Kteoklv8Jvm5e0QMPVLsDy7cPeMnSRFygZrbcWUnE vAkYWqsDKe4xZtTWIDQ== X-Authority-Analysis: v=2.4 cv=QshuG1yd c=1 sm=1 tr=0 ts=6a0dd95c cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=KKAkSRfTAAAA:8 a=ivBWRc-cjDWwkC4WAK4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: tIM3fm8w-b9kfTPwONnmuQ9A2RBgAMNA X-Proofpoint-ORIG-GUID: tIM3fm8w-b9kfTPwONnmuQ9A2RBgAMNA 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-20_03,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 clxscore=1015 phishscore=0 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605200154 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 ? > >> >>>           .step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) | >>> -                BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE), >>> +                BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) | >>> +                BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10), >>>           .value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN, >>>           .hfi_id = HFI_PROP_PROFILE, >>>           .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, >>> @@ -287,7 +288,7 @@ static const struct platform_inst_fw_cap >>> inst_fw_cap_sm8550_dec[] = { >>>       { >>>           .cap_id = BIT_DEPTH, >>>           .min = BIT_DEPTH_8, >>> -        .max = BIT_DEPTH_8, >>> +        .max = BIT_DEPTH_10, >>>           .step_or_mask = 1, >>>           .value = BIT_DEPTH_8, >>>           .hfi_id = HFI_PROP_LUMA_CHROMA_BIT_DEPTH, >>> @@ -866,6 +867,7 @@ static const u32 >>> sm8550_vdec_output_config_params[] = { >>>       HFI_PROP_OPB_ENABLE, >>>       HFI_PROP_COLOR_FORMAT, >>>       HFI_PROP_LINEAR_STRIDE_SCANLINE, >>> +    HFI_PROP_UBWC_STRIDE_SCANLINE, >>>   }; >>>   static const u32 sm8550_venc_output_config_params[] = { >>> diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/ >>> media/platform/qcom/iris/iris_vdec.c >>> index f4d9951ed04c..65cf509e4aef 100644 >>> --- a/drivers/media/platform/qcom/iris/iris_vdec.c >>> +++ b/drivers/media/platform/qcom/iris/iris_vdec.c >>> @@ -70,6 +70,14 @@ static const struct iris_fmt >>> iris_vdec_formats_cap[] = { >>>           .pixfmt = V4L2_PIX_FMT_QC08C, >>>           .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >>>       }, >>> +    [IRIS_FMT_TP10] = { >>> +        .pixfmt = V4L2_PIX_FMT_P010, >>> +        .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >>> +    }, >>> +    [IRIS_FMT_QC10C] = { >>> +        .pixfmt = V4L2_PIX_FMT_QC10C, >>> +        .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >>> +    }, >>>   }; >>>   static const struct iris_fmt * >>> >> >> Regards, >> Vikash >> >