drm/i915: Simplify error escape from cmdparser
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 11:04:35 +0000 (11:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 22:40:40 +0000 (22:40 +0000)
commit37d1151ce75ea2a9ca7274cb0c93f21db9ab431a
treec2cfd3dc14a459829c27bb8e2fac4c521369e775
parent755bf8a8c9850f418e9a585f067e431677219260
drm/i915: Simplify error escape from cmdparser

We need to flush the destination buffer, even on error, to maintain
consistent cache state. Thereby removing the jump on error past the
clear, and reducing the loop-escape mechanism to a mere break.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_cmd_parser.c