From nobody Fri Apr 3 01:24:24 2026 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 90DFF260566 for ; Sun, 15 Feb 2026 18:21:54 +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=1771179715; cv=none; b=fyayO8x+HVZiZsU3mPHoG0An63s7N5NtBjS+SsHXJWoQ6MJs318ts6G0ymL2pYwyMg8flaMgsUYAFKYQCO4F5vpteDKHeJY7hV2BJFlakrSgx2KsLiU0tMUYwYD8QA46dVwTJe8Y2/q2qE1x/zD5+4bS+UAH0H9VbXYCozHLjvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771179715; c=relaxed/simple; bh=xKLYuFz+4tSIoIWOitziYVUW3AUr5T96HlM73lCZEcU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oYO88QoIZZKleSQR6SEQP/1WZfaOhprnRf3dqCGc3RxpODeC4mvhbNzRe6YzRUbotSFHlXtJ1CK84jjfCERRpo+mjszmqj9LIjH1KhGSMJM1X9IjO6bav/BV14bjUELIyH0wbLgi/OqWAlPpDB80GPoHTnqPXFDV2lVFSG5zMrs= 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=GyNm6z+3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=auFbO++c; 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="GyNm6z+3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="auFbO++c" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61FGrbKo2805041 for ; Sun, 15 Feb 2026 18:21:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=dgIREKXxj6b F+RK+0EKrSCsOy0Evz93lE4MQnPBprCM=; b=GyNm6z+3I0pB2OU0aKhe0aSTdQT HTxBeG08B5yKu37p+ohkm8k7DwfncUn30Xhiv5u82zMbEi9MGbV/QkwghlCkFBBW SRy7kUfI1TXKM+Dp3aEOlp6Q60EoMNvnvJPjLkUWutnuS0WSLRQ0CaIqjMnj0ZMu raTpAhosaFg5btRJQDhkcpcQSY3762iPdAM2Dt0whLRNY7N0bNrDzFO1pDCDLulF V9vib4AjbW7/Vxf2jz3DmHpaZvJL7M3KOuMufPj/q8QWz8Ta1zNa8VOD8wUN6pjF l7mOPC3Xh7QmZmuC6PY3pDcOstRucw8nTc1sQHT4vcxbOwBF3ptn9cgg0XA== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4caj7jajj8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 15 Feb 2026 18:21:53 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-352e6fcd72dso7765748a91.3 for ; Sun, 15 Feb 2026 10:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771179713; x=1771784513; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dgIREKXxj6bF+RK+0EKrSCsOy0Evz93lE4MQnPBprCM=; b=auFbO++cpyF1OTHazPHCmiLoQDnnwYqdK+725DNvYnTh1vJ93/zd26npJh+SrZ9pfs GpRWVaFQACC4IwPIZNoW+QR3yiBLbjGUfTwmK2ZPfkKcewOJAgySe94uILBfNdOOhsuo h/05BlJfZOVzJdIkArLS3xIsuz5XPkTGQQIoNIWH77yRo2+/UxEoXw4okeaPK/yoW6YX duU7qW71+kWywXbSTTcsnAVPEdtD7fBfjO9joKziADZ3I9HGNbMQd+K/NZG0ms3i3h2I eNynC+0VlIYr76P7uhBC1IS3Q13psZPpg5WMLzFCVPkcNfSPWWImV+VFnRHxs7cF/YJN D6vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771179713; x=1771784513; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dgIREKXxj6bF+RK+0EKrSCsOy0Evz93lE4MQnPBprCM=; b=Jmnj7u9oib8bZ6pTh4/Q+PWPqzqMkIAnlaMoeSglnNSclDI9RfXC3JecfBebTxjF26 AaeKsT5eD6OPMg2xxpGfqtLBhHXM6wQ0DAc4aJLCAHNb+mW1P2ZGW0XOk1wgaCjlBnxC /YmklxZb4HppdAQpvNu2bbFx6CN2YrL1f5mwR/2qsRSlEcQYf5jKwtcxt2p0CU/e9CBu 9IHlfHIt06MVSOBiMEuVg85m8KZSqOBFX8iYVOfRNuE79fvhtC22JZTHM2TBOwDyr0Dj 4KEvLOnkDjRpLZtwx3KGzEhuRe/P5DdKJvIZ6H3nQb9uShBOpWT9TCt2Efb3qpLHvLwv xZKA== X-Forwarded-Encrypted: i=1; AJvYcCVPElYGdTSg5+deaRHbkfC5W+9OSCG+ms3D2YK0xu3y85+0X3wXB0VOI4JfamYSwaPMsJUHlKwzPTeFX9g=@vger.kernel.org X-Gm-Message-State: AOJu0YypVbIu4qlgBGM/+xr+A3/1D/S/OoIX6iHJMttI/DFmOv+buXf2 OqfKxNxR4RraMbumAKq+iTxmRjVdZenJYlMv0qWNNECFVjmdANEeh3u6t/sHfc1VlHDl+cth8h+ AnVzBX7cwTdqe3dStqkSAgNvEB/r/PORaCFf7a/C+HOVaBC+OUvX+Ku6nGQsmzrepkQI= X-Gm-Gg: AZuq6aK1pLPNxHi9FEefn9kYJ7iGe8Ug0MvhzUe8ptIxTZfXidEVvKOfm7k6kNnv5k7 dsKEQsDYIM/bbiNypn3redIuNBnyKDgr2mRkCL63R/rs0e3n2Ko7t8N7LgUJmsh//WhGvWOpK6j yQrdthb2k3UFcywMf8ZaqDC+TqSqiZcodOX4iBSHTSXeZkUd8u0WTLN3oPLwZOL/KDYKfZzfrKk ohcTLzSzUFN7iuLVB2YoxBUjziYx5PSLS/cvQRjTpdDX3vBlmKjMa77J9sDC+I3uBUhTsUHrC+e f2Q72+WAFSXmpYVP0G+IUyBnrpiG4HSdffDGPpKNF9jWKRfJrTwZ1S/TtPTuCnKyeeCSh3R4xcy QhIeRbBW6jHATkDg/ox7ELoN5KHm0CCJtZj7TjU6IFm2yD1lYUwh15w== X-Received: by 2002:a17:90b:554d:b0:34a:b1ea:6648 with SMTP id 98e67ed59e1d1-35844819f9amr4757693a91.2.1771179713117; Sun, 15 Feb 2026 10:21:53 -0800 (PST) X-Received: by 2002:a17:90b:554d:b0:34a:b1ea:6648 with SMTP id 98e67ed59e1d1-35844819f9amr4757678a91.2.1771179712598; Sun, 15 Feb 2026 10:21:52 -0800 (PST) Received: from hu-ekangupt-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35662e537desm17425381a91.4.2026.02.15.10.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Feb 2026 10:21:52 -0800 (PST) From: Ekansh Gupta To: srini@kernel.org, linux-arm-msm@vger.kernel.org Cc: gregkh@linuxfoundation.org, quic_bkumar@quicinc.com, linux-kernel@vger.kernel.org, quic_chennak@quicinc.com, dri-devel@lists.freedesktop.org, arnd@arndb.de, dmitry.baryshkov@oss.qualcomm.com Subject: [PATCH v6 3/4] misc: fastrpc: Expand context ID mask for DSP polling mode support Date: Sun, 15 Feb 2026 23:51:34 +0530 Message-Id: <20260215182136.3995111-4-ekansh.gupta@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260215182136.3995111-1-ekansh.gupta@oss.qualcomm.com> References: <20260215182136.3995111-1-ekansh.gupta@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=dIurWeZb c=1 sm=1 tr=0 ts=69920ec1 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=JTa3dIKMUYn8LlmgGFYA:9 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE1MDE1NCBTYWx0ZWRfX/LeOykM46n6v WwSAfNsi6rtXxj1vCNBIw6JeegIr2HTawMl0V3vqrmA0j/mPIx51tAZQEogUI5YM7etEd5tgDW3 6UJ9J0SVvXTz0pZFylqbfSHptWq5re2x3M4JfaUOCfz/rkx7bdEuBuEZU/5L+JswagB7yV5N3k7 OEudVWOpy5yGlpCj3H91l5ENYwaki4/eoEkrfMCiWZOsPtReNLG7y6Gg7XnyFJa0WA6iTHEbcWL O+5lrQXXxkazwIxPS5g7cYTGobQ9tFa+xxCsTOD8c3W99LSBPVqfmHNML7K5maTFfz8CESDnMTI HRsPVn6lDG3ELLgvv3Q3T3PsM6XdCaghFYMJ8XNB+MOG4JlSiNhXUJBSmRXezcA6PR9P5r5KriP /C3uDBN0uuR/GQbuzj3trIV+k0cxwUvDMNksCfo2OKo7z/OfhVwPa+Sd/dsCzFDi8OVoNFvWcJG Neu/XpWGPn/tQB6/d9g== X-Proofpoint-GUID: Uicf0nTkM4SukN7eaunYgXc8Ju7dax1j X-Proofpoint-ORIG-GUID: Uicf0nTkM4SukN7eaunYgXc8Ju7dax1j 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-15_06,2026-02-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 malwarescore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602150154 Content-Type: text/plain; charset="utf-8" Current FastRPC context uses a 12-bit mask: [ID(8 bits)][PD type(4 bits)] =3D GENMASK(11, 4) This works for normal calls but fails for DSP polling mode. Polling mode expects a 16-bit layout: [15:8] =3D context ID (8 bits) [7:5] =3D reserved [4] =3D async mode bit [3:0] =3D PD type (4 bits) If async bit (bit 4) is set, DSP disables polling. With current mask, odd IDs can set this bit, causing DSP to skip poll updates. Update FASTRPC_CTXID_MASK to GENMASK(15, 8) so IDs occupy upper byte and lower byte is left for DSP flags and PD type. Reserved bits remain unused. This change is compatible with polling mode and does not break non-polling behavior. Bit layout: [15:8] =3D CCCCCCCC (context ID) [7:5] =3D xxx (reserved) [4] =3D A (async mode) [3:0] =3D PPPP (PD type) Reviewed-by: Dmitry Baryshkov Signed-off-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 0d8d89a2e220..e935ae3776b4 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -37,7 +37,7 @@ #define FASTRPC_CTX_MAX (256) #define FASTRPC_INIT_HANDLE 1 #define FASTRPC_DSP_UTILITIES_HANDLE 2 -#define FASTRPC_CTXID_MASK GENMASK(11, 4) +#define FASTRPC_CTXID_MASK GENMASK(15, 8) #define INIT_FILELEN_MAX (2 * 1024 * 1024) #define INIT_FILE_NAMELEN_MAX (128) #define FASTRPC_DEVICE_NAME "fastrpc" --=20 2.34.1