linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org,
	bbhatt@codeaurora.org
Subject: Re: [PATCH v3 4/9] mhi: pci_generic: Enable burst mode for hardware channels
Date: Sat, 28 Nov 2020 11:15:59 +0530	[thread overview]
Message-ID: <20201128054559.GC3077@thinkpad> (raw)
In-Reply-To: <1606404547-10737-5-git-send-email-loic.poulain@linaro.org>

On Thu, Nov 26, 2020 at 04:29:02PM +0100, Loic Poulain wrote:
> Hardware channels have a feature called burst mode that allows to
> queue transfer ring element(s) (TRE) to a channel without ringing
> the device doorbell. In that mode, the device is polling the channel
> context for new elements. This reduces the frequency of host initiated
> doorbells and increase throughput.
> 
> Create a new dedicated macro for hardware channels with burst enabled.
> 

We might need to move these macros to mhi.h at some point...

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  drivers/bus/mhi/pci_generic.c | 34 ++++++++++++++++++++++++++++++++--
>  1 file changed, 32 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
> index 4363676..6b6e5bf 100644
> --- a/drivers/bus/mhi/pci_generic.c
> +++ b/drivers/bus/mhi/pci_generic.c
> @@ -78,6 +78,36 @@ struct mhi_pci_dev_info {
>  		.offload_channel = false,	\
>  	}
>  
> +#define MHI_CHANNEL_CONFIG_HW_UL(ch_num, ch_name, el_count, ev_ring) \
> +	{						\
> +		.num = ch_num,				\
> +		.name = ch_name,			\
> +		.num_elements = el_count,		\
> +		.event_ring = ev_ring,			\
> +		.dir = DMA_TO_DEVICE,			\
> +		.ee_mask = BIT(MHI_EE_AMSS),		\
> +		.pollcfg = 0,				\
> +		.doorbell = MHI_DB_BRST_ENABLE,	\
> +		.lpm_notify = false,			\
> +		.offload_channel = false,		\
> +		.doorbell_mode_switch = true,		\
> +	}						\
> +
> +#define MHI_CHANNEL_CONFIG_HW_DL(ch_num, ch_name, el_count, ev_ring) \
> +	{						\
> +		.num = ch_num,				\
> +		.name = ch_name,			\
> +		.num_elements = el_count,		\
> +		.event_ring = ev_ring,			\
> +		.dir = DMA_FROM_DEVICE,			\
> +		.ee_mask = BIT(MHI_EE_AMSS),		\
> +		.pollcfg = 0,				\
> +		.doorbell = MHI_DB_BRST_ENABLE,	\
> +		.lpm_notify = false,			\
> +		.offload_channel = false,		\
> +		.doorbell_mode_switch = true,		\
> +	}
> +
>  #define MHI_EVENT_CONFIG_DATA(ev_ring)		\
>  	{					\
>  		.num_elements = 128,		\
> @@ -112,8 +142,8 @@ static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
>  	MHI_CHANNEL_CONFIG_DL(15, "QMI", 4, 0),
>  	MHI_CHANNEL_CONFIG_UL(20, "IPCR", 8, 0),
>  	MHI_CHANNEL_CONFIG_DL(21, "IPCR", 8, 0),
> -	MHI_CHANNEL_CONFIG_UL(100, "IP_HW0", 128, 1),
> -	MHI_CHANNEL_CONFIG_DL(101, "IP_HW0", 128, 2),
> +	MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 128, 1),
> +	MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 128, 2),
>  };
>  
>  static const struct mhi_event_config modem_qcom_v1_mhi_events[] = {
> -- 
> 2.7.4
> 

  reply	other threads:[~2020-11-28 22:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 15:28 [PATCH v3 0/9] mhi: pci_generic: Misc improvements Loic Poulain
2020-11-26 15:28 ` [PATCH v3 1/9] mhi: Add mhi_controller_initialize helper Loic Poulain
2020-11-28  5:42   ` Manivannan Sadhasivam
2020-12-02  1:41     ` Bhaumik Bhatt
2020-11-26 15:29 ` [PATCH v3 2/9] mhi: pci-generic: Increase number of hardware events Loic Poulain
2020-11-28  5:44   ` Manivannan Sadhasivam
2020-11-26 15:29 ` [PATCH v3 3/9] mhi: pci-generic: Perform hard reset on remove Loic Poulain
2020-11-27 17:34   ` Jeffrey Hugo
2020-11-27 17:40     ` Jeffrey Hugo
2020-11-26 15:29 ` [PATCH v3 4/9] mhi: pci_generic: Enable burst mode for hardware channels Loic Poulain
2020-11-28  5:45   ` Manivannan Sadhasivam [this message]
2020-11-26 15:29 ` [PATCH v3 5/9] mhi: pci_generic: Add support for reset Loic Poulain
2020-11-28  5:49   ` Manivannan Sadhasivam
2020-11-30  9:08     ` Loic Poulain
2020-12-02  1:24       ` Bhaumik Bhatt
2020-12-07 14:05         ` Loic Poulain
2020-11-26 15:29 ` [PATCH v3 6/9] mhi: pci_generic: Add suspend/resume/recovery procedure Loic Poulain
2020-11-26 15:29 ` [PATCH v3 7/9] mhi: pci_generic: Add PCI error handlers Loic Poulain
2020-11-26 15:29 ` [PATCH v3 8/9] mhi: pci_generic: Add health-check Loic Poulain
2020-11-28  5:59   ` Manivannan Sadhasivam
2020-12-01  0:59     ` Hemant Kumar
2020-12-01  1:02   ` Hemant Kumar
2020-11-26 15:29 ` [PATCH v3 9/9] mhi: pci_generic: Increase controller timeout value Loic Poulain
2020-11-28  5:51   ` Manivannan Sadhasivam
2020-11-28  6:00 ` [PATCH v3 0/9] mhi: pci_generic: Misc improvements Manivannan Sadhasivam

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=20201128054559.GC3077@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bbhatt@codeaurora.org \
    --cc=hemantk@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=loic.poulain@linaro.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;
as well as URLs for NNTP newsgroup(s).