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 4626E2FFDD9 for ; Wed, 26 Nov 2025 09:49:07 +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=1764150549; cv=none; b=UMMFQBOuOMHPe/HhsQfqU/kQE1rOKdDHkCAaPdEUCZ3JKUkW2R8ep23/tGQ7slNtRSF2RGFvGYby4lrRqTeShAWFGFsocLMHKn4CEDn8fNDM6ipFo0UUY9PuldgC/l++IDNBpSI/VFU0TodV/tZccZuo7cGjP9JagFxm/BiCbpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764150549; c=relaxed/simple; bh=RrWGzLsOVYWtMHzZYByIJfPoEG0XlyOMqIT4XJQf9k8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UbfQFHbZ2I9tTaG3yIG3meqcE13sGL3kIhz8lEb3NVZwuf3pJYKxnoBjtZJ3Ub1dbtIbmb0LJUu8X7sp0A2COI9KqGiNQE9DY8EOSVaPwrBK7AHd9F86tZhPwDCgb478tBoZA9CMrBhAhpIcU1ciFTXxc1xT1h70W3X01kPhFKI= 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=dqfXcoAj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PIQVr1YZ; 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="dqfXcoAj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PIQVr1YZ" 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 5AQ6Bihs3738984 for ; Wed, 26 Nov 2025 09:49:06 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= AtsXINd6xpjA/rQCk1uW0V0mzBllHaDtYhio+xIIvfI=; b=dqfXcoAjRQWE+/AY N+nyzYTyXp9JVN9vpsTXDFHgrN8BFnWHBJ6fLXrikHV06/kisL/O1Tg9LVCsbUTQ 7zjo9mcI0rh4MrEWWmNHzwN9bBDUmhVpAlV4Qo2sfbzcRNptSBjUCDutAdQYNgsZ 3mgB3BL7AZktGceDA7tUpOTC6R+VZPHbt6A8lo+V4ttXryRuJgwI+AGOMx0a2S5O ElgaDtMrJuJ9n9y/pzz7AYkAns32KF7iIDh1RB+WWAvkA8jT5bknOspIW/hd0gPX 4Wjg4dcnJQmDbUlQxWZ5Zwz+uQjeRY95Vzr8GmItjAwgC78CDDSYBl7/VeuUeLba o7A/BA== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4anggyjc73-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Nov 2025 09:49:06 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2958a134514so88801575ad.2 for ; Wed, 26 Nov 2025 01:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764150545; x=1764755345; 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=AtsXINd6xpjA/rQCk1uW0V0mzBllHaDtYhio+xIIvfI=; b=PIQVr1YZCKfsJnweTNuO0+ERL7Aoqcs28XHmdTnDFRAMy9+ESDuQgokrJFD3hpZOFJ KZyZWznoVu4gL50t1zwY4PV0IsY+w+6zzjDdMboSuHbUHKcr6+EV2vXWMMizLjE/15t2 ckOqw2ws7yf0dquRdoHyRQlFENp5+RkhwvzuCmrrasLG+9SewPh3ha/tMvBFtyc0o68V cq0d2uckvZLMVYzEb1jy/0AWZJ9t/Fm5/V4T57dOyTY/CgTHhD8cl3+tqzCe1bJIPhnk k0WIZXzmoPVcv/WigXxO8NxiAvibWVot/yW6xddoNwUxNcQldsCYkcYWbwmaqfPG8RyJ Vs5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764150545; x=1764755345; 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=AtsXINd6xpjA/rQCk1uW0V0mzBllHaDtYhio+xIIvfI=; b=iTXKdvlUyh+cfpNJHQYPwz1KgQ2CX0WvqQjsmnuGVqp6QO5zuqjvTq7iH9SZhQiPWa +iGw9sZQYbGLZVlfIJV0lU1JKUyEj7BE0kg98/3RdbCFpG1ynR2mMuWgI2hPn+JcexLd Y2fCl5GL+6JZz6RiQqbKQZmJtwYLnF+7Qs3GPrOZh6u75+PExlBWgTPOtCoJMOEF3oLC zwAJPIZq8NSlLJodFZFlrGy9qAnTSDqll6S6Rm9CeICYlJPuh60nLIMR1d1W6p/yi/jK VXhWDjxdWMKZfpc6MxZjIQKnU03cC9AzFtv1vYG0uauuj6c5SxVmPWiEsGCGGQAUnLFR k5Pg== X-Forwarded-Encrypted: i=1; AJvYcCWLYuHyIn5OUMD45gRti0ELT80g9xWhhZmiYsFEhBjA/z4SGx3ecY3kJYjOMaL8Q3vh6C9+oJqgQyh4px8=@vger.kernel.org X-Gm-Message-State: AOJu0YxwvlE5P3tIpI77899zUPF47tKO6a7Z9suTDrulZMdzrWH8CwBk Y6PNzIRpVMGuZDiTj6GyRFsE1UjQ9+DjhzRiOO1I0JN1XEL4qGo2MWp1xDQIFZuP5rmF0mE4sXi 3rfVZqdY5cZUJXKLTZmcbV5AEYtOF1IqLd8xqB3Ru9wfNjQO9vaEKy3yofis2kavAqAA= X-Gm-Gg: ASbGncsvYrwV17sQry+O9aR6gHtVGAgmFsAF2nzHy9CEY5xzGvrgldOI+RV0oWwLC5E TLVNP5THHLEw3A16/tS53Zio12KTz507KZVtLfhJja3rpIoMeIkxfaTua78NH58sPHYJpg7N6TK nHsCNzaCyCtnZZ7UEopvm+u0SrpXFyxe9WNrcZyUdrEaHdN+Ur+EWq0FIoh4iKscBp8XE09Rqch HtG5rMi+hjbGkXGIHA9XtjBaGkqUCGDO0goYu6SOzn1X4GUiZNeB5rXh/suWKwf9EYPgedQJL+Y UdBNpl1Y+XbTMFnvsmy98nsedbQ1Pustgx4D0r5YvbVOwlVi2ZS5v0yigIbMbvTMCJJam9fQqHk dj0vrYQlDScul0qmfMZcj2JyBcSLl/VfkNpndDN86aQ== X-Received: by 2002:a17:902:ef50:b0:298:34b:492c with SMTP id d9443c01a7336-29bab2de50amr68568595ad.54.1764150544991; Wed, 26 Nov 2025 01:49:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IECJaA6tw1taMhFN8p4Mm8c/a1cFBpcKMpzmn0A6w/0YsEfsk2WgZNXfYdsHaohN5Z2GVSXlg== X-Received: by 2002:a17:902:ef50:b0:298:34b:492c with SMTP id d9443c01a7336-29bab2de50amr68568375ad.54.1764150544473; Wed, 26 Nov 2025 01:49:04 -0800 (PST) Received: from [10.0.0.3] ([106.222.230.111]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29b5b1075c6sm193071335ad.17.2025.11.26.01.49.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Nov 2025 01:49:04 -0800 (PST) Message-ID: <74bcf345-06e5-413a-d8cf-d87ba769e886@oss.qualcomm.com> Date: Wed, 26 Nov 2025 15:18:59 +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: 8bit X-Proofpoint-GUID: 5HhIvKO4MqdoFDNPxz3ETv8lCZeLJ-aY X-Proofpoint-ORIG-GUID: 5HhIvKO4MqdoFDNPxz3ETv8lCZeLJ-aY X-Authority-Analysis: v=2.4 cv=bNUb4f+Z c=1 sm=1 tr=0 ts=6926cd12 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==: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=aT5F4DDHPNheKAiJ_O8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI2MDA3OSBTYWx0ZWRfXwiT9o4EObOAh LfsLsUFZfcmvp2i5aGt1MNhmPjJsf2k8B6EhSW8swdoG3Go4s39GOdcsn8XCqOnsFp1LagLfuln 96G/dQqI423BJDCHnQZKxg8ZefeE3MIfvG1ajqn0o06YfHiMoEij4QuO9FXYBQ/rBsbN33z0BwP 5KYP1vbGe16uKzLyRep2+UIDaN6REQdfDtxXLEXrtGTsL+mXKTLNY6Bcfy1Iz6cvcGQbw0iGsIy SxW+L6BEe/qEAPXahpsQIvXThqzmLGT45KL7A6vhBKECG3n2HwWyHPNZgxqk45bmrf9UVSt5QAZ c6g4pALprDLRGCbgj+1N76gCQ7f03i0XTsZ/Mtty8m9bYKCcYyuTf08rsku6ApxGvgf+B5RugOb Z2FdivkCn8jqkLby4In439y3asFzMA== 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 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511260079 On 11/26/2025 2:13 PM, Dmitry Baryshkov wrote: > On Wed, 26 Nov 2025 at 08:02, Dikshita Agarwal > wrote: >> >> >> >> 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. > > That's fine, but also we need to fix the driver to correctly work with > the firmware we currently have in linux-firmware. > The current firmware with version string VIDEO.IR.1.0-00005-PROD-4 works correctly with this logic. Since VIDEO.IR.1.0-00005 is not a valid version, it is parsed as 0.0.0, so the condition is not met—which is expected for this firmware, as it supports EOS using a dummy address. >> >>> >>>> 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. > > What prevents us from updating SC7280 firmware to also include :rel-NNN part? > We are working with firmware team on this, future firmware releases for SC7280 would have video.firmware.1.0- Thanks, Dikshita >> >> 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 >>>> >>> > > >