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 DC2973F4105 for ; Wed, 13 May 2026 19:39:13 +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=1778701155; cv=none; b=CoeZUdC4vUHPQoJVyklQN7DJFTrewLRd9tasrmYnhrnt0QlRMq2NwF+gxip9mbLkYm6QDqMGaw77MDViT8s6me2VJpk+rqtzayHTOTN1+yTiXszSMPBiqCm5Z8M4Mz8RtEvt0qnWtlqQd0O2iS1sCPWXreiWdg23/V5KngqrcLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778701155; c=relaxed/simple; bh=li5ZoxFSxOcfVSbefU6LKLYa+hd/AJ0ctoeEVHgh7y8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nxcyu9jlVZhZDrfaNbErOT220TbWcFdOtNswSu8vlNLrPoA89oQnfPNiJG5HJeqYgdPvK8H8pfd3eHDMPOQ0x5QGI6c7hTGuDc/ySUWR6Ypff1ct2cINMxvNAdmMDoXAnE6+xz7VSTZvB9+bV61M5Bnb+6cVoXU3G9g9/80d7DY= 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=bGuU2Lcu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KRPSnLYk; 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="bGuU2Lcu"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KRPSnLYk" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64DH6giI2321285 for ; Wed, 13 May 2026 19:39:13 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= Jgjv+Fgtfz6BzxxEdOYmhd2HoilXkZ21ctD6Nn7ajo0=; b=bGuU2Lcui5eGkW+T n4HtoY2+Mj1Ocl039fDfV+HFiR43b7pXVt/GmROypELtpeR9rReWta/2dusbAZMZ +0o7UVy7uLlyG4zZ1NQ8CiX5IKDC71U10UUkvFFPEnro3hL34h4Er5gqScJCovST ABvBT+cpU8UYHQU6qSq7Zv8rqmUJFp7gRXUiBSup2uoW0MzscALgIYNwEbZouzjw NA/n3eBl4rsI9zsXPuMbbcD/CiOHS0Rq5eCSZm1EkNJFmdfBCFMCFZnhG474pvGR vvkocrwDb/SclhqSRUx+iGvweDktiS/JWxPitWfyj32QOgHiCy92tbB5jVUM+RtE Pnux2Q== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e4hgubr6f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 13 May 2026 19:39:13 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-835444b6ce1so5107469b3a.1 for ; Wed, 13 May 2026 12:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778701152; x=1779305952; 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=Jgjv+Fgtfz6BzxxEdOYmhd2HoilXkZ21ctD6Nn7ajo0=; b=KRPSnLYkJKrw8YMsUGYmSpP9pT9LM1+bP0JEJOk0QbsWrztNAtbnJ6Nihot0m4vjw7 7HpnXHpeIPRf2GmC2iVZN7WitlsXmnCrC2LSURE8ZztJGQfR8rK/nXeMc06MMcALjxiR ofPrWMgKgvrH7Ex6sifvsSVtuDmGCboGA3pCTGhmjrJXBT7AZwx8EamNR7tXU7uZ3ZhU 9Nq0+fS8A1PaX6MGXFTzte9RaNrhfkO0xogAgrtGR5dTZ4kzPDTeR9a32eXDFy5HFSil yzx+SrLpi+Ss0q9g2VTLzHS+SA4KZyeioadH7WyXqehVBI2uZ1qTsHO1XcmcSHo34n4f 7szA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778701152; x=1779305952; 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=Jgjv+Fgtfz6BzxxEdOYmhd2HoilXkZ21ctD6Nn7ajo0=; b=qWPYJkN1pKJSNlFrgOCBqICqymRZl2mE9odW5SYgDTz/B+4tAcZGHiUd5criHqRpV7 JnkkG5pOxZ547+YFn77+RfySwmo/sWOHruzKauf49IZO0R2XhicXEnPk1Z8W2j46/CEz 8YzU7p5v2LQnzZQSJAx4Zn0wQhdUnD4TmLyVqnYzyzlHkCwbLxbD+YzrOg/bDQoED/dr VE4dRYcgOURPkYrZOgm1obSuDsdAW16Si+Nlm1rwrtJQxtMbzGWEfRpzW3mQuYwBduCH QzZmcR60Qy+nB5c3Xv6kdXue95EvS+6Ubo4bLKwDu5ngMb7o/rBMaQhXBhaYNeB92Tbp JF8Q== X-Forwarded-Encrypted: i=1; AFNElJ8t6YoOOq94ztPjYUwNdkPKE43YXkOzhRI7W70YO1ktK8Caj8DmyFURRdjtNEAuD+43h6CTF9Y201yowLA=@vger.kernel.org X-Gm-Message-State: AOJu0YyWeMyEwrTljxClmufxmN5DZxPgsGimKujfw9I92yz3Rwi467Lo 5EbMSBplAtplKOdIXjkouDmlCdrqg2A8Hml3Q4NPcpBNcI0rJVR0ReWFFbD+GfT2Yuk4pfhXkwz hOCxq4O3TJJya+J+wdNomRP7L1ojY+71YRFsDniFptyBN8dOIzj0nWu+NzVlNsvF47On+F8+vo0 g= X-Gm-Gg: Acq92OEAxMo3B3A3QHZL+LdCyll8g/0ULyU8+IEN54k2cnDMoTawcMVQ/fpGlYXQkG2 UGCPqa09z5WWr2JZN52uvqwriEZW9CKQzJT3/Ih+rilRbe4SKO4/1tQa+gGQemrmdYDq5qWQ5Gg nVFuTpmoyy4yAPh9SdVvvLnCGWbf8sWiTvTEFY4MjekxQQeV8/QbB/lPEhutpSb0uq1kxkUmINw gVDemXPS4HDHmbOxvwkLTXJk+OHKazAH3xtkdOSlowNX22VOF9o9XX9ucMBBMh6wIAEyuEBZA4R z3+Cg9jfLtzeviIvIN5t72S3kaY6eKJJGT9JDQdFHVr6jikBiLFZSpilaMJpp9fEL1KniJyuhW2 kbSTvFB4MIC1zVAvDUZk81KDVWBxhf1Km64ZcmRPYOTikn+q7tygeETfY X-Received: by 2002:a05:6a00:2e83:b0:837:80a:5abe with SMTP id d2e1a72fcca58-83f058eb5aemr4513466b3a.37.1778701152301; Wed, 13 May 2026 12:39:12 -0700 (PDT) X-Received: by 2002:a05:6a00:2e83:b0:837:80a:5abe with SMTP id d2e1a72fcca58-83f058eb5aemr4513443b3a.37.1778701151811; Wed, 13 May 2026 12:39:11 -0700 (PDT) Received: from [192.168.0.172] ([49.205.255.126]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83f19c5b4bfsm304825b3a.28.2026.05.13.12.39.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2026 12:39:11 -0700 (PDT) Message-ID: Date: Thu, 14 May 2026 01:09:06 +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: <20260511-topic-sm8x50-iris-10bit-decoding-v3-6-7fc049b93042@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=X4di7mTe c=1 sm=1 tr=0 ts=6a04d361 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=6GFGFuPpdQFN+sW0UwB+2Q==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=KKAkSRfTAAAA:8 a=Z2vZjvcEZgQmuG7N6MQA:9 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: WgohKuRSV1-HQgixHNP2fROOdSmrS7xD X-Proofpoint-ORIG-GUID: WgohKuRSV1-HQgixHNP2fROOdSmrS7xD X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTEzMDE5MyBTYWx0ZWRfX2LLW1+hblRfI EmwTqoc/qXLE/jsAdUFsL6IFrrc67hEjjVas7J7/u3qcb+Wb0jNDSJDVrCSPxJULglLJ/xHfXeA /MZW2ruZy+Tx03a1EEcMSZairEVjpVBriGS0vEtV5dT3e0Fhx1slwxx2t6zmgGjxfNSSFz12pfw e3ul9QXkvxqqIMDIr07ElyqXp78ed0CluaifciTMLgluBULLBzhYZlpdTpNKzTccEQY5lJ/ccN7 v7uWbCt3tKvcMUi73IF7YxaW1wTGsVZmtrrx2m2IDLI+Ml0hGl0goXM4oxD9ODTY+z64onlYAlg UhIfmyMuPjIaiNM+WJUelB5kzmrFJ+yebVCiyMNCw5IJQNWNs13e9y01WIzVApEcFihd/jqimDM 9TvgFY0OZ+L+fUommdQtRjMwfAe7Z0U4mTa6Ban5Ypc3SaaAjhm1l4wPK6Bp6bQFvq/L+JClnoK nalMYGLWJQ88wjFIksw== 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-13_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605050000 definitions=main-2605130193 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 ? > .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