[Intel-gfx] [PATCH] Rework DRM proc file handling
Dan Nicholson
dbn.lists at gmail.com
Tue Dec 9 20:19:57 CET 2008
On Tue, Dec 9, 2008 at 11:00 AM, Ben Gamari <bgamari at gmail.com> wrote:
> Hey everyone,
>
> This is the latest version of my procfs file handling patch. I have
> ported the old proc files to use the seq_file interface greatly
> simplifying the code. I have also put in place infrastructure for
> exporting data through debugfs, creating a dri/ directory in the debugfs
> root similar to procfs. I moved /proc/dri/*/vma along with all of the
> i915_gem_* files into this directory. Like the proc code, the debugfs
> code uses seq_file. This code has all been tested and appears to work.
>
> Lastly, I ported the old ring buffer dump code to the drm. This creates
> a file in debugfs (i915_gem_ringbuf) from which the ring buffer can be
> dumped. Currently, the code is only capable of dumping the ring buffer
> itself. It'll probably be a few weeks before I have time to think about
> getting batchbuffer dumping working. This is the outline I currently
> have,
> - Search through the active batchbuffer list looking for a batchbuffer
> located at the offset indicated in the MI_BATCH_BUFFER_START instruction
> - Pin this batchbuffer into memory somewhere
> - Dump its contents
> - Unpin
>
> I know practically nothing about gem at the moment, so it'll take me a
> while to get up to speed. If someone else wants to try adding
> batchbuffer dumping, they are more than welcome.
>
> At this point, I think the patch is nearing a merge-worthy point. Let me
> know what else is needed to get it merged.
>
> Anyways, I hope that this is helpful.
I just had a quick scan of the patch, but a couple things jumped out.
- The debugfs code should be conditional on CONFIG_DEBUG_FS.
- // C++ comments
- Some of the lowlevel *__*_info functions now only return 0. Could
these be converted to void instead?
--
Dan
More information about the Intel-gfx
mailing list