All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/6] dmaengine: zynqmp_dma: Per-channel reset, IRQ guard improvements, and PM fixes
@ 2026-08-10 10:04 Golla Nagendra
  2026-08-10 10:04 ` [PATCH V3 1/6] dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path Golla Nagendra
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Golla Nagendra @ 2026-08-10 10:04 UTC (permalink / raw)
  To: vkoul, Frank.Li, michal.simek, robh, krzk+dt, conor+dt, rafael
  Cc: git, dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	linux-pm, nagendra.golla

This series extends the ZynqMP DMA driver with per-channel reset support
for Versal Gen2 and Versal Net, improves the runtime PM guard in the IRQ
handler, and fixes a PM usage count leak in the probe error path.

Patch 1 fixes a PM usage count leak in the probe error path where
pm_runtime_resume_and_get() succeeds but a later step (e.g., channel
probe) fails, leaving the usage count incremented and clocks enabled.

Patch 2 adds a PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard macro to pm_runtime.h
so drivers can conditionally acquire a runtime PM reference only when the
device is already active, with automatic release on scope exit.

Patch 3 uses PM_RUNTIME_ACQUIRE_IF_ACTIVE() in zynqmp_dma_irq_handler()
to safely guard against spurious interrupts arriving while the device is
runtime-suspended. When runtime PM is disabled (probe fallback path) the
handler falls through to normal processing unchanged.

Patch 4 updates the dt-binding to add the amd,versal-net-dma-1.0
compatible string and restricts the resets property per-compatible using
allOf:if:then:, making it required for Versal Gen2 and Versal Net and
explicitly absent for all other platforms.

Patch 5 adds the amd,versal-net-dma-1.0 entry to the driver match table
with a dedicated versal_net_dma_config carrying has_reset=true.

Patch 6 adds reset control handling in the channel probe path, using the
has_reset field in zynqmp_dma_config to conditionally call device_reset()
on Versal Gen2 and Versal Net channels.

Changes in V3:
- Patch 1: New patch - split PM usage count fix into a separate patch as
- Patch 2: New patch - add PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard and its
  backing infrastructure to pm_runtime.h 
- Patch 3: Use PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard instead of the manual
  pm_runtime_get_if_active()/pm_runtime_put() pair from V2
- Patch 4: Use allOf:if:then: to restrict the resets property per-
  compatible with resets: false for non-matching platforms 
  also expand to include amd,versal-net-dma-1.0
- Patch 5: New patch - add amd,versal-net-dma-1.0 compatible to driver
- Patch 6: Introduce has_reset flag in zynqmp_dma_config to gate the
  reset path; PM usage count fix split into patch 1/6

Golla Nagendra (5):
  dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path
  PM: runtime: Add pm_runtime_if_active guard and conditional variant
  dmaengine: zynqmp_dma: Guard IRQ handler against spurious interrupts
  dmaengine: zynqmp_dma: Add new compatible string for Versal Net
  dmaengine: zynqmp_dma: Add per-channel reset support

Jay Buddhabhatti (1):
  dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support

 .../dma/xilinx/xlnx,zynqmp-dma-1.0.yaml       | 25 ++++++++++++++++---
 drivers/dma/xilinx/zynqmp_dma.c               | 25 ++++++++++++++++++-
 include/linux/pm_runtime.h                    | 12 +++++++++
 3 files changed, 58 insertions(+), 4 deletions(-)

-- 
2.43.7


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

end of thread, other threads:[~2026-08-10 10:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 10:04 [PATCH V3 0/6] dmaengine: zynqmp_dma: Per-channel reset, IRQ guard improvements, and PM fixes Golla Nagendra
2026-08-10 10:04 ` [PATCH V3 1/6] dmaengine: zynqmp_dma: Fix PM usage count handling in probe error path Golla Nagendra
2026-08-10 10:28   ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 2/6] PM: runtime: Add pm_runtime_if_active guard and conditional variant Golla Nagendra
2026-08-10 10:25   ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 3/6] dmaengine: zynqmp_dma: Guard IRQ handler against spurious interrupts Golla Nagendra
2026-08-10 10:04 ` [PATCH V3 4/6] dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support Golla Nagendra
2026-08-10 10:20   ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 5/6] dmaengine: zynqmp_dma: Add new compatible string for Versal Net Golla Nagendra
2026-08-10 10:20   ` sashiko-bot
2026-08-10 10:04 ` [PATCH V3 6/6] dmaengine: zynqmp_dma: Add per-channel reset support Golla Nagendra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.