From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8D5E36F436 for ; Mon, 9 Feb 2026 11:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770637006; cv=none; b=YIsR1V46z6zVVEIYBb+NRSWTgwGJly3RCrkpGUEYSkzmjQ174fggQsgxNppyvjIHkI5so4dX0H5iE2+O0aP3T2A+lP0dgqKL9b55UAxzi8DnUmZoJZ5qLx8i/QAJdzcifFj8laIU+0i30IG9p3cNzp2516C0enx42cKtoPx0wA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770637006; c=relaxed/simple; bh=jS7w+mNi1x5aaB/vd4zifJyI6GuShvVgleKcUeSY9pk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VvIcC5o+Oar9HaZUM4Srhxtpv65P8uwMyq/B/EDvWgwHY/1kC2HwxvtIhXF/MtczoN3dfrl2E1zrdzBEZ7eF16pGeQ3wv3rrCjcqZg6TqZtbMN/BWt3KPb/I718Jth8kG8K5kqSzIK8Gz0P+K8hi/6aud1SKKANfK01Ua7lLl7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TxtuOdAe; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TxtuOdAe" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-47f5c2283b6so41207545e9.1 for ; Mon, 09 Feb 2026 03:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770637004; x=1771241804; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NM/PrFFohoVLcHQpdOFnX+o8+tO8YjeAGLU0+RPGLOQ=; b=TxtuOdAe3p4EqPQcfn+rzj5rWrSQ4ndy7HbdP7MscwsW6LhvZqOi5y/22SoGRNIjpu Y/u+gbUYGd4jSwGI8vKvUylhirFYH5dHME2HkXolgs82rg18mhuFrnC2e+Iop5eMj7RW zxZfqUOz+3v+n5E1kO43I2HtiGmW3TKQn0zFZytVVY8jtJurqsY+hGrQrWPySZ7QZHVM Rj4/ohTuJO55z4xpI253G06W5zFgIO0TnPglNEXe3xInAKDjm9QOxp7cUF+T4ZFc3HtD PVhFcEPoaNZxhkpTJU8BWIuett1g+SThfpVOWepmO7GMzGpTL2zn08IBPEQsfhfSndwO payw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770637004; x=1771241804; h=content-transfer-encoding:in-reply-to:content-language:from :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=NM/PrFFohoVLcHQpdOFnX+o8+tO8YjeAGLU0+RPGLOQ=; b=CAQGTdVMY7X5o1H7QbgzQUEcCVoF3mG4i2RAvb8rE+aBFVvFOe3V5B69i0Qfj+F3iJ 9pHAHmIRlnKBloLrjqriY37k2XUgo2qE+Yc98MVnzUi+OUHm6sSkYV8Wr/mtdJBzN6G3 O7Y50GXnNkAsuvPopm9gF1LMOl15pSsqM9kH4co3NJgq/bSb3NbfIdzn+dkw8WsdV+cY BSLTPuUtKZqMd2bBbvlXkiOwAethKeXj28GoAO1SMcVBP1IqzhXyY3nfbruQL33Rk+wC 2cLpCCi8+gBeyLyke2qRe2RWFiLyR3ob/h6l1qc8yERh9vUQWIpaXfjAf87loEsOheP9 8x4g== X-Forwarded-Encrypted: i=1; AJvYcCUqkSDB35v43aL8Iew5mfYG4tn22VMHkmx0GO+FjNO0OYYZI5QdH0xg5kyaw2b/PADXkbVkvzh7QQpMVRc=@vger.kernel.org X-Gm-Message-State: AOJu0YwRHNXAg/hjK4j0x2Nq0Afeym/JVwOyQAmhnKfXePbk638EzhN2 Uh6XujgVrPcISfgtGWToMz0fi8RJ9osV6IYtCMPc1fAFmWbmPCsUf4C1k/h4FxRUHRU= X-Gm-Gg: AZuq6aIG1i3xq0NzNDK3h4jFOPfj4L9b6NIHCxzh+0kmlsBeUbOGK6IOxfLwaFluNF1 LdWeggU6YWO0mRPqajuRvfPT+Db71UR8Km/PLxHNWoOU8+uCzs3d0HRX7hf13QOxKRIp7r0ztRL cQMJGqyEmoDgfq9ZbcBEaKxZp/TUj55xkIhMPfkE25CftgIh+PJ8UGaJbIsSBdVlBSzdJ9V7HcL M5IqkLbM1L1PA9qwJYqKex900YVhVyTUdZP+7aGGH7EZ8v4guZg5kJoCBsrwKEEl5kSdjBh/+az QkSCegFQvj80g04sxPSgzGnUDECLocVeaKGNiTly61x35Jsd3iNCG/RwJfyUY6ovcokrT0g9mxK yEgoWlwaoz6ob1ve038APljyzz3xB1qU1/kDSkU/dLgEe6Fx1ixxPI0D+o3VObAHDCoSxIvAAe/ 9n3FiW2Mx5/khqPDjf1a/d84eIkJziStSzkHQ9XKosox8L6ka1DL+J X-Received: by 2002:a05:600c:5290:b0:477:6d96:b3e5 with SMTP id 5b1f17b1804b1-4832020023cmr157204555e9.7.1770637003950; Mon, 09 Feb 2026 03:36:43 -0800 (PST) Received: from [192.168.0.40] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4362972fb16sm26165273f8f.25.2026.02.09.03.36.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Feb 2026 03:36:43 -0800 (PST) Message-ID: <146ea20e-0779-4ec7-a8c0-09ebd06456d1@linaro.org> Date: Mon, 9 Feb 2026 11:36:40 +0000 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 , Konrad Dybcio , Vikash Garodia , Abhinav Kumar , 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> From: Bryan O'Donoghue Content-Language: en-US In-Reply-To: <0a324898-092b-3e44-c35c-15de20b50f40@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 09/02/2026 11:34, 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. Exact match would be reasonable, IMO. --- bod