From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dan.j.williams@intel.com>, <geert@linux-m68k.org>
Subject: [PATCH v2 0/2] dmaengine: Cleanups for symlink handling and debugfs support
Date: Fri, 31 Jan 2020 11:38:57 +0200 [thread overview]
Message-ID: <20200131093859.3311-1-peter.ujfalusi@ti.com> (raw)
Hi,
Changes since v1:
- Removed dev_warn() for kasprintf in both patch
- Added Reviewed-by from Geert to the first patch
- 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
As I have mentioned on the symlink patch earlier I like how the gpio's debugfs
shows in one place information.
These patches are on top of Vinod's next (with the v2 fix for the symlink
support).
The first patch fixes and cleans up the symlink handling code a bit and the
second adds support for debugfs file:
On my board with audio and after a run with dmatest on 6 channels this is how
the information is presented about the DMA drivers:
# cat /sys/kernel/debug/dmaengine
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
dma1chan6 | in-use
dma1chan7 | in-use
On dra7-evm after boot:
# cat /sys/kernel/debug/dmaengine
dma0 (43300000.edma): number of channels: 64
dma0chan0 | 48468000.mcasp:tx (via router: 4a002c78.dma-router)
dma0chan1 | 48468000.mcasp:rx (via router: 4a002c78.dma-router)
dma1 (4a056000.dma-controller): number of channels: 127
dma1chan0 | in-use
dma1chan1 | in-use
It shows the users (device name + channel name) of the channels. If it is not a
slave channel, then it only prints 'in-use' as no other information is
available for non save channels.
DMA drivers can implement the dbg_show callback to provide custom information
for their channels if needed.
Regards,
Peter
---
Peter Ujfalusi (2):
dmaengine: Cleanups for the slave <-> channel symlink support
dmaengine: Add basic debugfs support
drivers/dma/dmaengine.c | 84 ++++++++++++++++++++++++++++++++++-----
include/linux/dmaengine.h | 12 +++++-
2 files changed, 86 insertions(+), 10 deletions(-)
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next reply other threads:[~2020-01-31 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 9:38 Peter Ujfalusi [this message]
2020-01-31 9:38 ` [PATCH v2 1/2] dmaengine: Cleanups for the slave <-> channel symlink support Peter Ujfalusi
2020-02-03 4:19 ` Vinod Koul
2020-01-31 9:38 ` [PATCH v2 2/2] dmaengine: Add basic debugfs support Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200131093859.3311-1-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox