drm/i915: Don't mix srcu tag and negative error codes
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Sep 2019 16:08:34 +0000 (17:08 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 7 Oct 2019 17:44:48 +0000 (10:44 -0700)
commitfda9fa19b09067b6a3ee6ff8d93e977957e0655c
tree4601ceaad91ab981e304d6065fe74f9ccd0229ff
parent282b7fd5f5ab4eba499e1162c1e2802c6d0bb82e
drm/i915: Don't mix srcu tag and negative error codes

While srcu may use an integer tag, it does not exclude potential error
codes and so may overlap with our own use of -EINTR. Use a separate
outparam to store the tag, and report the error code separately.

Fixes: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190912160834.30601-1-chris@chris-wilson.co.uk
(cherry picked from commit eebab60f224fcfd560957715d08c31564d8672ed)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/gt/intel_reset.c
drivers/gpu/drm/i915/gt/intel_reset.h