mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>, Mark Brown <broonie@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <dmaengine@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>,
	<quic_msavaliy@quicinc.com>, <quic_vtanuku@quicinc.com>
Subject: Re: [PATCH v2 2/2] spi: spi-geni-qcom: Add immediate DMA support
Date: Mon, 2 Dec 2024 12:07:26 +0530	[thread overview]
Message-ID: <f1cf0dd1-06f5-4633-b2c3-fd3666911f07@quicinc.com> (raw)
In-Reply-To: <dou77hbrpdqsdlzx3ymco6fgbbmimimt6rrzzezghzmc3a2hle@fgdnpbmg6xsb>



On 11/28/2024 7:36 PM, Dmitry Baryshkov wrote:
> On Thu, Nov 28, 2024 at 07:03:51PM +0530, Jyothi Kumar Seerapu wrote:
>> The DMA TRE(Transfer ring element) buffer contains the DMA
>> buffer address. Accessing data from this address can cause
>> significant delays in SPI transfers, which can be mitigated to
>> some extent by utilizing immediate DMA support.
>>
>> QCOM GPI DMA hardware supports an immediate DMA feature for data
>> up to 8 bytes, storing the data directly in the DMA TRE buffer
>> instead of the DMA buffer address. This enhancement enables faster
>> SPI data transfers.
>>
>> This optimization reduces the average transfer time from 25 us to
>> 16 us for a single SPI transfer of 8 bytes length, with a clock
>> frequency of 50 MHz.
>>
>> Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
>> ---
>>
>> v1 -> v2:
>>     - Moved the spi changes as patch2.
>>
>>   drivers/spi/spi-geni-qcom.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
>> index 768d7482102a..53c8f6b7f3c5 100644
>> --- a/drivers/spi/spi-geni-qcom.c
>> +++ b/drivers/spi/spi-geni-qcom.c
>> @@ -472,11 +472,18 @@ static int setup_gsi_xfer(struct spi_transfer *xfer, struct spi_geni_master *mas
>>   		mas->cur_speed_hz = xfer->speed_hz;
>>   	}
>>   
>> +	/*
>> +	 * Set QCOM_GPI_IMMEDIATE_DMA flag if transfer length up to 8 bytes.
>> +	 */
>>   	if (xfer->tx_buf && xfer->rx_buf) {
>>   		peripheral.cmd = SPI_DUPLEX;
>> +		if (xfer->len <= QCOM_GPI_IMMEDIATE_DMA_LEN)
>> +			peripheral.flags |= QCOM_GPI_IMMEDIATE_DMA;
>>   	} else if (xfer->tx_buf) {
>>   		peripheral.cmd = SPI_TX;
>>   		peripheral.rx_len = 0;
>> +		if (xfer->len <= QCOM_GPI_IMMEDIATE_DMA_LEN)
>> +			peripheral.flags |= QCOM_GPI_IMMEDIATE_DMA;
> 
> NAK. Please finish discussions in the previous iteration before posting
> new revision. Sending your responses together with sending next
> iteration is a bad practice and is frowned upon (unless one agrees to
> all the comments).
> 
> There was an open question here and your answer doesn't sound convincing
> enough. Please continue discussion in v1.

Sure Dmitry, thanks for the guidance.
I will make sure that post the new revisions after all the comments are 
sorted out.
> 
>>   	} else if (xfer->rx_buf) {
>>   		peripheral.cmd = SPI_RX;
>>   		if (!(mas->cur_bits_per_word % MIN_WORD_LEN)) {
>> -- 
>> 2.17.1
>>
> 

      reply	other threads:[~2024-12-02  6:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28 13:33 [PATCH v2 0/2] Add GPI immediate DMA support for SPI Jyothi Kumar Seerapu
2024-11-28 13:33 ` [PATCH v2 1/2] dmaengine: qcom: gpi: Add GPI immediate DMA support Jyothi Kumar Seerapu
2024-11-28 14:07   ` Dmitry Baryshkov
2024-11-29 11:14     ` Jyothi Kumar Seerapu
2024-11-28 15:23   ` Bjorn Andersson
2024-11-29 11:32     ` Jyothi Kumar Seerapu
2024-11-30  4:05       ` Bjorn Andersson
2024-12-02  5:31         ` Jyothi Kumar Seerapu
2024-12-03 13:31           ` Jyothi Kumar Seerapu
2024-12-03 14:14       ` Jyothi Kumar Seerapu
2024-12-03 14:15     ` Jyothi Kumar Seerapu
2024-11-28 13:33 ` [PATCH v2 2/2] spi: spi-geni-qcom: Add " Jyothi Kumar Seerapu
2024-11-28 14:06   ` Dmitry Baryshkov
2024-12-02  6:37     ` Jyothi Kumar Seerapu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1cf0dd1-06f5-4633-b2c3-fd3666911f07@quicinc.com \
    --to=quic_jseerapu@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=quic_msavaliy@quicinc.com \
    --cc=quic_vtanuku@quicinc.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®