dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<dan.j.williams@intel.com>, <geert@linux-m68k.org>
Subject: Re: [PATCH v3] dmaengine: Add basic debugfs support
Date: Fri, 28 Feb 2020 12:01:34 +0200	[thread overview]
Message-ID: <970899d9-1491-78e8-1e7a-14e40915d061@ti.com> (raw)
In-Reply-To: <20200228044704.GC2618@vkoul-mobl>

Hi Vinod,

On 28/02/2020 6.47, Vinod Koul wrote:
> Hi Peter,
> 
> On 26-02-20, 14:10, Peter Ujfalusi wrote:
> 
>>>  do we really want a custom dbg_show()..? Drivers can add their own
>>> files...
>>
>> They could do that already ;)
>>
>> With the custom dbg_show() DMA drivers can save on the surrounding
>> code and just fill in the information regarding to their HW.
>> Again, on am654 the default information is:
>> # 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
>>
>> With my current .dbg_show implementation for k3-udma:
>> # 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 (MEM_TO_DEV, tchan8 [0x1008 -> 0xc400], PDMA, TR mode)
>>  dma1chan1    | 2b00000.mcasp:rx (DEV_TO_MEM, rchan8 [0x4400 -> 0x9008], PDMA, TR mode)
>>  dma1chan2    | in-use (MEM_TO_MEM, chan2 pair [0x1002 -> 0x9002], PSI-L Native, TR mode)
>>  dma1chan3    | in-use (MEM_TO_MEM, chan3 pair [0x1003 -> 0x9003], PSI-L Native, TR mode)
>>  dma1chan4    | in-use (MEM_TO_MEM, chan4 pair [0x1004 -> 0x9004], PSI-L Native, TR mode)
>>  dma1chan5    | in-use (MEM_TO_MEM, chan5 pair [0x1005 -> 0x9005], PSI-L Native, TR mode)
>>
>> For me this makes a huge difference.
> 
> Ok
> 
>>>> +DEFINE_SHOW_ATTRIBUTE(dmaengine_debugfs);
>>>> +
>>>> +static int __init dmaengine_debugfs_init(void)
>>>> +{
>>>> +	/* /sys/kernel/debug/dmaengine */
>>>> +	debugfs_create_file("dmaengine", 0444, NULL, NULL,
>>>> +			    &dmaengine_debugfs_fops);
>>>
>>> Should we add a directory? That way we can keep adding stuff into that
>>> one
>>
>> and have this file as 'summary' underneath?
> 
> Correct

/sys/kernel/debug/dmaengine/summary, right?

>> I like the fact hat I can get all the information via one file.
>> Saves a lot of time (and explaining to users) on finding the correct
>> one to cat...
> 
> But am sure we can come with more data to show, so having a directory
> helps :)

OK, so we need to store the dbgfs rootdir and add an API so DMA drivers
can get the dentry of it, so they can implement their custom
files/directories underneath.

- Péter

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

  reply	other threads:[~2020-02-28 10:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 11:15 [PATCH v3] dmaengine: Add basic debugfs support Peter Ujfalusi
2020-02-24 16:37 ` Vinod Koul
2020-02-26 12:10   ` Peter Ujfalusi
2020-02-28  4:47     ` Vinod Koul
2020-02-28 10:01       ` Peter Ujfalusi [this message]
2020-02-28 10:26         ` Vinod Koul

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=970899d9-1491-78e8-1e7a-14e40915d061@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;
as well as URLs for NNTP newsgroup(s).