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 14FDD314D15 for ; Wed, 26 Nov 2025 06:02:26 +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=1764136948; cv=none; b=NwQ79z1ye9HfGfyyGA/k8gdoX4u9ESWHK0v/vFEj3TMRVAKfjzfsVQMn5INfXiCR/XIHn7ifiK/S3Ft8G/0T2eiWOqGb5DKTHX0PDIqQ9YnHO1flWCW02QI8F34qnYTDCAAfiYW1/nVZTK8gc+0cd6iBppK8Wp6xGMkcfaoKeOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764136948; c=relaxed/simple; bh=dyl3/ntopNbv3yYZrrcoXgHieaoSmqCTWvqkmEhoeps=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QCf/tN376P+yqLGuUYDbk6BnsxsCJhxuAGT4Y1MHziMmPh42aF+JeGNNs6qvhwCmSEIvpLNcp6ONcIEvRhg5/Wf5hTxYWYq1keNDVuZUgkjKF3AbX5tE6WPHqrLJ1/r6KBye7x12bwg4gOikkp8Gw+qxOrSqQ3cfh7vpfB/6Rj4= 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=ALcucnHx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cb2n2dEu; 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="ALcucnHx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cb2n2dEu" 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 5APHAqBK3890959 for ; Wed, 26 Nov 2025 06:02:25 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= YjciP6a0IjtUI3khiEOBEKvlx4zrrgo6zDwtEPrHGbA=; b=ALcucnHxbdsQkIDE YFTT1NZt8QfrlVMGFvJ2R6MnnPeB7RyYWksm1tbO3o+id894Q57RzEJAMmFj3U0S 9XYLx01PLjGYrkBYTrr4ZQtwm36IP5GS7EJ8yA1uD/e0VpZ67S04i7m85K1sOIUI LNogdGzYN4sD0xpE4deOXjDi+6BzOEdVlQgpiDhqpsN1jVY7On27+Q5F9wFCscuN VohNkhPk18lLkoGl0yoAmqb/c3ci6xFvdobSYI8VVPAJoeAgR7/I2SoF3l/JBs24 IcWM5tKRVYvIzlFk9ltWjruOS7CzGIVBIL+4DlG+0D4qCyU0u4PsfvKzO8BIMAjh U6ItUg== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4angme9p62-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 06:02:25 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-34377900dbcso13821446a91.2 for ; Tue, 25 Nov 2025 22:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764136945; x=1764741745; 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=YjciP6a0IjtUI3khiEOBEKvlx4zrrgo6zDwtEPrHGbA=; b=cb2n2dEuZ+XVpe2bI9riqOBfqsel8KL0y0fjbcfULoRM3jsHtbvd/0tAo851/zFYcQ IPpldCuUOjNYcy2r3ROJK7oMUGzrIXw4U9PqUkyud/Mvg4baNilkNTmX2a7JtpG1omrA 3aqtnHtzEoP9Vjqjqm5A7cKL/pvGTjDlCuHMlMNZTAd8SMUZurcrGEAIZYcdO7/ZR11C DksZ+7NnsbBeX1OIa5tfQMDjcAweCEMgRT4dYyR30j0uP22jwlnNoqUJu3ssfQfUDtlV x8pbI4u39YeJTah2VVi39SAORqu25OwPZubpRK5VRkY47x5IXvIcEv2fQArtXUUd//dk UmXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764136945; x=1764741745; 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=YjciP6a0IjtUI3khiEOBEKvlx4zrrgo6zDwtEPrHGbA=; b=jRbp/A0HkdsxSoYa3YOmJJGya8FHvLkpVukNUiQkR1YcewDHQWnpwuVlZD7Ic4uZKm rZI6ARmaDKQUseKGsAbxiF3C9YGi7eAa8Ycx7Ucyy6cOJoJvsClZuQnIjraSknM9Juvp I8tO4woApGZAgOpuj7aeC8npbw2Z68Nijg0VSgcR26IP78QA/Nirl30t9g7/sTdh+jBc 6/fQzmW0WxrnNfdr2espKvWUNp7RjaQUZo81NqHlwqKr0amMRxyuKXZxhy9oCWLTje5E LPQGxbAm5+tzwo5kkGRVKrfgN4hBvoCJNWsOw203pUSayuGHo6Dem0TmFa0W5Cl+puhi LhOg== X-Forwarded-Encrypted: i=1; AJvYcCV2wSLLy3OzmZoF5ZN37aZQ9gHiQctpR6+L+Sk6/dJxaWTrcPOmjqbS4dYvaEF8Q8BcA3G1jmqs2S/2EKo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx2alx2gjEPm5BPcZUpLdmOA4wcZBaFBejndLJi55Ufg8o94TZf 1O5TUyRaPndI750+mX1G6pzD6YOTotxkwKF9JsYV74ndBYOU5FsMp3k0QKh8S1OvMDohr+eHx5t b7y2LzbihqLqiUTefi31NDosozckbvQFdibbyhf35dG0bHJ+d+rOyH8VJLyUCybEhlow= X-Gm-Gg: ASbGncuEAVMBbzBXm5uNNBHq0YqVvVfsZaMR76FBkkQB4Sg+K+1LNWfZIfuMFOZav/p +9nx8+dScwYupaW4JWEN9eckXRUx2YnqQzRQt5jH/VnOClSBJ2r2VBVGou9xnSsqiUQneBaTOOI MaZQTie5HthOw0iiR6vZFxI61+F82ECb5VSCHUS5xZOfcCEQowDGxQhEorfasI2A5hqmJOjeHJx 5Prqv+tA515GamNmYkuak0KhIJdrs22OZlZGXQTJejv0CHjqy5/spCIdaoqJ7419IxbAbjMS7qk pb+a7kUUhCauTGX6EX+ahcEozrbPn9y1IuCF4Q3n9YTAw9/VQ1T4BjsqwWZCSgl4dQP9fH6IFRr sOluresjTaykDrezHEGsIHz/r+dF8AJGrmithBdD1kA== X-Received: by 2002:a17:90b:5183:b0:32e:9f1e:4ee4 with SMTP id 98e67ed59e1d1-34733f2278bmr19709007a91.17.1764136944473; Tue, 25 Nov 2025 22:02:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHel1qAda4IjKOVHP8XaISvlRtkrTCjU5jX/Ea+jQHwfDaLvLGE5EziIf1nQXJ3erB8dBXmSQ== X-Received: by 2002:a17:90b:5183:b0:32e:9f1e:4ee4 with SMTP id 98e67ed59e1d1-34733f2278bmr19708971a91.17.1764136943841; Tue, 25 Nov 2025 22:02:23 -0800 (PST) Received: from [10.0.0.3] ([106.222.230.111]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3475e980f41sm2286889a91.2.2025.11.25.22.02.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Nov 2025 22:02:23 -0800 (PST) Message-ID: Date: Wed, 26 Nov 2025 11:32:17 +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.13.0 Subject: Re: [PATCH v2] media: venus: vdec: restrict EOS addr quirk to IRIS2 only Content-Language: en-US To: Dmitry Baryshkov Cc: Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Viswanath Boma , Stanimir Varbanov , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Mecid , Renjiang Han References: <20251125-venus-vp9-fix-v2-1-8bfcea128b95@oss.qualcomm.com> From: Dikshita Agarwal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=PJgCOPqC c=1 sm=1 tr=0 ts=692697f1 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=12FOtvgV4D2gsqRYbU+y8g==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=GE1HXsG9Zi4TFkiVsKoA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDA0NyBTYWx0ZWRfX1uaPsbOSASkJ QNaWIMLF2bdLrWh0lxQAJhPtctATZ4hNDznA2iKcd2mjMsxCE9Qd1iEQJpxFrsQPxnVwvVjqnnw y1RGLM0qgp4ti8vNDS9Y9AeVx42RNIhR/VYIvEcxtjwldNmGNNRlA7cUtNLDnA/aOGzjKUqRZ5K iW1tgw0jjy18WNLzAeK2xBy+lFp6aHEvw9iJUAScxfOW81O+3bCk8HgUVwNSCycr7d0vLGK2OHu 9u6iDSNC99Nd1TzUMM9TiyByzXaSvalbQCNI6ftkK2BppHMXAkuFxc8aTKpzy2GyI9FDQkQTx5E wqLaJWPc1Ga7LsV7M7RuW4GlSUXqHCZoI0AjUB4Ah/ZcxWH+Bv+6spAEKlzi0hJsiOWA+xRiY/K 2v8NoEGVQbPKr26DqpHZtDAW0N9rTQ== X-Proofpoint-GUID: Tq2_pO_OBe4uz-X_2ddeSzmayVKmPodY X-Proofpoint-ORIG-GUID: Tq2_pO_OBe4uz-X_2ddeSzmayVKmPodY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-25_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 spamscore=0 malwarescore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260047 On 11/26/2025 6:43 AM, Dmitry Baryshkov wrote: > On Tue, Nov 25, 2025 at 11:04:19AM +0530, Dikshita Agarwal wrote: >> On SM8250 (IRIS2) with firmware older than 1.0.087, the firmware could > > Hmm, interesting. In linux-firmware we have VIDEO.IR.1.0-00005-PROD-4 > for SM8250 firmware. This version wouldn't be parsed at all for SM8250 > (nor does it follow the format string). Why? Would you please fix > version parsing for this firmware? Right, Seems this firmware doesn't have the proper version string, I will upload a new binary with proper version string soon. > >> not handle a dummy device address for EOS buffers, so a NULL device >> address is sent instead. The existing check used IS_V6() alongside a >> firmware version gate: >> >> if (IS_V6(core) && is_fw_rev_or_older(core, 1, 0, 87)) >> fdata.device_addr = 0; >> else >> fdata.device_addr = 0xdeadb000; >> >> However, SC7280 which is also V6, uses a firmware string of the form >> "1.0.", which the version parser translates to 1.0.0. This > > I still think that using commit-hash is a mistake. It doesn't allow any > version checks. Agree, we had this discussion with firmware team sometime back and for all latest firmware they are having rel version in the firmware binary, but SC7280 firmware binary would still have commit hash in version string. Thanks, Dikshita > >> unintentionally satisfies the `is_fw_rev_or_older(..., 1, 0, 87)` >> condition on SC7280. Combined with IS_V6() matching there as well, the >> quirk is incorrectly applied to SC7280, causing VP9 decode failures. >> >> Constrain the check to IRIS2 (SM8250) only, which is the only platform >> that needed this quirk, by replacing IS_V6() with IS_IRIS2(). This >> restores correct behavior on SC7280 (no forced NULL EOS buffer address). >> >> Fixes: 47f867cb1b63 ("media: venus: fix EOS handling in decoder stop command") >> Cc: stable@vger.kernel.org >> Reported-by: Mecid >> Closes: https://github.com/qualcomm-linux/kernel-topics/issues/222 >> Co-developed-by: Renjiang Han >> Signed-off-by: Renjiang Han >> Signed-off-by: Dikshita Agarwal >> --- >> Changes in v2: >> - Fixed email address for Mecid (Konrad) >> - Added inline comment for the quirk (Konrad) >> - Link to v1: https://lore.kernel.org/r/20251124-venus-vp9-fix-v1-1-2ff36d9f2374@oss.qualcomm.com >> --- >> drivers/media/platform/qcom/venus/vdec.c | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c >> index 4a6641fdffcf79705893be58c7ec5cf485e2fab9..6b3d5e59133e6902353d15c24c8bbaed4fcb6808 100644 >> --- a/drivers/media/platform/qcom/venus/vdec.c >> +++ b/drivers/media/platform/qcom/venus/vdec.c >> @@ -565,7 +565,13 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd) >> >> fdata.buffer_type = HFI_BUFFER_INPUT; >> fdata.flags |= HFI_BUFFERFLAG_EOS; >> - if (IS_V6(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87)) >> + >> + /* Send NULL EOS addr for only IRIS2 (SM8250),for firmware <= 1.0.87. >> + * SC7280 also reports "1.0." parsed as 1.0.0; restricting to IRIS2 >> + * avoids misapplying this quirk and breaking VP9 decode on SC7280. >> + */ >> + >> + if (IS_IRIS2(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87)) >> fdata.device_addr = 0; >> else >> fdata.device_addr = 0xdeadb000; >> >> --- >> base-commit: 1f2353f5a1af995efbf7bea44341aa0d03460b28 >> change-id: 20251121-venus-vp9-fix-1ff602724c02 >> >> Best regards, >> -- >> Dikshita Agarwal >> >