All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <m.b.lankhorst@gmail.com>
To: sumit.semwal@ti.com
Cc: sumit.semwal@linaro.org, linaro-mm-sig@lists.linaro.org,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: Re: [Linaro-mm-sig] [PATCH] dma-buf: Add debugfs support
Date: Fri, 14 Dec 2012 12:57:54 +0100	[thread overview]
Message-ID: <50CB1442.50002@gmail.com> (raw)
In-Reply-To: <1355477817-5750-1-git-send-email-sumit.semwal@ti.com>

Op 14-12-12 10:36, sumit.semwal@ti.com schreef:
> From: Sumit Semwal <sumit.semwal@linaro.org>
>
> Add debugfs support to make it easier to print debug information
> about the dma-buf buffers.
>
I like the idea, I don't know if it could be done in a free manner, but for bonus points
could we also have the dma-buf fd be obtainable that way from a debugfs entry?

Doing so would allow me to 'steal' a dma-buf from an existing mapping easily, and test against that.

Also I think the name of the device and process that exported the dma-buf would be useful
to have as well, even if in case of the device that would mean changing the api slightly to record it.

I was thinking of having a directory structure like this:

/sys/kernel/debug/dma_buf/stats

and then for each dma-buf:

/sys/kernel/debug/dma-buf/exporting_file.c/<number>-fd
/sys/kernel/debug/dma-buf/exporting_file.c/<number>-attachments
/sys/kernel/debug/dma-buf/exporting_file.c/<number>-info

Opening the fd file would give you back the original fd, or fail with -EIO if refcount was dropped to 0.

Would something like this be doable? I don't know debugfs that well, but I don't see why it wouldn't be,

~Maarten

  parent reply	other threads:[~2012-12-14 11:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  9:36 [PATCH] dma-buf: Add debugfs support sumit.semwal
2012-12-14  9:36 ` sumit.semwal
2012-12-14 10:29 ` Daniel Vetter
2012-12-14 10:34 ` Daniel Vetter
2012-12-17  8:56   ` Sumit Semwal
2012-12-14 11:57 ` Maarten Lankhorst [this message]
2012-12-14 14:11   ` [Linaro-mm-sig] " Rob Clark
2012-12-14 14:35     ` Maarten Lankhorst
2012-12-17  8:55   ` Sumit Semwal
2012-12-17  8:57     ` Sumit Semwal
2012-12-16 16:56 ` Francesco Lavra
2012-12-20  1:26 ` Dave Airlie
2012-12-20  3:13   ` Dave Airlie
2012-12-20  3:13     ` Dave Airlie

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=50CB1442.50002@gmail.com \
    --to=m.b.lankhorst@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=sumit.semwal@ti.com \
    /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 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.