summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2023-01-08 21:18:50 +0530
committerPraneeth Bajjuri <praneeth@ti.com>2023-01-11 18:05:04 -0600
commit99b6820efd27ef7ba8c293fe5da775b2cdd65421 (patch)
tree682588e9f28ac0907d6588bd5b8487536249f0be
parent4027f66463572f1ec2629e10cb5698f01abc88e4 (diff)
dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT
Mark BCDMA CSI RX as real-time traffic using OrderID 8.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> Tested-by: Jai Luthra <j-luthra@ti.com>
-rw-r--r--drivers/dma/ti/k3-udma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 275957cc2c60..0d117c1c49fe 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -136,6 +136,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 {
@@ -2112,6 +2113,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;
@@ -2122,6 +2124,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);
@@ -4318,6 +4325,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 = {