[Intel-gfx] [PATCH] Rework DRM proc file handling

Ben Gamari bgamari at gmail.com
Tue Dec 9 20:00:42 CET 2008

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
- 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugfs.patch
Type: text/x-patch
Size: 66504 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081209/ffd5ed49/attachment.bin>

More information about the Intel-gfx mailing list