]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Unwind i915_gem_init() failure
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Dec 2017 13:43:47 +0000 (13:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Dec 2017 18:53:35 +0000 (18:53 +0000)
commite53d517aad6ff50ded6386335fe29fc52d7377c2
treed50c2b914ece7713444ecdae37903b9c622ec8dc
parent45817fbb69f17d6e6d75bda35fec8575b6d693c5
drm/i915: Unwind i915_gem_init() failure

Since Michal introduced new user controllable errors other than -EIO
during i915_gem_init(), we need to actually unwind on the error path as
we have to abort the module load (and we expect to do so cleanly!).

As we now teardown key state and then mark the driver as wedged (on
EIO), we have to be careful to not allow ourselves to resume and
unwedge, thus attempting to use the uninitialised driver.

v2: Try not to free driver state for the suppressed EIO
v3: Use load-fault-injection to test both error/recovery paths.

References: 4520058e08d8 ("drm/i915/uc: Don't use -EIO to report missing firmware")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171213134347.4608-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c