diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2013-04-12 05:10:05 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-18 03:43:25 -0400 |
commit | 3a3b4f984b230d815d9f956f296a6145f1dfebb7 (patch) | |
tree | 5378777f75105522ac29da01b85917661cf6c303 | |
parent | 87476d632c5041cfb962630e618d787243c81ed8 (diff) |
drm/i915: shorten debugfs output simple attributes
commit 647416f9eefe7699754b01b9fc82758fde83248c
Author: Kees Cook <keescook@chromium.org>
Date: Sun Mar 10 14:10:06 2013 -0700
drm/i915: use simple attribute in debugfs routines
made i915_next_seqno debugfs entry to crop it's output
if returned value was large enough. Using simple_attr
will limit the output to 24 bytes.
Fix is to strip out preamples on all simple attributes
that have one.
v2: Fix all simple attributes (Daniel Vetter)
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7da45aa2dbee..23187fc99ca6 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -901,7 +901,7 @@ i915_next_seqno_set(void *data, u64 val) | |||
901 | 901 | ||
902 | DEFINE_SIMPLE_ATTRIBUTE(i915_next_seqno_fops, | 902 | DEFINE_SIMPLE_ATTRIBUTE(i915_next_seqno_fops, |
903 | i915_next_seqno_get, i915_next_seqno_set, | 903 | i915_next_seqno_get, i915_next_seqno_set, |
904 | "next_seqno : 0x%llx\n"); | 904 | "0x%llx\n"); |
905 | 905 | ||
906 | static int i915_rstdby_delays(struct seq_file *m, void *unused) | 906 | static int i915_rstdby_delays(struct seq_file *m, void *unused) |
907 | { | 907 | { |
@@ -1690,7 +1690,7 @@ i915_wedged_set(void *data, u64 val) | |||
1690 | 1690 | ||
1691 | DEFINE_SIMPLE_ATTRIBUTE(i915_wedged_fops, | 1691 | DEFINE_SIMPLE_ATTRIBUTE(i915_wedged_fops, |
1692 | i915_wedged_get, i915_wedged_set, | 1692 | i915_wedged_get, i915_wedged_set, |
1693 | "wedged : %llu\n"); | 1693 | "%llu\n"); |
1694 | 1694 | ||
1695 | static int | 1695 | static int |
1696 | i915_ring_stop_get(void *data, u64 *val) | 1696 | i915_ring_stop_get(void *data, u64 *val) |
@@ -1844,7 +1844,7 @@ i915_max_freq_set(void *data, u64 val) | |||
1844 | 1844 | ||
1845 | DEFINE_SIMPLE_ATTRIBUTE(i915_max_freq_fops, | 1845 | DEFINE_SIMPLE_ATTRIBUTE(i915_max_freq_fops, |
1846 | i915_max_freq_get, i915_max_freq_set, | 1846 | i915_max_freq_get, i915_max_freq_set, |
1847 | "max freq: %llu\n"); | 1847 | "%llu\n"); |
1848 | 1848 | ||
1849 | static int | 1849 | static int |
1850 | i915_min_freq_get(void *data, u64 *val) | 1850 | i915_min_freq_get(void *data, u64 *val) |
@@ -1895,7 +1895,7 @@ i915_min_freq_set(void *data, u64 val) | |||
1895 | 1895 | ||
1896 | DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops, | 1896 | DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops, |
1897 | i915_min_freq_get, i915_min_freq_set, | 1897 | i915_min_freq_get, i915_min_freq_set, |
1898 | "min freq: %llu\n"); | 1898 | "%llu\n"); |
1899 | 1899 | ||
1900 | static int | 1900 | static int |
1901 | i915_cache_sharing_get(void *data, u64 *val) | 1901 | i915_cache_sharing_get(void *data, u64 *val) |