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 2E65C328263 for ; Wed, 18 Feb 2026 14:38:38 +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=1771425520; cv=none; b=P2+hM4plEBP3r8czPKyO7YKDQZPrQOD2v/W3ABSKm4bVHNf0A4twjOJZBNSUnsuNY4YDSrlmo/vPYAU2e+rPrt7PuRwRcdhijiwx+avnWpSK4gMc83hINgc55L62TzBWUq7wSLxipDr/La5asfYd/D1eOkPlrvoPpTRmiaS30WE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771425520; c=relaxed/simple; bh=vUu2tw8Z85UwIH/pkoLHOTaWnUiXl4S6e78RxA96ga0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aJysr+nABpuZem0WjfyQCiCNYbGTYFLIq7N1eX6KJjguFDsIbKL0NtuMNbAO0GQlcdnEDsGjRki44XXJ01p1OiRrmbtFRwFSNAPY4ByPt78xMtzROiaKWCL9TwE1ydPVCTXvtMZ8EmmT5Vvu9QfbxN8/aYxJVeRrWaOEbTiximc= 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=Pgitkos0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=d5S6jNxU; 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="Pgitkos0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="d5S6jNxU" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61IDVktG1046431 for ; Wed, 18 Feb 2026 14:38:32 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= WH1nlO52NiOo/le5purWnObw/9prSk/Tj9AQuM4+OCw=; b=Pgitkos0R+Ukh3CH zon02hkMtAfJAK2tDb0BrcWHvlTd0qmrE/GbRo/oOHR7X3VKfTe8OO/6Hmnj6vnT ajsm877NO6d7EdrEWU7zPMQ6i5bOxLiTgw7HD33l+zJ0DTTyae6twW+TPKCOKP/i N8f60N91m2UIliHdgFmQW7D53a4T9fHXu1dlzPtahuZ3QfoIy1UVjYj8FGKx+kzp eLKjJNtP5bXSGUE7BBrKecNQ9WfQlQQxV4m1rLEcUQEc8dTgFptsV008p9uEr7+8 K97XZAljV6W1vV2A3YeY6LOrw3gIVe3hSCfZaCxzBuRF9oIIwjxHgXarmQXG1ufK V8cDRw== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cded005ss-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 18 Feb 2026 14:38:32 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8c70c91c8b0so441488485a.2 for ; Wed, 18 Feb 2026 06:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771425512; x=1772030312; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WH1nlO52NiOo/le5purWnObw/9prSk/Tj9AQuM4+OCw=; b=d5S6jNxUMM78caq/QVVkeQ3WxJhvhleJ7o5JjjlsNpv5jeRGeJbhCyGTnfJ+aokzzq MeYYqAV4sNQ8JIufjuoXmTMxH4OHzKSdr7oBFofExgke/thCSS/z8sEu935peGR2Iiox 4uyrZomO5shdep+dB25vVtkhAu2QQVjhP63c+LpmRFJqZItXUleA6viRy9CdAoF2iQW6 6S+VQNxnYNVDq1awHyFJ0Ocz3EN6y/kK9hcaVBCrAwneZgKZVDwf8QUyY+u5Dwc8zijx kfzJaAOmpjodBuBqwfApAhbbz4py7XBLrdYxT5TZGxiQIh+UxGwxi8tcN3WjmO+BNPPr ea6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771425512; x=1772030312; h=content-transfer-encoding:in-reply-to:from:content-language :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=WH1nlO52NiOo/le5purWnObw/9prSk/Tj9AQuM4+OCw=; b=MDn4VeYfunlnv0YZRCRnj2ZIMo8E25DqGNvjhiRBE+8eFLU4FsZqhkDqgCYGIdkhhI dPII1El6bEmI/c7hkqZQfle0yWNWpgQ1sSrMNZplza0SLDqdNMZQvEDN2x0gxblyPZCR cE/0iUK5sHhQN36dtW9bPG3xl3qgTSeiz2RDg1r1clF/p9t3pVsQgKGQkN9WrMVhS4UL wU8kHnW2X952y+FilF1Au0FdK0gVqPSRkUbF2YXGf75B/8b7RFv4dh3G6ngekoIaOFiz EKvJNct93pbLB9xYFiSRsqYAPzGuLfgCIdo4uMFrDDZCZ8jYXgWBJPWfI0o5m00dIYHi SDbw== X-Forwarded-Encrypted: i=1; AJvYcCXGt5jX8527gOaM0HaGbIi4fjIHXJqSROgn5+EcmM0FCbaVhXwpjtI4mqUg8Ptl7N+WKctoyHfy04kn11w=@vger.kernel.org X-Gm-Message-State: AOJu0YwJzAp++vgD4kzXZKLaoB1EzcJE46ekohqHZfKbrgPo4cNBwkBz aGkKRBPbemHKhiyixqkXzTmBoRyoeOYVnB5ktuhTgyLkiidKgNg6qk31pl/PJRztPVBhUbfZroR c2fHH1AsNqXs3vdpM3YVlaRq0bW7v/KX0Ytz4tWOD2jFBtCkoxgHVHf5e3T6ztuNu6bU= X-Gm-Gg: AZuq6aI8T6belvaYZyLisatWfO2C8df99mcBp+PTzwoWjcgc88845ThnWce8ItGXZDg i2N3T1SBURmvA4hrL/V+GDch0X7cMtkJFGFpNI+xTuIDUSx2H2UlXaeMBz5bEmhb7caxuiHELV/ 9fq35tklQsxDnNIyi5G383bOprSLxqlQaCtKR5OPoU6Kh9Ww0hx+RwGHlldwTmi01bOv/O9TgRn Ha2qjiFR1T1lvaL701wQTGFI2n8mdQ0wNrEaTGGF8FbbqA3+n32175AKVYc7hu/PA2m+m5f1Fqj Q0A1MxYa/9beHXXDxWCcSIMZMlq02ntHtvq8F8eGwPlNBrvRCpwRiOBf3dYGbvGKXPuzXXxLWut 0s29VKF1YYamnTjHhNajN4FgucxszSJEd3/UcK7tV0R+Vi7m1HgSXqsqvFplXav0Wfr4NZdbo20 Lycg/b/K1m1zm84Q== X-Received: by 2002:a05:620a:4410:b0:8c0:cec5:148c with SMTP id af79cd13be357-8cb4090644dmr1660825985a.11.1771425511635; Wed, 18 Feb 2026 06:38:31 -0800 (PST) X-Received: by 2002:a05:620a:4410:b0:8c0:cec5:148c with SMTP id af79cd13be357-8cb4090644dmr1660821885a.11.1771425511092; Wed, 18 Feb 2026 06:38:31 -0800 (PST) Received: from [192.168.0.242] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8fc7665345sm459517566b.53.2026.02.18.06.38.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Feb 2026 06:38:30 -0800 (PST) Message-ID: <81faa130-b497-4248-a6c6-7c421646451a@oss.qualcomm.com> Date: Wed, 18 Feb 2026 15:38:28 +0100 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 v6 4/4] misc: fastrpc: Add polling mode support for fastRPC driver To: Bjorn Andersson , Ekansh Gupta Cc: srini@kernel.org, linux-arm-msm@vger.kernel.org, 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 References: <20260215182136.3995111-1-ekansh.gupta@oss.qualcomm.com> <20260215182136.3995111-5-ekansh.gupta@oss.qualcomm.com> <1707a83d-d717-43b7-b450-90f8400a65fb@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: -u0UE1GlF3tmbfexiA_H2VamP2Vxr7mp X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE4MDEyNCBTYWx0ZWRfX6rbu+p8daF06 YMya6WxNRKIu//xgcrxRmTFt/gqVZwRfxjh1Nlxm28Jas6eBrdFUwmwdYPDhTBi9zRE2O1vQpxq DMpgaKnIvvuZdy7R0leb/AvTi1hBx+c02cPsPNooP6Hf0G7zzopeB4FBd6tnqwqWuH5RnSGTdEC kWRHiwGkDk93/yNPIFiFA3+JN1BNWlF1SIL6TnRVj/qwTgXGKpoydppc3iODxZR3es7vRyaAZZ4 xwTqK2Pk/yFdqsueBCCVN7ixhDyghk4ZQKf2hSmS1hTFnbamJaoG1HeHG1Uc72pfw1pjpouPbtd f6Gy2fNy3Cs3gVFtWJukzCi71lyNM/Js1pcTAtSW80Km7MLuaKvBXK3eZQepm6h3iI/zUhKmeXW Jkm7PYd5+L0Ai1W92JDVqW7iRtQ7jApEdguOZVoDRL6cxRSswDDkXu/MsUInl6JEdD/Z8Rqr9/4 qWtnrgLPB6pILih5qEg== X-Authority-Analysis: v=2.4 cv=b/q/I9Gx c=1 sm=1 tr=0 ts=6995cee8 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=PCWUlEzcUK1kj1-k8vkA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: -u0UE1GlF3tmbfexiA_H2VamP2Vxr7mp 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-18_02,2026-02-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602180124 On 18-Feb-26 15:36, Bjorn Andersson wrote: > On Mon, Feb 16, 2026 at 02:36:40PM +0530, Ekansh Gupta wrote: >> On 2/16/2026 8:51 AM, Bjorn Andersson wrote: >>> On Sun, Feb 15, 2026 at 11:51:35PM +0530, Ekansh Gupta wrote: >>>> @@ -1812,6 +1912,30 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap, >>>> return 0; >>>> } >>>> >>>> +static int fastrpc_set_option(struct fastrpc_user *fl, char __user *argp) >>>> +{ >>>> + struct fastrpc_ioctl_set_option opt = {0}; >>>> + int i; >>>> + >>>> + if (copy_from_user(&opt, argp, sizeof(opt))) >>>> + return -EFAULT; >>>> + >>>> + for (i = 0; i < ARRAY_SIZE(opt.reserved); i++) { >>>> + if (opt.reserved[i] != 0) >>>> + return -EINVAL; >>>> + } >>>> + >>>> + if (opt.req != FASTRPC_POLL_MODE) >>>> + return -EINVAL; >>>> + >>>> + if (opt.value) >>> Would it make sense to allow the caller to affect the poll timeout using >>> the other 31 bits of this value? >> I was planning to bring that control[1], but it's might be difficult for the caller >> > > Skimming through the thread, it seems you're discussing how to determine > if the DSP supports polling or not; that sounds like a separate problem > in my view. Not sure if you settled that discussion, but couldn't that > be handled through FASTRPC_IOCTL_GET_DSP_INFO? > > I assume though, this would be subject to firmware changes. How do you > determine downstream if polling should be used or not today? > > > For my specific question here, I'm merely wondering if the timeout value > should be a boolean or have a unit. We could punt on that question, to > not block this feature from making progress upstream, by defining that > only 0 and 1 are valid values today (all other result in -EINVAL). > > This would leave the door open for having 0 == off, 1 == default, > 1 Giving '1' a special non-numerical meaning sounds odd.. maybe 0:default, -1:off (or the opposite)? Konrad