diff options
author | Ben Gamari <bgamari@gmail.com> | 2009-04-02 14:24:54 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-08 13:18:06 -0400 |
commit | 6911a9b8ae8b2a1dab4dfda9c2bd20f7ca2961d6 (patch) | |
tree | 8679f210a6f214cdfd2bcfd0fc7c71464ec30919 /drivers/gpu/drm/i915/i915_gem.c | |
parent | 8fe74cf053de7ad2124a894996f84fa890a81093 (diff) |
drm/i915: Implement batch and ring buffer dumping
We create a debugfs node (i915_ringbuffer_data) to expose a hex dump
of the ring buffer itself. We also expose another debugfs node
(i915_ringbuffer_info) with information on the state (i.e. head, tail
addresses) of the ringbuffer.
For batchbuffer dumping, we look at the device's active_list, dumping
each object which has I915_GEM_DOMAIN_COMMAND in its read
domains. This is all exposed through the dri/i915_batchbuffers debugfs
file with a header for each object (giving the objects gtt_offset so
that it can be matched against the offset given in the
BATCH_BUFFER_START command.
Signed-off-by: Ben Gamari <bgamari@gmail.com>
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 1449b452cc63..33ab07b0d712 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -43,8 +43,6 @@ static int i915_gem_object_set_cpu_read_domain_range(struct drm_gem_object *obj, | |||
43 | uint64_t offset, | 43 | uint64_t offset, |
44 | uint64_t size); | 44 | uint64_t size); |
45 | static void i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj); | 45 | static void i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj); |
46 | static int i915_gem_object_get_pages(struct drm_gem_object *obj); | ||
47 | static void i915_gem_object_put_pages(struct drm_gem_object *obj); | ||
48 | static int i915_gem_object_wait_rendering(struct drm_gem_object *obj); | 46 | static int i915_gem_object_wait_rendering(struct drm_gem_object *obj); |
49 | static int i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, | 47 | static int i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, |
50 | unsigned alignment); | 48 | unsigned alignment); |
@@ -1285,7 +1283,7 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data, | |||
1285 | return 0; | 1283 | return 0; |
1286 | } | 1284 | } |
1287 | 1285 | ||
1288 | static void | 1286 | void |
1289 | i915_gem_object_put_pages(struct drm_gem_object *obj) | 1287 | i915_gem_object_put_pages(struct drm_gem_object *obj) |
1290 | { | 1288 | { |
1291 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | 1289 | struct drm_i915_gem_object *obj_priv = obj->driver_private; |
@@ -1884,7 +1882,7 @@ i915_gem_evict_everything(struct drm_device *dev) | |||
1884 | return ret; | 1882 | return ret; |
1885 | } | 1883 | } |
1886 | 1884 | ||
1887 | static int | 1885 | int |
1888 | i915_gem_object_get_pages(struct drm_gem_object *obj) | 1886 | i915_gem_object_get_pages(struct drm_gem_object *obj) |
1889 | { | 1887 | { |
1890 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | 1888 | struct drm_i915_gem_object *obj_priv = obj->driver_private; |
@@ -3243,7 +3241,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
3243 | exec_offset = exec_list[args->buffer_count - 1].offset; | 3241 | exec_offset = exec_list[args->buffer_count - 1].offset; |
3244 | 3242 | ||
3245 | #if WATCH_EXEC | 3243 | #if WATCH_EXEC |
3246 | i915_gem_dump_object(object_list[args->buffer_count - 1], | 3244 | i915_gem_dump_object(batch_obj, |
3247 | args->batch_len, | 3245 | args->batch_len, |
3248 | __func__, | 3246 | __func__, |
3249 | ~0); | 3247 | ~0); |