]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Trim i915_guc_info() stack usage
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Nov 2016 12:10:20 +0000 (12:10 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Nov 2016 15:52:29 +0000 (15:52 +0000)
commit2d9d8ae306c835ea00db2aeef20d0bd6801e0877
tree5ed167e9e966913eb0a4657b139099a7a3bc759b
parentea81bba8ec9b0dfb4f1429741fa8f40ef291542b
drm/i915: Trim i915_guc_info() stack usage

i915_guc_info() (part of debugfs output) tries to avoid holding
struct_mutex for a long period by copying onto the stack. This causes a
warning that the stack frame is massive, so stop doing that. We can even
forgo holding the struct_mutex here as that doesn't serialise the values
being read (and the lists used exist for the device lifetime).

v2: Skip printing anything if guc->execbuf_client is disabled (avoids
potential NULL dereference).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161129121024.22650-2-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c