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 4B6CD318EC5 for ; Thu, 2 Jul 2026 17:05:00 +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=1783011901; cv=none; b=HMcB29YhIyZTFi+sJReI3UE5bfY/fmOsopley2V8Up2fJrTTnfxUeAxqakJGwfVR32rIhVeZ+X1JFEaH6hdZplg9VqP4DBo0JaBJLc+ZdRf0SMd7T4Sa7uJyxS53JSksdPz8Vfi72xL2yQAdsDL5fpg1Evg5cjgEyPyE6dNyPH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783011901; c=relaxed/simple; bh=9tuRvVLOkJDkdB2TUNh8MQAFyNvpa/qW/IXJzIeBcH0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kfZ+/B4YWGNCuLbb9IBsIYPE4bMdDODepc4nBmrdEJzA7yqklT1Nr+o7DREHl/JwEvjqi1ko1jzYp8/Wfku/pxtVu86HFtN/eAC0c9deaEx5HQYxf6gmogiJWyEcntJ+i+J9I5C3eem4z5v11DQPZJh8bnSwId3Ey8NKoEmIRx0= 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=IrK+m0Ax; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WS/0xfJR; 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="IrK+m0Ax"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WS/0xfJR" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 662E3Pam666016 for ; Thu, 2 Jul 2026 17:04:59 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= 1aKxFR/CdIjnlCVHU4kiwY3NDA03NMLY1DVMh4+N76g=; b=IrK+m0Axi+P5tcqx 4GG5YONU96qyKpeLs0k9AqbX9rhrxn5z+drnF83+NmF67IpeQlIbry/nZOxm5xBn oQ9W1RF8OkplTXRINFAlLrSdrkGXPgtArg4TaJZZdtg9Q2caUTVToWU2W5N1ragb QQYFQIlAyEhZiO7TUWv7cDKvuNkrXVNfvTb5YzbGStXbUl3F4Q5wjNvhXMh6O13N NaYJ0Vp1nhrZqypgN0s4SvvQNzF4Zle9RrHHZ7LjP1gHLpXZFPMoZL31SVwrHQRV pUA0chwM2VaNjf2+65xDhZxsrP6tL5PcJUsh+rYtCWAZSdxQMgBw07JsFPcUE7E+ 9swOYA== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f5knc2cum-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 02 Jul 2026 17:04:59 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8479b45ad08so2688278b3a.3 for ; Thu, 02 Jul 2026 10:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783011898; x=1783616698; 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=1aKxFR/CdIjnlCVHU4kiwY3NDA03NMLY1DVMh4+N76g=; b=WS/0xfJR/3LVvK8mbNWrBHYVimpaOldoODMXnl3BcU8ZMxI7qpnfXKvswRsT9F2a12 D5IiQ7hPe74XCu3ZKvjrE+Zab5dCx1/RvFPQVXPjlCwW029pcJiWMrrejSR/OUQbAN7B xB5nYaDKGfscNFtWtpC1aSuvMHEsSLbap7n8rB1xiYMF4eGwYCk8hA4x3XxFv1O6suNt dSBrYgvy6op/0iiGSvTs9asploj8kP5vs93SzTiz1UZA5xIzACdmjOZYaiJEqJKaHWbe AeZ7BEMQyhHZ92SymqpUxEH9y71Vd98eio8Ur8IjhL+l+zG9mRP3rm95qLhEsi8++S1R GO3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783011898; x=1783616698; 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=1aKxFR/CdIjnlCVHU4kiwY3NDA03NMLY1DVMh4+N76g=; b=hNWaAcgjTgGPOpl9RnGn423ac1ZAgvPjQHchTDSI8ilFllxKFgVvZNPr0qtloaWXR9 m5qLoNo9FHQTRuHJmnu0ngzlCku+MYRcO0H1GEThF7AajVMucl2b3+3WrM+vZQXMbjTF kM3MAikcHzmEjX1LPkDEzRFZhlDZd76O08eSF3B1ynBAVzoxP5mpmXdkRUm5o6er6Sn8 s7E7Xblbljz87+ehJR5dplDZmIEmGLlArUA3g+7Bo/nz+4A0jHm1zQFvqE+WAcp9EKNE vOtouNNiKYp+/+cjMLZP8iZKa67SMyE/UaKroGEelMaBgX1NsNPaJX5xqXQuyo/aUiG1 WpaQ== X-Forwarded-Encrypted: i=1; AHgh+Ro2J3MrLNGr0Q6OScRb9DY2KRfFQNhZZ2eGB/+QK4wsXmPJfHp4DZZyyWUJ+sIUNrJL36jrr31TmMypEl4=@vger.kernel.org X-Gm-Message-State: AOJu0YwenQjb1BRodSldqXsefSoX7v+2y1w4hi3Gx9T5HuadBrZHKo+n /ESqHvR9jgioLv11zd1FMhRvV71cXCD9DWBuxc0CqCazcLOgosMqw9GjhWMKoiliqZPPXbqAPMi MQ3HJN2SFr2HnAbGc2GQZL+RyQx72BwgLJ7yVhU8OvhVBmuKMrESbHjTShkn1lWw19WY= X-Gm-Gg: AfdE7cm/xfUFbVwImyRpY8CeL+6KWl7ljK0aC4WBu/ZvrX8pNh1amlsKh0F1qhKAh1E /rAdoRWzrzJzZ6xW5qmKRTEkVapDU9ounXhtH7qSbabeqsuhRtq2e1zSCY/5ax6GQbvUk9HjoGU WD3ryzbnjZKGa3w4sbIHCN2jgHQal8VyiiFP3shqi0FTwjEFxQOKjfWfWwoQlHDCnVM8H6MYSP2 NCy+xvaTwVM37lSgK0NYLKajuNcn/WFbPNI6SD6OmdtYGAbNfNtP1wTUFwTPw/ECIzfsjLXGsmO FZCQpG1B7RRi/NpKbqtQLN2E0fg4qEIXmlPWPpnhL25/sLHHmzB4JA9v/qKYhL7PRYOGgGpCnO3 NkDCBkj29oB30zvivHdWu4J9C9QEjA39BmxvIbW01g6PVig== X-Received: by 2002:a05:6a00:4b12:b0:845:c5d5:3743 with SMTP id d2e1a72fcca58-847c0878290mr6759864b3a.28.1783011898015; Thu, 02 Jul 2026 10:04:58 -0700 (PDT) X-Received: by 2002:a05:6a00:4b12:b0:845:c5d5:3743 with SMTP id d2e1a72fcca58-847c0878290mr6759816b3a.28.1783011897290; Thu, 02 Jul 2026 10:04:57 -0700 (PDT) Received: from [192.168.1.8] ([106.222.232.144]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847cb79b9adsm1729818b3a.27.2026.07.02.10.04.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2026 10:04:56 -0700 (PDT) Message-ID: <94956a19-153f-4bce-a824-7608bbffc98a@oss.qualcomm.com> Date: Thu, 2 Jul 2026 22:34:49 +0530 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] spi: qcom-geni: Add property to force GSI mode To: Konrad Dybcio , Pengyu Luo Cc: Dmitry Baryshkov , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260614083424.464132-1-mitltlatltl@gmail.com> <20260614083424.464132-2-mitltlatltl@gmail.com> <99eaf1d1-fbf9-4336-a13c-ae8ab789cc99@oss.qualcomm.com> <6fbc4521-15d3-40c7-89b3-ee15ad673ff8@oss.qualcomm.com> Content-Language: en-US From: Mukesh Savaliya In-Reply-To: <6fbc4521-15d3-40c7-89b3-ee15ad673ff8@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: u4PqXoZIcE0qxONBrqVdx3wlTFthj0MH X-Authority-Analysis: v=2.4 cv=a4kAM0SF c=1 sm=1 tr=0 ts=6a469a3b cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=1q2F+KrbvUZPNaeG7DbW0w==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=CDJIOK5pyNGdDAhtdj0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAyMDE3OSBTYWx0ZWRfX+R1WdHBdVXye Ng6CUoZ4XTOjmKLHd0YWvWi5aFQ9fgIiu838Lq2UjTwT+SNycttvtZSTUu4rfkeykyxPuF+C4Mu pjFG3HFspRliwzYsNSvMNgo0BuQDLsnM1Eu78JambVZAKY5UMFNzqFZidlyZXAoi8GBMBvCKaUK pvGdeVzpdp43Dp0atkhCw1GQsfsw8Kke0sPBhSmZS2M0kqjf0w3SOjda7HQo0ZETFNvfJft/ExJ nb0CJkDCYqF83OZrCNH5Qeft+uUkkMsHIQgIjtnwa+AhVUR/n+N5zsNDX6wG/PoqIihHuWe3/Sm 4n1DZiQHWOtVnBG2BhEDCwpi21ltDE1jnbV+h8hxAqfU3YCoXrQztBe6/bVO26XnKYJbpBkHgcU UQt4GnOrXqJ/G670FMX/crMzE9mO3ogSqMUnGM3bobfoa+n4WGTdvBgPG4JPriQEhJCP9ye3KU+ 5VuMNXbnek5ose/gHNQ== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAyMDE3OSBTYWx0ZWRfX4eOHV2JIPkqu JOo7prH2Agi+J9fya+pZoI8I9b/eO6+N1qaF5/idWbffKiNH6AFC0c6xAb/189SVdnHW662ZXMg rT9cx6NLTkTPWYzGxhp3QUaj2YDi2ys= X-Proofpoint-GUID: u4PqXoZIcE0qxONBrqVdx3wlTFthj0MH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-02_02,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607020179 Hi Konrad, On 7/2/2026 6:14 PM, Konrad Dybcio wrote: > On 7/2/26 2:39 PM, Konrad Dybcio wrote: >> On 6/30/26 12:06 PM, Pengyu Luo wrote: >>> On Tue, Jun 30, 2026 at 5:52 PM Mukesh Savaliya >>> wrote: >>>> >>>> >>>> >>>> On 6/29/2026 1:33 PM, Pengyu Luo wrote: >>>>> On Mon, Jun 29, 2026 at 1:36 PM Mukesh Savaliya >>>>> wrote: >>>>>> >>>>>> Hi Pengyu, >>>>>> >>>>>> On 6/15/2026 2:48 AM, Dmitry Baryshkov wrote: >>>>>>> On Sun, Jun 14, 2026 at 04:34:24PM +0800, Pengyu Luo wrote: >>>>>>>> Some devices (such as gaokun3) do not disable FIFO mode, causing the >>>>>>>> driver to fallback to FIFO mode by default. However, these platforms >>>>>>>> also support GSI mode, which is highly preferred for certain >>>>>>>> peripherals like SPI touchscreens to improve performance. >>>>>>>> >>>>>>>> Introduce the "qcom,force-gsi-mode" device property to hint and force >>>>>>>> the controller into GSI mode during initialization. >>>>>> Why to force ? You can directly configure in GSI mode. Note there are >>>>>> some configuration done prior to Linux bootup too. >>>>> >>>>> Sorry, I don't get it. how? I know there may be a qupfw, but it is >>>>> impossible for a normal user like me to generate one with GSI >>>>> preferred. >>>>> >>>> If firmware doesn't program in GSI, you can't have this working in GSI >>>> mode, its going to fail (and work with fallback). if it's programmed in >>>> GSI, anyway this will run in GSI mode. So why to add extra things >>>> without any usage ? >>>> >>> >>> What I can confirm is that fifo is not disabled on my device, and gsi >>> is definitely enabled (under windows, check the register >>> SE_GENI_DMA_MODE_EN), forcing the device to enable GSI mode on linux >>> works well. It may work, but it may fail too. We rather want to decide FIFO/DMA vs GSI based on fifo_disabled variable. >> >> What's the value of se->base + SE_DMA_IF_EN (+0x2004) on this SE? > > I'm sorry, I read the first sentence only.. > > I think the enabling of DMA and the disabling of FIFO are technically > disjoint operations, but shouldn't be. The programming guide mentions that > FIFO_DISABLE=1 is set to prevent malicious software from snooping the data > from the RX FIFO while the SE is operated through the GSI. > > Mukesh, would it make sense to make to rework the checks this way: > No, below actually completely makes things wrong. Overall it's between GSI vs non GSI [i.e. FIFO/DMA] fifo_disabled = 1 = GSI [Neither go for FIFO nor for DMA] fifo_disabled = 0 = non GSI [Then Driver checks data transfer size, if <64 prefer FIFO else go for CPU DMA mode] dma_enabled = 1 [fifo_disabled = 0] = FIFO OR DMA [Driver checks data size, if <64 prefer FIFO else go for CPU DMA mode] let me know if there is still a confusion, we can discuss. > if (dma_enabled) > prefer GSI, try SE DMA otherwise > else if (fifo_disabled) > return error, misconfigured SE > else > fifo mode > > ? > > Konrad