drm/i915/guc: Clear enable_guc_loading in case of init failure
authorMichel Thierry <michel.thierry@intel.com>
Mon, 5 Jun 2017 17:12:51 +0000 (10:12 -0700)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thu, 8 Jun 2017 09:21:19 +0000 (12:21 +0300)
commitc4a8952612f6c1c28bab200c45d773e08dfd24d5
treefc120ea3ff36f9a54b5497836c79a0a4d3ce2947
parentd5553c0990c8b9cde6a9abb1f15acf8a11c5eef3
drm/i915/guc: Clear enable_guc_loading in case of init failure

And prevent calling i915_ggtt_disable_guc twice (the first when GuC init
failed, and the second time during driver unload / intel_uc_fini_hw),
and hitting the GEM_BUG_ON.

v2: Clear enable_guc_loading unconditionally (Michal)
    Make sure guc_free_load_err_log is still called (Daniele)
    Don't shoot the messenger (Chris)

Fixes: 3950bf3dbff10 ("drm/i915/guc: Add onion teardown to the GuC
setup")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170605171251.9905-1-michel.thierry@intel.com
drivers/gpu/drm/i915/intel_uc.c