]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Handle incomplete Z_FINISH for compressed error states
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Oct 2018 08:24:22 +0000 (09:24 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 3 Oct 2018 15:02:42 +0000 (08:02 -0700)
commit79f564d2c0968ba7d187fd8f5fa97932aea056f3
tree0b79560066e47e1b1b08f00164883824d77a0dc5
parent9189ff795d377bf8710f6fba2be6ef32d3ca9fe7
drm/i915: Handle incomplete Z_FINISH for compressed error states

The final call to zlib_deflate(Z_FINISH) may require more output
space to be allocated and so needs to re-invoked. Failure to do so in
the current code leads to incomplete zlib streams (albeit intact due to
the use of Z_SYNC_FLUSH) resulting in the occasional short object
capture.

v2: Check against overrunning our pre-allocated page array
v3: Drop Z_SYNC_FLUSH entirely

Testcase: igt/i915-error-capture.js
Fixes: 49494ccbb465 ("drm/i915: Compress GPU objects in error state")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.10+
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181003082422.23214-1-chris@chris-wilson.co.uk
(cherry picked from commit 83bc0f5b432f60394466deef16fc753e27371d0b)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_gpu_error.h