mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT
@ 2024-08-27 12:43 Jai Luthra
  2024-09-02 20:24 ` Péter Ujfalusi
  0 siblings, 1 reply; 3+ messages in thread
From: Jai Luthra @ 2024-08-27 12:43 UTC (permalink / raw)
  To: Peter Ujfalusi, Vinod Koul, Vignesh Raghavendra
  Cc: dmaengine, linux-kernel, Jai Luthra

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;
 };
 
 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@ti.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-03 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-27 12:43 [PATCH] dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT Jai Luthra
2024-09-02 20:24 ` Péter Ujfalusi
2024-09-03 18:06   ` Péter Ujfalusi

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®