]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/guc: always reset GuC before loading firmware
authorDave Gordon <david.s.gordon@intel.com>
Mon, 4 Apr 2016 17:50:57 +0000 (18:50 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 5 Apr 2016 12:29:24 +0000 (13:29 +0100)
commit2f3c82405a2ccacbb55577b8a1e9b01b7bc1c6e6
treecc4fdbe703c4099f1e5c10fb1af262f09ab6a0b3
parent991d84870a8f857403fc7c0b5d3e0cbe965d4219
drm/i915/guc: always reset GuC before loading firmware

After a suspend-resume cycle, the resumed kernel has no idea what the
booted kernel may have done to the GuC before replacing itself with the
resumed image. In particular, it may have already loaded the GuC with
firmware, which will then cause this kernel's attempt to (re)load the
firmware to fail (GuC program memory is write-once!). The symptoms
(GuC firmware reload fails after hibernation) are further described
in the Bugzilla reference below.

So let's *always* reset the GuC just before (re)loading the firmware;
the hardware should then be in a well-known state, and we may even
avoid some of the issues arising from unpredictable timing.

Also added some more fields & values to the definition of the GUC_STATUS
register, which is the key diagnostic indicator if the GuC load fails.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Cc: Alex Dai <yu.dai@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94390
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_guc_reg.h
drivers/gpu/drm/i915/intel_guc_loader.c