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 486CF35CB70 for ; Thu, 12 Feb 2026 14:50:39 +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=1770907841; cv=none; b=IzAhmlDdU1Q5gCL5SIDHHzMvEPoRb+6MhTrMZk6mwi13oymtiuWSh9Xo15kNBy/GvKL2NzfTp10HVhjm+RQTJVr/IXAJgo6bNRW0Y2sUpc/HFnFXxPLAdynlk5fn6bqFckOlNC8l3jqrGeMilMRhhzdCFoP5omjEWP+EFsd7wqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770907841; c=relaxed/simple; bh=TbqN5JLaryI0tzOo31pgU0unhHmJom7G7NSzwMOHvdg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KFHAOLAfNHPnYx9KWeTsvUBursZBrThopevvIpZtcEZLad0drxBOc9M59bfSe2EKav//Alc56ydW34eZJFej2HBDb61oU8icUgY2PcG5mChlLBAhR1O1lCGO1gvuP2BS5SID+z2l39oV8Whjv1SQyX8zrk2gWnisbJDeqGw9JSo= 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=YGE1H3k0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TBlh8iBs; 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="YGE1H3k0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TBlh8iBs" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61CDRefS332253 for ; Thu, 12 Feb 2026 14:50:38 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= mkdIQKCORgBHmpzhYnqV+lMcVLWl9ZTC9POI19y5zYg=; b=YGE1H3k0jIt8b2Z5 qve/zApEkliL9nO2jVBRtekQPh9xxy+zcJ8htTv4AxHfh0f4Tw4qaqzBsbfE6ild MMjACNpbT4kxfADloceWMNtHXD3Qv53FIhB46RIVgdCmAb8QayM+FrZOn2nRtznP zhdRrV7hel0WlDwkM7ozc5ZdJ+ZVOwkEQ6Gdynvy0d+S9t6hrXdRgXWr120BR0iL ncmuhg6MdsGtGMWbv4TQPK35EqcsOoY5Ea0GR4OX2VHawv9JmbWSJSOhSQgYICT8 HAFXN2iWLicopcuPrHv+ZCG/DUuPgSc77MCSASg3DvKXeA8J5hXHCrA7c9wHC/Ov Wv6Qkw== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c9cya8tgm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 12 Feb 2026 14:50:38 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cb10b964e6so154126085a.0 for ; Thu, 12 Feb 2026 06:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770907837; x=1771512637; 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=mkdIQKCORgBHmpzhYnqV+lMcVLWl9ZTC9POI19y5zYg=; b=TBlh8iBsrR0yERTWoCdf6IivWvqNhy/P22sMr++OCGTqqRtjBUxGhnSUy7oHPhzcIz c/uPw0a+DUNUrNFzs7kvb/38gHTpxreHgyokD9vE8FIVMfZ5oiz3ioWxlEmsRfbmQziM n+Upnbwsq3muPm17BEJ1NvgbSozcnulUa1KMWHqR2gGlO56pGHdIz+VtyoAkYaahWA5t dEpyS5bvHFedXS1t3aC+ozYHzMD9ku3iILYR5gWRYcRczf/5JLkO9dumhtGybFBnPiht 5UvuZHaVVUhNyo9NNyXIzjwpzW1EcFUnwvK7W56QPvNA3ySy0OgA4ko0azCU2LlV06JJ dn0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770907837; x=1771512637; 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=mkdIQKCORgBHmpzhYnqV+lMcVLWl9ZTC9POI19y5zYg=; b=GIrQ1+Ij86PfzZ4dGbrXNp9wicTmzVwYYhGVsBhpmLm4+TOvwU163qzRM3PbMPteLO 491WMUha3V9gLeAIx/MgE0iHhyiwUvL46ig6mkp/mNUqn+OzAmLK2rVkIhsj5bSYOKBM rrzUg7OiW/cUWQZsdgSdyygN6Zjznq7/X/MOZo2YUVyH2mJx59sykq2rWhR1NUXN4i38 ANCH7md8mXKmOh2ieOBxKoVJcKHAgItcResF60mSdOIgG9/R+d3cgyHo57aktr70zeoT 7JT58X3Na8hC0A6xSJk1axVth5j2Fr1nD5KPNWuUd4C+t7zlrIHxuEdorN12yUP7QBay BtmA== X-Forwarded-Encrypted: i=1; AJvYcCWJlTQhDWP3o3DTpMnyxy82Wy+IfWAYhYoEKyAbG3D7aqWuYOr95SFOZcSUDbUa69WZzFqnN03KvswhKek=@vger.kernel.org X-Gm-Message-State: AOJu0Ywka2YRFhy/hZDh+AEjZX3fdRshHFCG+29LxPZB4IfozTONG/+E l03I8pRKWwMvbdkmaf+4jqcBY6ZpmdviJ6xHJRwGqKMZqXqX/wO83hqYOqyydiQnrbxEDOX4Myn gK88N8895caprLDXjYF7t7l2oXBBDN2Rpay3fqLo5OdJmkSkXdUDor0ZG2QMEkED2XoM= X-Gm-Gg: AZuq6aKkCHFic78NHicjMB98lM5HN81EsqCWipsO32wb/WlDPXsTYr0MvhVqdJT/G4k k+DoTuZM5hflmRQyiJncwexfUZgVQjaFtF5P/ujQjJb6qvpt3zjUBBxCyyjbgjD55IsuQnF5oG6 biscxVgWKs4ejlYVS+oy9X6aT7kmnI7N9v1b+1Kv7jS2MEfcfcJa70BUhvrblM5V00d8QAI93ol hp6CAZvyf5zv8Qo9UiXKjZVVgIrWvtGFiC5Tc1wIPwzXT7TxkpHINhcEXGvuoxHWO4ensNdwydq lBWxPIWLhrXtAxh7K7TRysIfnxn2xNrycAkSljrvtg5ykbGNkGulRDGThyPJVIsASesbvj7MVxl +U8GAdX0ZLnIo/jJb6ejYC+jJRbEMm6VQNH7MjqKWQyG6/i6z6jcjoHRXu5KNupLkUHm6xQeCad OQA2k= X-Received: by 2002:a05:620a:198b:b0:8b2:6eba:c45d with SMTP id af79cd13be357-8cb33064bddmr293003185a.2.1770907837346; Thu, 12 Feb 2026 06:50:37 -0800 (PST) X-Received: by 2002:a05:620a:198b:b0:8b2:6eba:c45d with SMTP id af79cd13be357-8cb33064bddmr293000385a.2.1770907836830; Thu, 12 Feb 2026 06:50:36 -0800 (PST) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8f6e9a6a24sm164450766b.20.2026.02.12.06.50.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Feb 2026 06:50:35 -0800 (PST) Message-ID: Date: Thu, 12 Feb 2026 15:50:33 +0100 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 2/2] media: iris: Enable Gen2 HFI on SC7280 To: Bryan O'Donoghue , Dikshita Agarwal , Dmitry Baryshkov Cc: Vikash Garodia , Abhinav Kumar , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260209-iris_sc7280_gen2_support-v1-0-390000a4fa39@oss.qualcomm.com> <20260209-iris_sc7280_gen2_support-v1-2-390000a4fa39@oss.qualcomm.com> <0da582a6-5bba-4450-99ec-cf57b67915e6@oss.qualcomm.com> <0a324898-092b-3e44-c35c-15de20b50f40@oss.qualcomm.com> <2uih6xdzarkwnvhlhv5kznmdwo4jorqvsrb7xxrxgr6vprx3ey@4kx45k5i3c4y> <6b9042c8-767e-0fdb-9012-f3790899509e@oss.qualcomm.com> <5ec260fd-b8ae-4c54-863f-de9e684bc543@kernel.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <5ec260fd-b8ae-4c54-863f-de9e684bc543@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: qAJizzNuj6T1lVYunvhG3yG-TJQDsCEI X-Authority-Analysis: v=2.4 cv=OrBCCi/t c=1 sm=1 tr=0 ts=698de8be cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=_GnCpRreIiypi8OaDPIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: qAJizzNuj6T1lVYunvhG3yG-TJQDsCEI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjEyMDExMyBTYWx0ZWRfX5Vtnlv2hpS0A uw/gUQOjFL0YTAvLqD9z7C30ejWJS6+fBcL2bga9Ks2O41cXTJBgYym2QZo+ItMNJZkXGV6P48t cp3XXFSsh0StD40WdJz3Ay17eJbTGcgXs+D2o+D1htP7xMYTuChJVjXwqQyafx+b+jFBMoEB0UK XxgGjJofk7srax6AMHRImmz70Sgjr8Exq3PGdw1/UrNY5nCraZjaLWxNspMO3sSpOtnMqdhh06s szT1OkPTZ3pqWNNuFgA68F13EdwKygYx8hxTn/zLzOhmNuqGIZP9MuL6opODj74b+Tksr2yqm17 dJ/3YUNkLt97av+Ex8VnLC7zcFQWDmX+qI62dVjLPfEx71yXhc3tI7IvqxHPwWJH14upJ0PJEvi v6xnuD4/wPTcKwVJaPiDNiUlRVwZMGyyPfma/gwNhGPaprL1Qs0n8iK7Q0XQSbPA0T0lzcCA//B TDFpPkklVWpRUs5Te3Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-12_04,2026-02-12_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602120113 On 2/12/26 2:27 PM, Bryan O'Donoghue wrote: > On 12/02/2026 13:05, Dikshita Agarwal wrote: >> >> >> On 2/12/2026 5:13 PM, Konrad Dybcio wrote: >>> On 2/12/26 12:16 PM, Dikshita Agarwal wrote: >>>> >>>> >>>> On 2/9/2026 6:05 PM, Dmitry Baryshkov wrote: >>>>> On Mon, Feb 09, 2026 at 05:04:48PM +0530, Dikshita Agarwal wrote: >>>>>> >>>>>> >>>>>> On 2/9/2026 3:32 PM, Konrad Dybcio wrote: >>>>>>> On 2/9/26 10:45 AM, Dikshita Agarwal wrote: >>>>>>>> SC7280 supports both Gen1 and Gen2 HFI firmware. The driver continues to >>>>>>>> use Gen1 by default, but boards that intend to use Gen2 firmware can >>>>>>>> opt‑in by specifying a Gen2 image through the Device Tree >>>>>>>> 'firmware-name' property. >>>>>>>> >>>>>>>> Based on this property and the availability of the referenced >>>>>>>> firmware binary, the driver selects the appropriate HFI generation and >>>>>>>> updates its platform data accordingly. Boards that do not >>>>>>>> specify a Gen2 firmware, or where the firmware is not present, >>>>>>>> automatically fall back to Gen1. >>>>>>>> >>>>>>>> Signed-off-by: Dikshita Agarwal >>>>>>>> --- >>> >>> [...] >>> >>>>>> To avoid accidental matches, I can switch to an exact filename match >>>>>> instead. That way, only the specific Gen2 image (for example >>>>>> "qcom/vpu/vpu20_p1_gen2.mbn") will trigger the Gen2 path, and boards that >>>>> >>>>> How do you detect that for the OEM-signed firmware, which can have >>>>> random name? >>>>> >>>>>> want to use Gen2 can opt in by naming the firmware accordingly. >>>> >>>> I Explored on suggested alternative approaches and seeing some limitation >>>> with the both of them: >>>> >>>> 1. Detecting Gen1/Gen2 by scanning the firmware blob (fw->data) >>>> It is possible to parse QC_IMAGE_VERSION_STRING from the .mbn and  extract >>>> the version string. The issues with this approach : >>>> >>>> - the version string has no explicit marker that identifies Gen1 vs Gen2. >>>> >>>> - This prefix is not a formal ABI, and it is not consistent across SoCs. >>>> Each SoC family uses different naming patterns in the version string. >>>> >>>> Example : For SC7280 Gen1 we currently see: >>>> QC_IMAGE_VERSION_STRING=video-firmware.1.0- while SM8250 has >>>> QC_IMAGE_VERSION_STRING=VIDEO.VPU.1.0-00119-<> >>>> >>>> So the driver would need SoC‑specific string‑matching rules, which is hard >>>> to maintain if we are looking for a design to address all available SOCs. >>> >>> The only SoC with such distinction today is kodiak. So we can simply check: >>> >>> if (kodiak && strstr(fw->data, "VIDEO.VPU.1.0.") >>>     hfi = gen2; >> >> Agree, this works for Kodiak. However, Dmitry was also referring to other >> SoCs that may support both Gen1 and Gen2, and at the moment there isn’t a >> generic way to handle that check. >> >> Also, please note that the Kodiak Gen1 firmware uses the string >> video-firmware.1.0, whereas Gen2 uses VIDEO.VPU.3.4. >> >>> >>> >>> Can we agree that VIDEO.VPU.x firmwares are hfigen2? If so, problem also >>> solved for <=8450 >>> >> >> Nope. that's not true for all, SM8250 uses VIDEO.VPU.1.0 which is gen1. >> >> Thanks, >> Dikshita >> >>> Konrad > > I really don't see what the problem with Dikshita's proposal here is after all she literally controls the firmware name that goes to linux-firmware. A vendor could name their gen1 binary i_really_wanted_gen2_but_didnt_get_it.mbn, or perhaps "snapdragon_8_gen_2_venus.mbn" and we can't control it. Plus I generally see relying on file*names* as a hack (in the same way that Linux doesn't care about file extensions, but Windows blindly trusts them). And there's oddball cases like with FW_LOADER_USER_HELPER Konrad