Message ID | 1669810824-32094-1-git-send-email-quic_vnivarth@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp893498wrr; Wed, 30 Nov 2022 04:27:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4F9xJlSjskSpCew10LJrfJTf16Bjf/BxrRsAJBBLvsVUaCy09jZJnQETZM6zqC6Wk/Lg8J X-Received: by 2002:a63:550e:0:b0:470:5b0d:b5a8 with SMTP id j14-20020a63550e000000b004705b0db5a8mr39945813pgb.152.1669811262722; Wed, 30 Nov 2022 04:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669811262; cv=none; d=google.com; s=arc-20160816; b=N5JZQ/TEgpF5uiVAZCE5/GNS9YAJtVD3UZqVu6OD/m6OMI7TebEy+HsAxyK1LOHbWh iLKBQDC0e2+eefUaySIG/qC8o01pYs+d0gh/2ZcAHWbqfQ3+y2eixIXFEqOPJ2e/qbyA uwAMmffyXoiQIUoJL6eXrHdAVo496VuUXUyv0LJKwQYYLoQdqJzPL6c5nS9Os/Xq6Mdx gihxCA9+u2pBufGLj+yt643O2iCKuCM63SKly93VoUc9VPdRGvt57XWuDl0vaDsxzBS8 98hqJbmqiE9mhsIc0hAerln7qLYuc6S8bCbxQgGNSnulDqMJuSMUsNAanVAjHSCqjo9t YW9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=6CaDG6FQs1F5uP2IQ8HSQQ6culH2xnBd8bcJ5NL6wnI=; b=QPGxY3eOFabL1jruiZ0+2BPbc5YvIRZjHtWFjkeGNfOg4jW3z0zoKG7Y3vCC0E/Kwm Yd8u2oXA+fYeUuRehqCQxBgh5jkCsYHmlnC7oiYjmuoYdhpW5wsGTEzNch9JTCyf0TWC wi81TGjCOyhKS0dSbh/0JITue3DBLSMxbXwROO0BiaHTV2CLXkEv/K6/3Z8p+w16E1HO 4QQPSZQUAXM9AAAkqNM1GU+UGKWbRVAQsmNilY5B0O+H+fBvk5bkO4e7hnod6yuOGTJG wjCgs2OOD+WW6s57SOOITvzt9zghl6EnH0xDqy/vRtgtGC1umz9VL3Eyn7uvc4Bx5RO/ WoRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SfuAYpqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a1709026bc300b001781cf050b6si1163543plt.14.2022.11.30.04.27.29; Wed, 30 Nov 2022 04:27:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SfuAYpqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234181AbiK3MUk (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 30 Nov 2022 07:20:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbiK3MUh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 30 Nov 2022 07:20:37 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 334F46DCC8; Wed, 30 Nov 2022 04:20:36 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AUC7qJo018648; Wed, 30 Nov 2022 12:20:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id; s=qcppdkim1; bh=6CaDG6FQs1F5uP2IQ8HSQQ6culH2xnBd8bcJ5NL6wnI=; b=SfuAYpqUzniYI5MZYvECqfa5kzPy5zykFFoU+/h6vBPxd1Ia/7Fpzs4OQwNxyybOwFUO A3yXy9wsLZYx2WoJ+oQzohAOyOa64scLSUTZ8dvZW4JuqneD+jbAkclTaE7J4eH2NnnK LADKsnCFDhMP2RviMZ04jzFy+/jYLxd1OkD5WhbU5hqs7Tc07i0bH1Gj03cDChsv5W46 OyBZRVZ8T3+DqUHjqFNK70crGRVlWRr5D3tzu3kuOl+9Iwx4fMsTb4pwtPh1c+6WhHom Tr8rPsPqmQ+x3u0SbMbqze+DmoS69+QjVqUZy+nNDiFXLwfs3BwksyeoSY7Zg/nugazX rw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m66w4g0xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Nov 2022 12:20:32 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 2AUCKSG5031895; Wed, 30 Nov 2022 12:20:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3m3bvknc4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Nov 2022 12:20:28 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AUCHAn6028553; Wed, 30 Nov 2022 12:20:28 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-vnivarth-hyd.qualcomm.com [10.213.111.166]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 2AUCKRdY031886; Wed, 30 Nov 2022 12:20:28 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3994820) id 1C0D03F58; Wed, 30 Nov 2022 17:50:27 +0530 (+0530) From: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, vkoul@kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: quic_msavaliy@quicinc.com, dianders@chromium.org, mka@chromium.org, swboyd@chromium.org, quic_vtanuku@quicinc.com, Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Subject: [PATCH] dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation Date: Wed, 30 Nov 2022 17:50:24 +0530 Message-Id: <1669810824-32094-1-git-send-email-quic_vnivarth@quicinc.com> X-Mailer: git-send-email 2.7.4 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: saoNPNDqXdfrcCNlnDl2Qz1j6VK4Ea9y X-Proofpoint-ORIG-GUID: saoNPNDqXdfrcCNlnDl2Qz1j6VK4Ea9y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-30_04,2022-11-30_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 malwarescore=0 mlxlogscore=848 mlxscore=0 spamscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211300087 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750924014407101082?= X-GMAIL-MSGID: =?utf-8?q?1750924014407101082?= |
Series |
dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation
|
|
Commit Message
Vijaya Krishna Nivarthi
Nov. 30, 2022, 12:20 p.m. UTC
As per GSI spec, link_rx bit is to be set on GO TRE on tx
channel whenever there is going to be a DMA TRE on rx
channel. This is currently set for duplex operation only.
Set the bit for rx operation as well.
Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
---
drivers/dma/qcom/gpi.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi, On Wed, Nov 30, 2022 at 4:20 AM Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> wrote: > > As per GSI spec, link_rx bit is to be set on GO TRE on tx > channel whenever there is going to be a DMA TRE on rx > channel. This is currently set for duplex operation only. > > Set the bit for rx operation as well. > > Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> > --- > drivers/dma/qcom/gpi.c | 1 + > 1 file changed, 1 insertion(+) I don't feel qualified to actually give this a review since I don't know anything about the details of GSI/GPI. It seems simple enough so I'll just assume that Bjorn will land it. Ideally someone else at Qualcomm would give you a Reviewed-by tag. One drive-by comment, though, is that I would say that your patch description lacks an answer to the question: "So what?" In other words, what is broken today? Does everything work fine today but some bit counter looked over your shoulder and told you that you were a bad person for not setting that bit? Did the lunar lander catch fire (despite the lack of Oxygen on the moon!) because it started using the RX transfer mode to talk to its fuel valve system and the RX transfer mode never worked? ...or maybe everything today works but the super secret Qualcomm SDM9002 (shhhh!) chip needs this bit set? Help people looking at your patch be able to decide if it's important for them to pick to their kernel tree! :-) -Doug
On 12/2/2022 4:17 AM, Doug Anderson wrote: > Hi, > > On Wed, Nov 30, 2022 at 4:20 AM Vijaya Krishna Nivarthi > <quic_vnivarth@quicinc.com> wrote: >> As per GSI spec, link_rx bit is to be set on GO TRE on tx >> channel whenever there is going to be a DMA TRE on rx >> channel. This is currently set for duplex operation only. >> >> Set the bit for rx operation as well. >> >> Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> >> --- >> drivers/dma/qcom/gpi.c | 1 + >> 1 file changed, 1 insertion(+) > I don't feel qualified to actually give this a review since I don't > know anything about the details of GSI/GPI. It seems simple enough so > I'll just assume that Bjorn will land it. Ideally someone else at > Qualcomm would give you a Reviewed-by tag. > > One drive-by comment, though, is that I would say that your patch > description lacks an answer to the question: "So what?" > > In other words, what is broken today? Does everything work fine today > but some bit counter looked over your shoulder and told you that you > were a bad person for not setting that bit? Did the lunar lander catch > fire (despite the lack of Oxygen on the moon!) because it started > using the RX transfer mode to talk to its fuel valve system and the RX > transfer mode never worked? ...or maybe everything today works but the > super secret Qualcomm SDM9002 (shhhh!) chip needs this bit set? Help > people looking at your patch be able to decide if it's important for > them to pick to their kernel tree! :-) :-) Thank you very much for the input. Will keep that in mind for next. Some info... rx is actually broken for spi gsi. A plain rx operation would crash right now and patch for same would come next; There are 3 further patches as well for gsi. I started with simplest patch hoping it would get in quick. While trying to bring up EC use case with spi gsi, we made some changes to conform to GSI spec, made some progress but still couldn't get it to work. In the meantime we switched to SE DMA as interim. > -Doug
Gentle reminder to review/approve please. Thank you... On 11/30/2022 5:50 PM, Vijaya Krishna Nivarthi wrote: > As per GSI spec, link_rx bit is to be set on GO TRE on tx > channel whenever there is going to be a DMA TRE on rx > channel. This is currently set for duplex operation only. > > Set the bit for rx operation as well. > > Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> > --- > drivers/dma/qcom/gpi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c > index 061add8..59a36cb 100644 > --- a/drivers/dma/qcom/gpi.c > +++ b/drivers/dma/qcom/gpi.c > @@ -1756,6 +1756,7 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc, > tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE); > if (spi->cmd == SPI_RX) { > tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB); > + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK); > } else if (spi->cmd == SPI_TX) { > tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN); > } else { /* SPI_DUPLEX */
Hi, On Fri, Dec 16, 2022 at 4:15 AM Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> wrote: > > Gentle reminder to review/approve please. > > Thank you... I was expecting you to send a v2 where you beefed up the patch description to add the "why". Maybe others are as well? I suppose with that I could add a weak Reviewed-by to the patch. This is also a bad time for patches to be applied--it's right in the middle of the merge window. Usually the best time to send reminders is between -rc1 and -rc5. Officially "Fixes" could be applied at any time (even during the merge window), but unless it's urgent that usually doesn't happen. Speaking of which, given your updated description, I'd say that this _is_ a fix. Perhaps you should add a "Fixes" tag? That might actually help it get applied sooner. ;-) -Doug
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 061add8..59a36cb 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -1756,6 +1756,7 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc, tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE); if (spi->cmd == SPI_RX) { tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB); + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK); } else if (spi->cmd == SPI_TX) { tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN); } else { /* SPI_DUPLEX */