[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69542ad0-c62f-438a-8e3e-0c827b65f0d9@gmail.com>
Date: Mon, 2 Sep 2024 23:24:30 +0300
From: Péter Ujfalusi <peter.ujfalusi@...il.com>
To: Jai Luthra <j-luthra@...com>, Vinod Koul <vkoul@...nel.org>,
Vignesh Raghavendra <vigneshr@...com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: ti: k3-udma: Prioritize CSI RX traffic as RT
Hi,
On 27/08/2024 15:43, Jai Luthra wrote:
> 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;
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
Powered by blists - more mailing lists