Intel Graphics Engine Reset/Recovery Support Coming To Linux
One of the new set of patches published this week for the Intel DRM kernel graphics driver is for engine reset and recovery support for Broadwell "Gen8" graphics hardware and newer under Linux.
Arun Siluvery of Intel OTC published the "Gen8 Execlist based Engine reset and recovery support." This engine reset/recovery support for Gen8 graphics hardware and newer is for just resetting the engine in case of a problem rather than a complete GPU reset. Arun explained the process in one of the patches:
This change implements support for per-engine reset as an initial, less intrusive hang recovery option to be attempted before falling back to the legacy full GPU reset recovery mode if necessary. This is only supported from Gen8 onwards.Pre-Gen8 graphics hardware will continue doing full GPU resets in the case of a hang or other issue.
Hangchecker determines which engines are hung and invokes error handler to recover from it. Error handler schedules recovery for each of those engines that are hung. The recovery procedure is as follows,
- force engine to idle: this is done by issuing a reset request
- save current state which includes head and current request
- reset engine
- restore saved state and resubmit context
If engine reset fails then we fall back to heavy weight full gpu reset which resets all engines and reinitiazes complete state of HW and SW.
These patches for now can be found on the intel-gfx mailing list. The work has yet to land into any -next or -testing trees so it's not clear yet if this material will be ready for Linux 4.7 or will have to wait for a later kernel cycle.