]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Skip the ERR_PTR error state
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Dec 2018 11:05:54 +0000 (11:05 +0000)
committerJani Nikula <jani.nikula@intel.com>
Thu, 10 Jan 2019 13:09:41 +0000 (15:09 +0200)
commitb79bedd1e2ebe7f060aa7b4a266fad69b3269811
tree44fee396610d2445a42a090aedc8ddaeb74969a1
parent952333ca01fcf23d3a222cdfd53fbe3d3f633119
drm/i915: Skip the ERR_PTR error state

Although commit 3c752cb7c9e8 ("drm/i915: Prevent machine hang from
Broxton's vtd w/a and error capture") applied cleanly after a 24 month
hiatus, the code had moved on with new methods for peeking and fetching
the captured gpu info. Make sure we catch all uses of the stashed error
state and avoid dereferencing the error pointer.

v2: Move error pointer determination into i915_gpu_capture_state
v3: Restore early check to avoid capturing and then throwing away
subsequent GPU error states.

Fixes: 3c752cb7c9e8 ("drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181207110554.19897-1-chris@chris-wilson.co.uk
(cherry picked from commit e6154e4cb8b0d3692f84ca0d66b4e1ba0389b134)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_sysfs.c