aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_debug.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-02-03 06:57:46 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-07 09:59:18 -0500
commitdb53a302611c06bde01851f61fa0675a84ca018c (patch)
treec1504cf7929af3372a3d96c3a87ee754ceb1eff9 /drivers/gpu/drm/i915/i915_gem_debug.c
parentd9bc7e9f32716901c617e1f0fb6ce0f74f172686 (diff)
drm/i915: Refine tracepoints
A lot of minor tweaks to fix the tracepoints, improve the outputting for ftrace, and to generally make the tracepoints useful again. It is a start and enough to begin identifying performance issues and gaps in our coverage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_debug.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_debug.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_debug.c b/drivers/gpu/drm/i915/i915_gem_debug.c
index 29d014c48ca2..8da1899bd24f 100644
--- a/drivers/gpu/drm/i915/i915_gem_debug.c
+++ b/drivers/gpu/drm/i915/i915_gem_debug.c
@@ -134,51 +134,6 @@ i915_verify_lists(struct drm_device *dev)
134} 134}
135#endif /* WATCH_INACTIVE */ 135#endif /* WATCH_INACTIVE */
136 136
137
138#if WATCH_EXEC | WATCH_PWRITE
139static void
140i915_gem_dump_page(struct page *page, uint32_t start, uint32_t end,
141 uint32_t bias, uint32_t mark)
142{
143 uint32_t *mem = kmap_atomic(page, KM_USER0);
144 int i;
145 for (i = start; i < end; i += 4)
146 DRM_INFO("%08x: %08x%s\n",
147 (int) (bias + i), mem[i / 4],
148 (bias + i == mark) ? " ********" : "");
149 kunmap_atomic(mem, KM_USER0);
150 /* give syslog time to catch up */
151 msleep(1);
152}
153
154void
155i915_gem_dump_object(struct drm_i915_gem_object *obj, int len,
156 const char *where, uint32_t mark)
157{
158 int page;
159
160 DRM_INFO("%s: object at offset %08x\n", where, obj->gtt_offset);
161 for (page = 0; page < (len + PAGE_SIZE-1) / PAGE_SIZE; page++) {
162 int page_len, chunk, chunk_len;
163
164 page_len = len - page * PAGE_SIZE;
165 if (page_len > PAGE_SIZE)
166 page_len = PAGE_SIZE;
167
168 for (chunk = 0; chunk < page_len; chunk += 128) {
169 chunk_len = page_len - chunk;
170 if (chunk_len > 128)
171 chunk_len = 128;
172 i915_gem_dump_page(obj->pages[page],
173 chunk, chunk + chunk_len,
174 obj->gtt_offset +
175 page * PAGE_SIZE,
176 mark);
177 }
178 }
179}
180#endif
181
182#if WATCH_COHERENCY 137#if WATCH_COHERENCY
183void 138void
184i915_gem_object_check_coherency(struct drm_i915_gem_object *obj, int handle) 139i915_gem_object_check_coherency(struct drm_i915_gem_object *obj, int handle)