dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] dmaengine: Initial debugfs support
@ 2020-02-28 13:07 Peter Ujfalusi
  2020-02-28 13:07 ` [PATCH v4 1/2] dmaengine: Add basic " Peter Ujfalusi
  2020-02-28 13:07 ` [PATCH v4 2/2] dmaengine: ti: k3-udma: Implement custom dbg_summary_show for debugfs Peter Ujfalusi
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2020-02-28 13:07 UTC (permalink / raw)
  To: vkoul; +Cc: dmaengine, linux-kernel, dan.j.williams, geert

Hi,

Changes since v3:
- Create a directory for dmaengine and name the initial file as summary
- Function to get the debugfs root for DMA drivers if they want to place files
- Custom dbg_summary_show implementation for k3-udma

Changes since v2:
- Use dma_chan_name() for printing the channel's name

Changes since v1:
- Use much more simplified fops for the debugfs file (via DEFINE_SHOW_ATTRIBUTE)
- do not allow modification to dma_device_list while the debugfs file is read
- rename the slave_name to dbg_client_name (it is only for debugging)
- print information about dma_router if it is used by the channel
- Formating of the output slightly changed

The basic debugfs file (/sys/kernel/debug/dmaengine/summary) can be used to
query basic information about the DMAengine usage (am654-evm):

# cat /sys/kernel/debug/dmaengine/summary
dma0 (285c0000.dma-controller): number of channels: 96

dma1 (31150000.dma-controller): number of channels: 267
 dma1chan0    | 2b00000.mcasp:tx
 dma1chan1    | 2b00000.mcasp:rx
 dma1chan2    | in-use
 dma1chan3    | in-use
 dma1chan4    | in-use
 dma1chan5    | in-use

Drivers can implement custom dbg_summary_show to add extended information via
the summary file, like with the second patch for k3-udma (j721e-evm):

# cat /sys/kernel/debug/dmaengine/summary
dma0 (285c0000.dma-controller): number of channels: 24

dma1 (31150000.dma-controller): number of channels: 84
 dma1chan0    | 2b00000.mcasp:tx (MEM_TO_DEV, tchan16 [0x1010 -> 0xc400], PDMA[ ACC32 BURST ], TR mode)
 dma1chan1    | 2b00000.mcasp:rx (DEV_TO_MEM, rchan16 [0x4400 -> 0x9010], PDMA[ ACC32 BURST ], TR mode)
 dma1chan2    | 2ba0000.mcasp:tx (MEM_TO_DEV, tchan17 [0x1011 -> 0xc507], PDMA[ ACC32 BURST ], TR mode)
 dma1chan3    | 2ba0000.mcasp:rx (DEV_TO_MEM, rchan17 [0x4507 -> 0x9011], PDMA[ ACC32 BURST ], TR mode)
 dma1chan4    | in-use (MEM_TO_MEM, chan0 pair [0x1000 -> 0x9000], PSI-L Native, TR mode)
 dma1chan5    | in-use (MEM_TO_MEM, chan1 pair [0x1001 -> 0x9001], PSI-L Native, TR mode)
 dma1chan6    | in-use (MEM_TO_MEM, chan4 pair [0x1004 -> 0x9004], PSI-L Native, TR mode)
 dma1chan7    | in-use (MEM_TO_MEM, chan5 pair [0x1005 -> 0x9005], PSI-L Native, TR mode)
 
Regards,
Peter
---
Peter Ujfalusi (2):
  dmaengine: Add basic debugfs support
  dmaengine: ti: k3-udma: Implement custom dbg_summary_show for debugfs

 drivers/dma/dmaengine.c   | 77 +++++++++++++++++++++++++++++++++++++++
 drivers/dma/dmaengine.h   |  6 +++
 drivers/dma/ti/k3-udma.c  | 63 ++++++++++++++++++++++++++++++++
 include/linux/dmaengine.h | 12 +++++-
 4 files changed, 157 insertions(+), 1 deletion(-)

-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


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

end of thread, other threads:[~2020-03-03  4:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 13:07 [PATCH v4 0/2] dmaengine: Initial debugfs support Peter Ujfalusi
2020-02-28 13:07 ` [PATCH v4 1/2] dmaengine: Add basic " Peter Ujfalusi
2020-03-02  7:11   ` Vinod Koul
2020-03-02 10:28     ` Peter Ujfalusi
2020-03-02 11:53       ` Peter Ujfalusi
2020-03-03  4:27         ` Vinod Koul
2020-02-28 13:07 ` [PATCH v4 2/2] dmaengine: ti: k3-udma: Implement custom dbg_summary_show for debugfs Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).