]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: avoid big kmallocs on reading error state
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 23 May 2013 10:55:35 +0000 (13:55 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 23 May 2013 10:59:25 +0000 (12:59 +0200)
commitedc3d8848dc9fe2a470316363dab8ef211d77e01
treed90688ab89d3d9f4b5632ca105d1cff3fba532b5
parent039735369c8fb105d0a090c949b7f894425121d8
drm/i915: avoid big kmallocs on reading error state

Sometimes when user is trying to get error state out from
debugfs after gpu hang, the memory is low and/or fragmented
enough that kmalloc in seq_file will fail.

Prevent big kmalloc by avoiding seq_file and instead convert
error state to string in smaller chunks.

v2: better alloc flags, better truncate, correct
locking, and error handling improvements (Chris Wilson)

v3: printf annotations (Daniel Vetter)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_overlay.c