From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Jai Luthra <j-luthra@ti.com>, Vinod Koul <vkoul@kernel.org>,
Vignesh Raghavendra <vigneshr@ti.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT
Date: Mon, 2 Sep 2024 23:24:30 +0300 [thread overview]
Message-ID: <69542ad0-c62f-438a-8e3e-0c827b65f0d9@gmail.com> (raw)
In-Reply-To: <20240827-csi_rt-v1-1-f0c5b9488a1e@ti.com>
Hi,
On 27/08/2024 15:43, Jai Luthra wrote:
> From: Vignesh Raghavendra <vigneshr@ti.com>
>
> Mark BCDMA CSI RX as real-time traffic using OrderID 8/15.
> This ensures CSI traffic takes dedicated RT path towards DDR ensuring
> proper priority when under competing system load.
>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> ---
> drivers/dma/ti/k3-udma.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index 406ee199c2ac..74cdb9ec07c3 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -135,6 +135,7 @@ struct udma_match_data {
> u32 statictr_z_mask;
> u8 burst_size[3];
> struct udma_soc_data *soc_data;
> + u8 order_id;
I would add a new property to the BCDM in DT, like ti,order_id to be
configurable by device and boards if needed.
Static 8 and 15 in code is not too nice and begs for a question why 8
here and why 15 there...
Even if the 'defaults' in code are these magic ones, it is still better
to have means to adjust it without the need to recompile the kernel.
> };
>
> struct udma_soc_data {
> @@ -2110,6 +2111,7 @@ static int udma_tisci_rx_channel_config(struct udma_chan *uc)
> static int bcdma_tisci_rx_channel_config(struct udma_chan *uc)
> {
> struct udma_dev *ud = uc->ud;
> + const struct udma_match_data *match_data = ud->match_data;
> struct udma_tisci_rm *tisci_rm = &ud->tisci_rm;
> const struct ti_sci_rm_udmap_ops *tisci_ops = tisci_rm->tisci_udmap_ops;
> struct udma_rchan *rchan = uc->rchan;
> @@ -2120,6 +2122,11 @@ static int bcdma_tisci_rx_channel_config(struct udma_chan *uc)
> req_rx.nav_id = tisci_rm->tisci_dev_id;
> req_rx.index = rchan->id;
>
> + if (match_data->order_id) {
> + req_rx.valid_params |= TI_SCI_MSG_VALUE_RM_UDMAP_CH_ORDER_ID_VALID;
> + req_rx.rx_orderid = match_data->order_id;
> + }
> +
> ret = tisci_ops->rx_ch_cfg(tisci_rm->tisci, &req_rx);
> if (ret)
> dev_err(ud->dev, "rchan%d cfg failed %d\n", rchan->id, ret);
> @@ -4332,6 +4339,7 @@ static struct udma_match_data am62a_bcdma_csirx_data = {
> 0, /* No UH Channels */
> },
> .soc_data = &am62a_dmss_csi_soc_data,
> + .order_id = 8,
> };
>
> static struct udma_match_data am64_bcdma_data = {
> @@ -4370,6 +4378,7 @@ static struct udma_match_data j721s2_bcdma_csi_data = {
> 0, /* No UH Channels */
> },
> .soc_data = &j721s2_bcdma_csi_soc_data,
> + .order_id = 15,
> };
>
> static const struct of_device_id udma_of_match[] = {
>
> ---
> base-commit: 6f923748057a4f6aa187e0d5b22990d633a48d12
> change-id: 20240827-csi_rt-fc6bff701f81
>
> Best regards,
--
Péter
next prev parent reply other threads:[~2024-09-02 20:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 12:43 Jai Luthra
2024-09-02 20:24 ` Péter Ujfalusi [this message]
2024-09-03 18:06 ` Péter Ujfalusi
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=69542ad0-c62f-438a-8e3e-0c827b65f0d9@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=j-luthra@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vigneshr@ti.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®