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 2597035E1AF for ; Tue, 7 Jul 2026 17:00:49 +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=1783443651; cv=none; b=KDvtEqEY6Nkun/oY8Lvm1m0r5YE5XXpCIjv1Ss+uoszw+X5kDu6uBLqnXrr3KyYtTfPFr3D/Bq61UyXb8LuHKn+P5q+7Es48PekShWzKiuD5cx2DF1xwZHuE+ryAYOBU/lmPqz5oaza+hcbdsiBBcRkPoE/H7lEkfToERlQNj4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783443651; c=relaxed/simple; bh=WbUdL3CNPOorv8htE5XXowd1ZM+m0c6usAKsTT24zYY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DTEuvD3SQgquOYJUMLwMyCL3DK1UBMc6WEjbkDJQCTDOCG5qzskaMZpV2YjR83Ygr+C1WttrJMCG9A9tWnIPbamZmGhnB5Jj9DesumM33LeEDooEMchoslFnCFmPdqnM8+fqUOtEkHvgphFYg7tMxUUFYmpgC95d5seg+j6gxIs= 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=PHowLSK0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=DE8SSBzv; 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="PHowLSK0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="DE8SSBzv" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 667FTMs9011734 for ; Tue, 7 Jul 2026 17:00:49 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= WbUdL3CNPOorv8htE5XXowd1ZM+m0c6usAKsTT24zYY=; b=PHowLSK0/tW4dx6k B0FatCQnFbJz3NOZvRBrrL35ODFdS1dKp9U5eyGcPPFy8bsMrlqmG/6195Tu7E2O im6gV2S6/uK7cNHELIrNnSp5TW9tTXIf7UDxMgZf0k3eAr2EJP+rqrW16Dq0Rl4t GuX5KSeVqLq2L7Pw1LjR2SGrbqfGO1dWcO5yxbu97Dv5WtcMbwKsdN30Pgw61/vA BtBX8j/ccTT/Coc0kFHQQIzb5A5AmtYUA0ZXvTvlEvXjugs0aiVagJgOPn8+zqul +faFoh62xksi65qwlLsUR5H7ITVdnDnUZvuSsHN9tqU6v+R6f3bMx0UTPGbBNjDa 3BbZxQ== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f8vdjajcq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 07 Jul 2026 17:00:48 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-383b6012ba4so1423354a91.2 for ; Tue, 07 Jul 2026 10:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783443648; x=1784048448; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=WbUdL3CNPOorv8htE5XXowd1ZM+m0c6usAKsTT24zYY=; b=DE8SSBzvLnUJlBLaqV9qrjllgR5k2meVFIUVJgi4v8YuGZlR+wbio6hw79PaDc+quW dR162ZOdvU3py1jnrCMAIJ/QHl7JjaNg49w2IqqMirJW0eceDI8X1wvPPcyWCx4xj7Nv Br5fx++Mdi69XAG8h1zLy8CUabAZ29ekYmxcc8P/JSiG1pN7lNMzguoxowVLS3nkZat7 BFaoZGB2YgVEZkaMUHJ8hM4jbor1e2sETHXahnxmEF/KaUVCbiPB4Cj5+zKcSVwUXnER vpFGswVgn3t8KkXjwKyk0pcmtYduuON7bZkyHDEmp/T6Pnywag6i7r2p+D9Q/lyvze0o Spuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783443648; x=1784048448; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WbUdL3CNPOorv8htE5XXowd1ZM+m0c6usAKsTT24zYY=; b=lcPpYGoWiDZ7i2TQLYXCXzn9s7TXRPSeOGVs4c/67UTmGIIrnGCIfiC1qyUKtbxp4o FCd1q9IhQqoT19OscHDCz6m5+5QbQw6X8OwkWfAeJapimXk5fmmQVP1kPkLfBopr2hD0 J9G9lbrhHG0naJsd7A20Ob2oYOjoEX31NxGwnp1G36yOezNYmC3T2qr6vF2n6MBmDOix zSssFh1Iogj6G68ZMuJxaNAn6B68fI6lMnyrY/gK2lnHgYa+iTcj1rRe/xFZuO0Uv/6+ CBwgo604ujkt/+jiTfXPfsxUpPIEyciHtp5Xpo3VnMUJ413i6tC6d8dTGsHHPfpjJSDC fS8Q== X-Forwarded-Encrypted: i=1; AHgh+Rr65e/iIiIgPVasyU4nLxrmao1n1BlpT8uNP1T1giJYUj6H/GxRyC+/YsMbjSUzQ734Xn2Q4Zk/u9sCTgA=@vger.kernel.org X-Gm-Message-State: AOJu0YxwXnw+KMDJsSbwwL4Sn/Od8CyKTXDP6KTF2mjiTr4OSpC57A4u Gao4U3CSKvFW0CNP64z+FUmXhZwGk0sZyuAUefp56R1y7/IIZsefA7UiEqxlU11WuhXQ7XxHFFz gMaIW4QsSIpOZG8Qbk5u6GuYiCK4ue6wNyB4YITrBXpcFArKXBoc55tRE/UC7jQrbALU= X-Gm-Gg: AfdE7ckSyiKfWWUmXKpsam5/ZC2n3EQ8X9a9LbIpQuwhR53G74FIq799FrH33Mrxod6 a611bJLPPG5MwiVoUxblahW1N/sO82wWNtdKnyYQvI7ouy/tbUfnM3PMvC0azcc0rM7qWnacVt1 hTVlaI9duf2ELPJGFmedEPl9AgjS1HxLPpCzeWCKt+0pUL9i804hBid2C8TtQtMpvlXSfmaETf6 YWuF/a8EEG4Iu4A+whqIG4ztL14Gl8eCUQToocD1+VGsjEchgZbLqRTznhCRSRX/3CZU81wp2aq sKvSF8k8MNery4XKE1UOI9tIaGo5KjGxsBzCs84Ws2oOn/JQ0Bw+9RCQN3OvrX/IOzGv+ybaad0 2/xaPh26UOdwhOUn2zU/5HSmFIxDCIfBA2mkl4wSfe5Y= X-Received: by 2002:a17:90b:50cc:b0:387:e0bb:57f2 with SMTP id 98e67ed59e1d1-387e0bb5bb4mr3501566a91.35.1783443647860; Tue, 07 Jul 2026 10:00:47 -0700 (PDT) X-Received: by 2002:a17:90b:50cc:b0:387:e0bb:57f2 with SMTP id 98e67ed59e1d1-387e0bb5bb4mr3501507a91.35.1783443647126; Tue, 07 Jul 2026 10:00:47 -0700 (PDT) Received: from [10.206.105.200] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174ac14f2sm11023355eec.27.2026.07.07.10.00.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jul 2026 10:00:46 -0700 (PDT) Message-ID: <7cff4a0d-727a-9b55-9fd9-57fa861d6029@oss.qualcomm.com> Date: Tue, 7 Jul 2026 22:30:40 +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 1/2] media: iris: avoid bit depth validation for capture formats Content-Language: en-US To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Dmitry Baryshkov , Neil Armstrong Cc: Bryan O'Donoghue , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260707-qc10c_fix_and_disable_time_delta_based_rc-v1-0-33fa130bc535@oss.qualcomm.com> <20260707-qc10c_fix_and_disable_time_delta_based_rc-v1-1-33fa130bc535@oss.qualcomm.com> From: Vishnu Reddy In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=R7cz39RX c=1 sm=1 tr=0 ts=6a4d30c0 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=GrxmyxEN0g0U0qsHxscA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-GUID: NwDuJ9mYsfSKbYympTPuW_hUE2ATGeOD X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA3MDE2NyBTYWx0ZWRfX3APPejHPFcng ebDn38SwtQfNllgp1hKzWdUNwrCRwT0y3KF3PGuyC+ZnCwTUORqQ6NsU1r+Ls+DtK4DIJ16lqrY l/er4NSpH4XVNis60oJ4JlzcsjEBNjWZLraG2NNKUdLVf8RX9r0lxDKQWHCG6n3a5yhwL4k5ocF sNKZizEDZrhG969Ql8s844ex/yhHw0Vx6FTzf0z02mJPa+isL4/xCW8DwlktRFqKWqx/P/9V1iv 4hjBtULk6Izz3AYco0mmjWYPBlI0tj2wqmNtd4Sv/WTa6Wf9EoZbgE+3rUSc720KpgIObFqZcKT bEV3SI5S/HNnnxx/yM+B6U61pTxKyAup8eH+GhGozMxgE2qdbW+CJrI/RysPAx8pFQ1BuG4NKee T2hZrH17IvfXeVGOzHSxXiKpVG6r5feh4YvHdD1QEXQ6chUZ5RYUt7KCGfl8GB5OLN9zkJDPl+w t0rx+hUxndhXBQF0+2w== X-Proofpoint-ORIG-GUID: NwDuJ9mYsfSKbYympTPuW_hUE2ATGeOD X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA3MDE2NyBTYWx0ZWRfXw7v1rQF2Ew9I GUrO3RCAvg/PgQpxdDpw4nG6tYui80c0BXl3sXUMtV/9O2mxu8DC/cb1Z1rBHOel3qqNA4yjv1L 0DJmEa/S+1zGWvF6V9oFiWk96hpOnic= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-07_04,2026-07-06_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 malwarescore=0 bulkscore=0 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607070167 On 7/7/2026 2:23 PM, Vikash Garodia wrote: > > > On 7/7/2026 12:05 PM, Vishnu Reddy wrote: >> When validating a capture format, check_format() compares the requested >> pixel format against inst->fw_caps[BIT_DEPTH]. However, the bit depth >> capability is not available at this stage and it contains the default >> value of BIT_DEPTH_8. The actual bit depth is updated later after the >> firmware reports stream capabilities through read_input_subcr_params(). >> Because of this, a valid QC10C format request is rejected during the > > client request > Ack. >> initial format negotiation. The driver then falls back to the default >> capture format (NV12) and stores it as capture format. >> > > No new line > Ack. >> Later, when the firmware reports that the stream is 10-bit, the driver >> sees NV12 as the selected capture format and switches to the default >> 10-bit format (P010). As a result, the original QC10C format requested >> by userspace is lost and QC10C decoding cannot work correctly. >> > > No new line. > Ack. >> The bit depth information is not reliable during the initial format >> setup, so it should not be used to validate capture formats. Remove >> the bit-depth checks from check_format() and only verify that the >> requested pixel format is supported. This allows the format requested >> by userspace is handled correctly. >> >> Fixes: 20c3ef4c7cae ("media: qcom: iris: vdec: update find_format to handle >> 8bit and 10bit formats") >> Cc: stable@vger.kernel.org >> Signed-off-by: Vishnu Reddy >> --- >>   drivers/media/platform/qcom/iris/iris_vdec.c | 10 ---------- >>   1 file changed, 10 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c >> b/drivers/media/platform/qcom/iris/iris_vdec.c >> index 9e228b70420e..7f89e745a4b1 100644 >> --- a/drivers/media/platform/qcom/iris/iris_vdec.c >> +++ b/drivers/media/platform/qcom/iris/iris_vdec.c >> @@ -95,16 +95,6 @@ static bool check_format(struct iris_inst *inst, u32 >> pixfmt, u32 type) >>       if (i == size) >>           return false; >>   -    if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { >> -        if (iris_fmt_is_8bit(pixfmt) && >> -            inst->fw_caps[BIT_DEPTH].value == BIT_DEPTH_10) >> -            return false; >> - >> -        if (iris_fmt_is_10bit(pixfmt) && >> -            inst->fw_caps[BIT_DEPTH].value != BIT_DEPTH_10) >> -            return false; >> -    } >> - >>       return true; >>   } >>   >