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 D7D8A371051 for ; Mon, 9 Feb 2026 11:39:31 +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=1770637172; cv=none; b=cTokHOBC2ahWgfc4VNW84Hm32tKR03ShXeYjGauAyb4BFxt/TRRc6Lq5KY4DssxvynwSiVRjVJ4s3UKkZvoq6ZafAZjF1A6gR3uYNP4CNgEAqu04zfCkaDMZbHT8KLNn2wl7QAND6ZdsPYA/b5qpPZ0YjRJt13hd3FLR5WT9bIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770637172; c=relaxed/simple; bh=4J0kNZ9S/ZTgiC5YszwNYtfKvNYRZjPTyzQ08poZYsk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Bsu2Uqpf6OCYbLwy8VM1YlY2c4BF4bItmzbYdRkQtt7ivCSlVignlq25dRd4zBIig06ZjCzrtg36RiKzU8KNz4j/TVUqaPc9wOBxnbwJxDUqVFIygne0aiYBMZO85UWx1GOaAVVkF28F36o9njQwb5/cYdeSjJo4rw5Pwv92SpQ= 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=Wdo/cyrK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gCxjwglR; 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="Wdo/cyrK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gCxjwglR" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 619Aqu2k3454184 for ; Mon, 9 Feb 2026 11:39:31 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= 28W+az1QyWC0xTm0GQ3A847j978F1wlTyJyBCXmKqPw=; b=Wdo/cyrKFjn+c0Wr UMu/obnvcz4bDWbGrKTBUevHGfQ/1BKuK6giViQfBY2uvI0QMUwS9VYCwmgv833e a/u+23Sj5XgQbiDdORZsestoKUlqnch6imEQ/2Hd21WNeN+00fEoiYj4C3Tx6eKW UhEfbQR20Na6oC/PoCxbRpTK/KLjj3U16kFo83nLXGVhYruwDJrpn1NxEV3RU0I6 +3F8wbKrevN/vQjd1VxvSwz6M11wiwIbIIUEzGRe32vTGEidGX64RkoLiJ02tMp2 7gkPjy6v3LFiyrXKvsZjKH615lMIeTVzI1X4RGsWbQjHFaTu/vHNQY0T120qloEa lVTmpg== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c7e7g84du-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Feb 2026 11:39:30 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8c6d6b0f193so93882785a.1 for ; Mon, 09 Feb 2026 03:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770637170; x=1771241970; 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=28W+az1QyWC0xTm0GQ3A847j978F1wlTyJyBCXmKqPw=; b=gCxjwglRXfhA/I6FsWHAFNjxg4uGD39RwiUt3egqXA6pu8B1fCdnp9gDkpxN0rf1/R Qi6fmtdHI4fXeyrzM0gpTCp1Ik6FXuogcXINZEiI8KHeCDKFPzY0Vh+bjkIDSAicCx8s r/vu1jZk495NpuWD5KhvN5YP/ZFIUV5PwQgAGad3Gy9wBl640qfki65GInCTLjfNqdFk UNCsban8Es2LJwkO1xZAPpH28TRcysIA0a/HTKlThBp1uRyO0fudfvy6Tr7Erjk03wGv a5PznTk2exVjqxK6b+cvFIox6aFIrXgGIJu2eODE4GNSslciiNHR8IQvCjYf0eKppk2N +S3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770637170; x=1771241970; 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=28W+az1QyWC0xTm0GQ3A847j978F1wlTyJyBCXmKqPw=; b=ChbJ+M6rHZB7iZjtBtFQwFSKUcqrpaZ+rJiywpAzCU262PVsVj7lZqo3YFm9qhQTY0 syxC9Vr56x94LeScSCd+n1Z+0kNRpIfSJlPZcLjWg4I+YivoZl1tdWS9k3CBj8vLCe6H 4of6ct1HBpvCAHBo+oSdhL2WQyB0FhCEa7eXop/pDecpjl4UpR9YgEuv7hYWIoBdmook mj1pugEhIaOlchqYWkDrlSdahU4+xyoB0L4Y7vHwemzMXQWGdTKorQL/Sy6qj62WKy+N jEvkoFT1Lq7YNridqFcQLR4ar03T8om/91tJRLsmgzYAtrgd4pxScTOvM9T23y8vQ8vX MDRw== X-Forwarded-Encrypted: i=1; AJvYcCXnE7D3PDqleZk34yTM9gVwdosMiJ/O4iH4DwSVytbnDIVw6e1R/8OS/Kr0LXHQiDHZeABN338t21q1BgA=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3d0XitV4EmC7qWeEGUPeu5PkiMHW6M9jUXnfxHKYuHv2Xi+1M EIYJXw99T48MXp6OVPzAIZFBbLIa8Ld4Ph3wvNUs2ZGMVfZ8IIobdRf7Y47+yv4+Pn1bJDzXJQ2 wct/LcP8x+t8O8AEr+3KAtfUgvkweE7WjAzmEG5hhupmfEeauJ+FPebXaQ6ecul6GtULcr62Org 4= X-Gm-Gg: AZuq6aJPVVZfT65NhMe3NadZXiMZzB1a4cu3ZuyIpvg0EkB+uY/BeI4ZJfORywE7FIQ Hx8IJdJkOFNorsEmyRP7mlruIQCnDI/DySm4v2NtHJj39VfAJs/gOPsj/3OGybRrJgJ9xxg7MCt CqUT+M4nwHdCbZpsNBvve/gVtjSi+YC8Oygx8/Ey5K5mne61Vlu5QSv4TN6AR/JGJ3vsyDIqOX8 17a8LpZsCvdy9kVbWYe16/mEw1L7PLDN6jhvOCppwhbu5q7i66PCEL3iWGkzIZPRDCZ6sEi3pWw KwWf92zv+bZb5zWiTOXSfzMe3Ypi1roTjXRIaxqnC9AueSU/DkccPJJLDpCWcrwWTUZz9UA4z2l JDzm1uHE92mUOb80q3pNX3WzUhS+dEUe5T/C9iUbR7NBSeKPc5rXV+ryOgahDAehTuVOTLy30I8 httAA= X-Received: by 2002:a05:620a:25cf:b0:8b2:e19c:67cd with SMTP id af79cd13be357-8caf1acac31mr1159032185a.9.1770637169790; Mon, 09 Feb 2026 03:39:29 -0800 (PST) X-Received: by 2002:a05:620a:25cf:b0:8b2:e19c:67cd with SMTP id af79cd13be357-8caf1acac31mr1159029885a.9.1770637169356; Mon, 09 Feb 2026 03:39:29 -0800 (PST) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8eda7dd397sm379194566b.27.2026.02.09.03.39.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Feb 2026 03:39:28 -0800 (PST) Message-ID: <5f8e2fe0-02d4-4373-9895-d4f98f1a1fcf@oss.qualcomm.com> Date: Mon, 9 Feb 2026 12:39:26 +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: Dikshita Agarwal , Vikash Garodia , 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: <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> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <0a324898-092b-3e44-c35c-15de20b50f40@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: OYMVzFAJTrybeZHRsipDpr5UvPyVHllI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA5MDA5NyBTYWx0ZWRfX1+Ma6oBQha7A GndfksVIjys3Z0utGi77EQkYwPhBp1L3LfjY7DnQPK4ybP7iifjHMVZAb736nWqkhwWx7xOli/B Z+DLYuYZf5LjvkZ6RtbBMHcIhb4PowVat3mAvPVBF4zaRGoBbjefGfQ4Y+yW7b1qcNTxyeteIA6 BZYjBL+sUzYXJ3w3wUdjg267RtIGjvokF1QcenbryRiJWTFWiZfZhxcwJ6h1rGMuJQ7XYf49crs qsk+5GLNPGwhaoBmXg3gv7TY9glEE77LfV8X0VYKLrkx9sCW5ZcwpKR6DSR2o8XXNgX1ZJEjQ12 3VOl8EvgqGVbJ4/mNDSmlwR0I0SSQWGBNbfgF/ZcyS36elpeFy8cRlM8ekj/Z0/Q9QQwaMGSgvD BFHCqJk5muE6fiNOi8pG3js1PiObzZpONSTt7ClLk35gLQqC1EwnH3loFMREiOsj6sGYzllYkcJ MTTAM5LlOGBqCEu24gw== X-Authority-Analysis: v=2.4 cv=GMMF0+NK c=1 sm=1 tr=0 ts=6989c772 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==: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=nukjtOj3hmPST429q9MA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: OYMVzFAJTrybeZHRsipDpr5UvPyVHllI 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-08_05,2026-02-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602090097 On 2/9/26 12:34 PM, 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 >>> --- >> >> [...] >> >>> +int iris_update_platform_data(struct iris_core *core) >>> +{ >>> + const char *fwname = NULL; >>> + const struct firmware *fw; >>> + int ret; >>> + >>> + if (of_device_is_compatible(core->dev->of_node, "qcom,sc7280-venus")) { >>> + ret = of_property_read_string_index(core->dev->of_node, "firmware-name", 0, >>> + &fwname); >>> + if (ret) >>> + return 0; >>> + >>> + if (strstr(fwname, "gen2")) { >>> + ret = request_firmware(&fw, fwname, core->dev); >>> + if (ret) { >>> + dev_err(core->dev, "Specified firmware is not present\n"); >>> + return ret; >> >> This is fragile - if someone names names their gen1 firmware something like >> "myproduct_gen2_vidfw.mbn", it's going to match.. >> >> Could we instead do something like the explicit format checks in >> venus/hfi_msgs.c : sys_get_prop_image_version(), based on the **contents** >> of the binary? >> > > I agree that checking for "gen2" as a substring in the firmware name is not > reliable. Unfortunately, we cannot > usevenus/hfi_msgs.c:sys_get_prop_image_version() (or any Gen1 HFI query) to > probe the contents of the binary here, because Gen1 vs Gen2 have > incompatible HFI protocols—probing a Gen2 image with Gen1 HFI (or > vice‑versa) isn’t viable in this path. > > 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 > want to use Gen2 can opt in by naming the firmware accordingly. Can we do strstr for QC_IMAGE_VERSION_STRING on fw->data and rely on that? Konrad