Chris Wilson 4c9613ce55 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: 0a97015d45ee ("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>
2018-10-03 08:02:42 -07:00
..
2018-08-06 11:18:01 -07:00
2018-07-20 12:29:24 +10:00
2018-08-06 11:18:01 -07:00
2018-07-20 12:29:24 +10:00
2017-10-07 10:11:41 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2018-08-15 17:39:07 -07:00
2018-03-08 10:07:18 +00:00
2017-07-09 18:48:37 -07:00
2018-08-20 15:38:44 -07:00
2018-08-20 15:38:44 -07:00
2018-06-12 16:19:22 -07:00
2018-07-12 17:31:28 +02:00
2018-08-15 17:39:07 -07:00
2018-07-20 12:29:24 +10:00
2018-08-06 11:18:01 -07:00
2018-07-20 10:46:49 +10:00
2018-07-20 12:29:24 +10:00
2018-08-20 15:38:44 -07:00