Skip to content

Commit

Permalink
drm/i915: Make the hexdump row offset visually distinct
Browse files Browse the repository at this point in the history
Currently we use %08x for the row offset, and %08x for the binary
contents of the buffer. This makes it very easily to confuse the two, so
switch to using [%04x] for the start-of-row offset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180614094103.18025-3-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jun 14, 2018
1 parent 83c3178 commit 286e615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_engine_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ static void hexdump(struct drm_printer *m, const void *buf, size_t len)
rowsize, sizeof(u32),
line, sizeof(line),
false) >= sizeof(line));
drm_printf(m, "%08zx %s\n", pos, line);
drm_printf(m, "[%04zx] %s\n", pos, line);

prev = buf + pos;
skip = false;
Expand Down

0 comments on commit 286e615

Please sign in to comment.