[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827-csi_rt-v1-1-f0c5b9488a1e@ti.com>
Date: Tue, 27 Aug 2024 18:13:37 +0530
From: Jai Luthra <j-luthra@...com>
To: Peter Ujfalusi <peter.ujfalusi@...il.com>, Vinod Koul <vkoul@...nel.org>,
Vignesh Raghavendra <vigneshr@...com>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Jai Luthra
<j-luthra@...com>
Subject: [PATCH] dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT
From: Vignesh Raghavendra <vigneshr@...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@...com>
Signed-off-by: Jai Luthra <j-luthra@...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;
};
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,
--
Jai Luthra <j-luthra@...com>
Powered by blists - more mailing lists