]> git.karo-electronics.de Git - karo-tx-linux.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)
commit334636c67e86afff9334b64e942bad80bbdf869f
tree5ed167e9e966913eb0a4657b139099a7a3bc759b
parent7f9e77545b92bcb894b8e2be5646535e8ba8da9e
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