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 9500F390217 for ; Wed, 15 Apr 2026 06:39:08 +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=1776235149; cv=none; b=h9TmAAH9E7puEISlwMR+TMtuUWbXmcRd/B5zua0oFN0nDOOjPGKqw7iA4dIWPmt+3gfuMJHdTuD/CuzmjclgIkMkZhoQQn0jRD5q+YpOJJ8OgEf5KA8Dup/QqGVEwZ4jf9HE4upnCRV3VR/D6gCaoBfzfhlQFh/0vVz2YZsZWgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776235149; c=relaxed/simple; bh=vtQ7cauf2a30cH0wbYRSCeQJZjnkFBDa7ZqMd9jfows=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pyqBtY8ylOgDUMMxWkh/IzvWDkeS26AG8k5eJdF1uHSoVJZEuNg9rnciTadGvpvGBlGdvMPtUXgOGECKBjU6+HJ5796BBQhCNVNgx3YNm1jnRb4cW3lb/VVobFFrSWeQ9gO155sd6wTYk4cfOpQQSaLIo7+iPggpNlamt0vRpOw= 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=gMRwnpvb; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WHL3VjMJ; 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="gMRwnpvb"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WHL3VjMJ" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63F4A2qh3126733 for ; Wed, 15 Apr 2026 06:39:07 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= tcqevKYcvLQFkBP6SAaO9TMJY403tMBt0fptayYFG1A=; b=gMRwnpvbAvZv9Sv8 UKFJvLJri4y7j5qkpR6U/pbL8QC9ZqLNmnpo/gbiL+WUJ3W0HOFitWIByFTOC9EV +r/dzy6Iv3/VKhs1Rs2mC2vHsqjC/u0GtEZuvgnO10aM2rW1TewYp3pUmpKcWf04 OwoqGEIrnP+hOKDYFn8l6HkYAFYC2gK11l2Y0/Dcva0tYqu1nkPH6Z4QaQM6ByjF TYLLSYVbCIgiyIu7ovQbej2UQ+8KrJNkc9VsTfnA9dUQmzVwmHTxEFkr5S6j2yF8 GhRz/XwCM4U/n3+WqcFodqIvCKk7XX85u2aIbetrTyjtpeZz2XQAlfAH9HOrohsd vep20Q== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dht56t14v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 15 Apr 2026 06:39:07 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b258636d16so62243245ad.2 for ; Tue, 14 Apr 2026 23:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776235146; x=1776839946; 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=tcqevKYcvLQFkBP6SAaO9TMJY403tMBt0fptayYFG1A=; b=WHL3VjMJU60mjsa+OILj9u9l0GzsNXG+SZtfFJHIOeI/5d087CsdJXXyvbZt3dTzLM sQGMfSMPaP4KQ/NOGLVAJKPMOHPYO62h54G5ATLQyXkk297e7JWqL/SeqLs6dSijl1FA sxoysRCJ8LEX7ivfOrC9oRH2Cx8S24VzMslUzpMjNTtPXnWojBDHVlIULIuOhFVhhSXG 1w/ozGboqK7H7Ocyo0L+klLkF/BrDZ9cEDP773hPskeYkp8/9PkVaCWdrHJ2xMeuO4O4 K66+c+5pQOGyqLnr76q5m3UO0+pJwuNfuGcfNGYnP66kl1UxS6eTLVqRy3/qqsVx5fCd jjqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776235146; x=1776839946; 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=tcqevKYcvLQFkBP6SAaO9TMJY403tMBt0fptayYFG1A=; b=NsNVRfXPQykunE1mZFJyNcxQM+749MZkmvXWvfobjkbNeTtAWMFOj5BCK/vQtUvL8A f0Adl9QWdldbSTDPq36ZtyhKVHTLEBsJC3qO/7xGz9z23o00doIhcAN5InxEicBuPNGe BMG/BRb2l0XgYhmK+g/4tgmJzChtYV7YAaQ3iucWEgHuTL+XGsqUlsGfxzmdd/lmkujz YIXE17fhZNF/qvx47PUymGGr9Ec1KqDZdFG7QzpfT8Hp1AhLgepM1SwntVtX6fRLbNaF 1gslrW0yVRgoqZeqcvwoiUVUCk6+/o7DwuuL4YULwEsGxPz81oBWVopyD5f25BcXyrKa sKfg== X-Forwarded-Encrypted: i=1; AFNElJ+ebCMJKO4eqwHKOCFW25h3rH58+dnLNfz0qV+kFed0He1M/KSLwltROOlRxOdTX4igWFvGr88KDODZfDw=@vger.kernel.org X-Gm-Message-State: AOJu0YzQ6NXJmKZSsszUzc8qQQ4HkIhrQ5bjLrj43rgs7c5gG6fefkhc KalcQYkp1Q4G+Hisvq8+rvahMuLIbD3DSJifk6JACIC0yMgUetf1iZ0NANCyNBVULidzIRKgSDa 8iI3IhzLqUViIejxVOQqCBN3druhFXrJianF8DmXCub1cgtIuaTtA+ahZ7D7/l2m1oig= X-Gm-Gg: AeBDieuF2nTAVIjA/i0/17/IwhHaLr7zBe4J7BlPoH7KUYBiKV/+I6demSOthiQfWj4 Og3hFEmsFQ64fxeRBki4nVTvNaoXKght89O/tuPH2nG3RLqWdAL4mBbmlaobbp/1slyVN/1gvCp WD6HGOFECjx+HCpvVXGyBRJqxeBVeDD3N7xE3HjGRzC55l84fNa9ZWm56mXbgmNVb/RUnP/V/JU UyYGlnI8TrW8cL+L0d8tgqNJxwitJQA832smn5HRCVqztB/LGDxzFaLmftsqXftTnW2M/WuVBgY 8Rjs/mNgeKtosAS9Yai62MMF5Jw3HpBqr7mECvJWB+s2rgQAOD6Kv2MXn9eY+r9UkVksQsaEX3b DGlNfassIoMCAxxNHpPbDfw+XuFSfxA0au3U5iqhE89ofc1yVoREa4Q== X-Received: by 2002:a17:903:3e29:b0:2b0:5ae9:ee4 with SMTP id d9443c01a7336-2b2d5975cfdmr143084075ad.5.1776235146363; Tue, 14 Apr 2026 23:39:06 -0700 (PDT) X-Received: by 2002:a17:903:3e29:b0:2b0:5ae9:ee4 with SMTP id d9443c01a7336-2b2d5975cfdmr143083805ad.5.1776235145789; Tue, 14 Apr 2026 23:39:05 -0700 (PDT) Received: from [10.206.105.200] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b4782ace42sm12398615ad.68.2026.04.14.23.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Apr 2026 23:39:05 -0700 (PDT) Message-ID: Date: Wed, 15 Apr 2026 12:09: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/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFC 6/7] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats To: Neil Armstrong , Vikash Garodia , 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: <20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org> <20260408-topic-sm8x50-iris-10bit-decoding-v1-6-428c1ec2e3f3@linaro.org> Content-Language: en-US From: Vishnu Reddy In-Reply-To: <20260408-topic-sm8x50-iris-10bit-decoding-v1-6-428c1ec2e3f3@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=LuiiDHdc c=1 sm=1 tr=0 ts=69df328b cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=6ikEG6PPlcl_cW5we_EA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE1MDA1OSBTYWx0ZWRfX+cBYXwN/0EQY XrIQMrhqrJTVe4vxY1NQDtTHGNpC2hvSob8N+YpK1FHnPHpXkgWZG7LQ6NBUJ7aIHjt34pw8ynE tMTDRaY6AE1LSMJFsYeuRJidROoVeCna7qqgymlkre8oudv7OYg0ION9YH0o7gUZKRHESoExpsJ l4w8y4kWwvFxVbgn3AQCMBU8Xhg3Wu2fNWLKzWR5ocrLCNaeEkmi+zYDN4FZnpES14K8zRj/O2x XCB5Xpc1mgbT6NRxO5A1VcZsA8M5UK0anuotbQQTaY4+L0Mdga+i8unW223UtydLFmIULdw01In RhfYtZTExcH5qFr0DFPy0Rxt0N/HLZaihgmSMgH3ap+3X9zwDMK2dcLbNXyxSWjo66NBd/43moJ jxJxNDhooFZ/H1v8GkxVEowcWwmvcjrxuY6va5tbwgBvifRhgBqT/dSm5qmOmFQ+e1HM9krDlw3 BYdicQ6yRq1u7kx/ZQQ== X-Proofpoint-ORIG-GUID: YqZXkWRRSaR7_bprkj_7kax7XwmoUdia X-Proofpoint-GUID: YqZXkWRRSaR7_bprkj_7kax7XwmoUdia 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-04-14_04,2026-04-13_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604150059 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. Regards, Vishnu Reddy. > > Signed-off-by: Neil Armstrong > --- > .../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) >