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 2745F36F42B for ; Mon, 9 Feb 2026 11:34:55 +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=1770636896; cv=none; b=uzttKHhJrjoy4hbESe5twzGAcABLLGwX5geEpmtVF28rY9vr9Ua32/9ZcJUw4Z85HhmbFpHV2tf3OnYAZbdkB2a7XZmUo1jbsy58oXLppSECe81OaEP5jcLADfz+CfhuP+0/qnj4mKnzuzt+e4U7NOv/uw1NDSH8/962h+MdNtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770636896; c=relaxed/simple; bh=zXnm7jdzas/Vz0xpNjjHseVr6CkVlHCxbdTWauQAf5A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RQbHs7WB6ibSblA32uI85iLp1uC4amVfiDE05JfWoMm174d1+NW5hh1xWJX/0pFRWGjboGijfU7AuewxipkKmORTPaFn6RWpcNGmnxqVVPtCthxLcGiIjOsWgsCHrUwP3W7VmaRRq+Tq5k5wEKGhYTgdFRQfQ2ZDxke6UM3Vgw8= 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=AX5x8KF+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Rl1RnK11; 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="AX5x8KF+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Rl1RnK11" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 619AkixJ3699860 for ; Mon, 9 Feb 2026 11:34:55 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= 6wQHpzaw1kvRqf/OGFpYXqfnuHEkcJcWKMi2NgFcN08=; b=AX5x8KF+mG3YdHAy yip3gUqriFa8MvhQi+MDQfJCSoHFRgej9qCD2jZsTSrxEVTzsMX6hpzN9TvmfR5E sJObi8oYSiFCWIF6beAkGGf2qYNar2xbkxlfTQtjl2fIWRjS25r5GEZouvJgy52s AzygY96IGyaD58rqyM4HoyZ1XfByG+dq8bwIUyZjFpE/qjQBEdwoJ/oucZ8p9qI4 BmVf1bJBZ12TOKFDXlkeHvs8qsbv/hCwp9uMVR5SYkFWu42ooju80w1aNtmWuJlt KShZ7ysGoBx3kCMTAY58teQLZjSsZGyzgwUu1BObG71E/TB1mO1zcTkgfcj8Mh/H dee/2w== 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 4c7e4m84ku-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Feb 2026 11:34:55 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-81efa628efbso3119550b3a.1 for ; Mon, 09 Feb 2026 03:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770636895; x=1771241695; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=6wQHpzaw1kvRqf/OGFpYXqfnuHEkcJcWKMi2NgFcN08=; b=Rl1RnK11jDw7PY5Sc8UVlsPtRpiH9L1SS4qhSBoZQqz0uDYQ095i3Mn+4vKmZXlkFh pQTAUE44QH81BxWlB8DsSLSG8cbli7ZKFH4sXe8FcNM7R1DuBWsFshW7Km9pxkBeNL9q J2wcYBQEa9gfYSQw+TsJL6SkLm4ARdpgzDr/thqD86wKxeeXl3ImVJRahJyyXs73gG9+ QjqiMmJBNsh3IiN4phvBn/Z1tBZRcPjVt7mJBIo0lpFIFNZSOgfgCjqi/SxFU9Ap9rmf 1deHtrmy+Pre2+tfNyOq9GRvWEVFtspVNqMVhCG+f/WQL/KB4hVIkOqiRWHQEZPwOm2M WW2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770636895; x=1771241695; h=content-transfer-encoding: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; bh=6wQHpzaw1kvRqf/OGFpYXqfnuHEkcJcWKMi2NgFcN08=; b=VEzN/tH9ps6bYPMYCisEvmRUyU6HTjgxV2P69KRA/vGJVnKE24rGvrfgEyLCXzSOwb vZGOa4xHYBI/04bIQn/oIFYKnc1bG9fljGyFjbkycdrEIDRGonJqNmtls+mngyo/ONBU gkRsT8bCxv+wxU3QQdVd5ZoHv/BJpEj3t+0cfyUzYGguXV18fR5ZKO09owaQBoxP/FmA 3dKOFRcbcWW2lJXwrGBByJI9y2FBnM25nAVY6hWDGUNq5pD7iMYa6kK9aa9OlpOW9AY4 WKbWpv06LGNi/At+WwKaq0xIdZqBhkdEohCfEBt1pwR5BDV7pPG2QQfe3YTmnbm9lE8S +ucQ== X-Forwarded-Encrypted: i=1; AJvYcCUSqjVPO2lwjKkV8RwsTA5m6+e5HMOzFjhaqR/qSFQmuSOUxJDZKosg+aUEBi4Osvz6bOlu19wkRD84v/Q=@vger.kernel.org X-Gm-Message-State: AOJu0YxhWJ0mh6Je/Ax6KhBOYOVuUMDJ91a+1OcuvNivWqYEj6MBP7Ju 1+906J5CLHHpDMvz03gjMlIw/2MVwJsbiX8dLIDawFM2ns7xhTgPH5al0gDm6iNe8cWN5O/9paC Z0eAeU4dPbXql1epxsOXEyk9NcnP/dckab6zoHIb7uj/Ymix8loQuVxx/mqiR+58R3Ug= X-Gm-Gg: AZuq6aLq9X05cVu9OckpII/Pfa3dKf+g+uhA6d6ej3OjVVK/eHQ4M6jS4QWzboQ03WU flscK5rhknH2kY7PPDcNQ6i+HbEzXTyxtZhbbfeRi3cR5cUdTqUsFoh5Lu+7uSj1HFp733nXhD0 Mw8aoAsb1TgbKn4ySzZlm071nnbqZ8zK1WejpRRaf7bBh1aiFUDR6PUlCUJ4gEBAECLQ+KAWrux Mf/Pg9f8sLlsxeTXRrvDGE447rfV8gGnMUm3I2i4+wVPUPmG5rWgtSbGgrVDJlWQP8J64AvS3f4 6iAGUo7tR4IJJT+gjEYvzyAJEtk+ZWyINrvxS+XgFaNtltpNyThlJ+tRCGslOBt54l2sfsBq84i aDnx7Ts5rXVHQ7u6TCP2QSy2T61gOK7IprbmR9zlNuQ== X-Received: by 2002:a05:6a00:4c8b:b0:81e:f623:ba04 with SMTP id d2e1a72fcca58-824415ffc05mr9975599b3a.13.1770636894559; Mon, 09 Feb 2026 03:34:54 -0800 (PST) X-Received: by 2002:a05:6a00:4c8b:b0:81e:f623:ba04 with SMTP id d2e1a72fcca58-824415ffc05mr9975578b3a.13.1770636894064; Mon, 09 Feb 2026 03:34:54 -0800 (PST) Received: from [10.0.0.3] ([106.222.232.221]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8244166f3e2sm10356514b3a.10.2026.02.09.03.34.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Feb 2026 03:34:53 -0800 (PST) Message-ID: <0a324898-092b-3e44-c35c-15de20b50f40@oss.qualcomm.com> Date: Mon, 9 Feb 2026 17:04:48 +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.15.1 Subject: Re: [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280 Content-Language: en-US To: Konrad Dybcio , 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> From: Dikshita Agarwal In-Reply-To: <0da582a6-5bba-4450-99ec-cf57b67915e6@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: NbIUZ_aaTfADrmvRwIolsI9D0UBHhF3H X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA5MDA5NyBTYWx0ZWRfXw2ZnddNEYxcy zl5pK0OwN380UfSQJbIQPBReZtYwfxkH4mTVdX3u+STbTNRcVjg1u0WdzHvjHmaNQLJFFSdho0A M9RDjmWyN3cpN8KSv0LVgwSpv5upX+lbHnE9+JG89ImjZZh93E+BrxtyDgCtPp0C3IuMXdUM8yU DDqpVZFyINleDZYiI6mzEJMhkuIpuTZc/D54VnH+9hfXoLNkL6izhrwVs9Mo0PT49g8z0YGnnfo NBp8Yw20+Y0sIRWdCpIRPWwmjV5BvMwiVKrfqElUNzMYK8DpSifiwmsGwPExJbBE1fGzZK8hNZg ozAJvlT0qKeEOkc74KU63lJq/UbdlV7BlV1P174haclsIgEfrpPEdt/ukw5jfRQR47QFqzf6AQg TjODBsD2ayPn29iEFJiHzbl4cAfH+s8ShT4p4PYl3gbKNP3oNt6lkDJDRzknYKnMKCVMBFGu13I GVPFFvrd6ydYwHbpV8Q== X-Proofpoint-ORIG-GUID: NbIUZ_aaTfADrmvRwIolsI9D0UBHhF3H X-Authority-Analysis: v=2.4 cv=WecBqkhX c=1 sm=1 tr=0 ts=6989c65f cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=Q1L4dSpLiPPsWIQ2aSSWHQ==: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=Z23RTWgoM7wVZOyl_gUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 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 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 suspectscore=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/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. Thanks, Dikshita > Konrad