Merge tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2020 20:52:23 +0000 (12:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2020 20:52:23 +0000 (12:52 -0800)
Pull dmaengine updates from Vinod Koul:
 "The last dmaengine updates for this year :)

  This contains couple of new drivers, new device support and updates to
  bunch of drivers.

  New drivers/devices:
   - Qualcomm ADM driver
   - Qualcomm GPI driver
   - Allwinner A100 DMA support
   - Microchip Sama7g5 support
   - Mediatek MT8516 apdma

  Updates:
   - more updates to idxd driver and support for IAX config
   - runtime PM support for dw driver
   - TI drivers"

* tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (75 commits)
  soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init
  dmaengine: ti: k3-udma-glue: Add support for K3 PKTDMA
  dmaengine: ti: k3-udma: Initial support for K3 PKTDMA
  dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling
  dmaengine: ti: k3-udma: Initial support for K3 BCDMA
  soc: ti: k3-ringacc: add AM64 DMA rings support.
  dmaengine: ti: Add support for k3 event routers
  dmaengine: ti: k3-psil: Add initial map for AM64
  dmaengine: ti: k3-psil: Extend psil_endpoint_config for K3 PKTDMA
  dt-bindings: dma: ti: Add document for K3 PKTDMA
  dt-bindings: dma: ti: Add document for K3 BCDMA
  dmaengine: dmatest: Use dmaengine_get_dma_device
  dmaengine: doc: client: Update for dmaengine_get_dma_device() usage
  dmaengine: Add support for per channel coherency handling
  dmaengine: of-dma: Add support for optional router configuration callback
  dmaengine: ti: k3-udma-glue: Configure the dma_dev for rings
  dmaengine: ti: k3-udma-glue: Get the ringacc from udma_dev
  dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API
  dmaengine: ti: k3-udma: Add support for second resource range from sysfw
  dmaengine: ti: k3-udma: Wait for peer teardown completion if supported
  ...

1  2 
drivers/dma/Kconfig
drivers/dma/idxd/device.c
drivers/dma/idxd/registers.h
drivers/dma/idxd/submit.c
drivers/dma/pl330.c
drivers/dma/ti/k3-udma-private.c

Simple merge
@@@ -271,12 -290,11 +290,11 @@@ int idxd_wq_map_portal(struct idxd_wq *
        resource_size_t start;
  
        start = pci_resource_start(pdev, IDXD_WQ_BAR);
 -      start = start + wq->id * IDXD_PORTAL_SIZE;
 +      start += idxd_get_wq_portal_full_offset(wq->id, IDXD_PORTAL_LIMITED);
  
-       wq->dportal = devm_ioremap(dev, start, IDXD_PORTAL_SIZE);
-       if (!wq->dportal)
+       wq->portal = devm_ioremap(dev, start, IDXD_PORTAL_SIZE);
+       if (!wq->portal)
                return -ENOMEM;
-       dev_dbg(dev, "wq %d portal mapped at %p\n", wq->id, wq->dportal);
  
        return 0;
  }
Simple merge
@@@ -74,14 -86,27 +86,27 @@@ int idxd_submit_desc(struct idxd_wq *wq
        if (idxd->state != IDXD_DEV_ENABLED)
                return -EIO;
  
-       portal = wq->dportal;
 -      portal = wq->portal + idxd_get_wq_portal_offset(IDXD_PORTAL_LIMITED);
++      portal = wq->portal;
        /*
-        * The wmb() flushes writes to coherent DMA data before possibly
-        * triggering a DMA read. The wmb() is necessary even on UP because
-        * the recipient is a device.
+        * The wmb() flushes writes to coherent DMA data before
+        * possibly triggering a DMA read. The wmb() is necessary
+        * even on UP because the recipient is a device.
         */
        wmb();
-       iosubmit_cmds512(portal, desc->hw, 1);
+       if (wq_dedicated(wq)) {
+               iosubmit_cmds512(portal, desc->hw, 1);
+       } else {
+               /*
+                * It's not likely that we would receive queue full rejection
+                * since the descriptor allocation gates at wq size. If we
+                * receive a -EAGAIN, that means something went wrong such as the
+                * device is not accepting descriptor at all.
+                */
+               rc = enqcmds(portal, desc->hw);
+               if (rc < 0)
+                       return rc;
+       }
  
        /*
         * Pending the descriptor to the lockless list for the irq_entry
Simple merge
Simple merge