Gen8+ engine-reset
Subsystems (3)
v9 cover Gen8+ engine-reset
These patches add the reset-engine feature from Gen8. This is also referred to as Timeout detection and recovery (TDR). This complements to the full gpu reset feature available in i915 but it only allows to reset a particular engine instead of all engines thus providing a light weight engine reset and recovery mechanism.
Thanks to recent changes merged, this implementation is now not only for execlists, but for GuC based submission too; it is still limited from Gen8 onwards. I have also included the changes for watchdog timeout detection. The GuC related patches are functional, but can be seen as RFC.
Timeout detection relies on the existing hangcheck, which remains the same; main changes are to the recovery mechanism. Once we detect a hang on a particular engine we identify the request that caused the hang, skip the request and adjust head pointers to allow the execution to proceed normally. After some cleanup, submissions are restarted to process remaining work queued to that engine.
If engine reset fails to recover engine correctly then we fallback to full gpu reset.
We can argue about the effectiveness of reset-engine vs full reset when more than one ring is hung, but the benefits of just resetting one engine are reduced when the driver has to do it multiple times.
v2: ELSP queue request tracking and reset path changes to handle incomplete requests during reset. Thanks to Chris Wilson for providing these patches.
v3: Let the waiter keep handling the full gpu reset if it already has the lock; point out that GuC submission needs a different method to restart workloads after the engine reset completes.
v4: Handle reset as 2 level resets, by first going to engine only and fall backing to full/chip reset as needed, i.e. reset_engine will need the struct_mutex.
v5: Rebased after reset flag split in 2, add GuC support, include watchdog detection patches, addressing comments from prev RFC.
v6: Mutex-less reset engine. Updates in watchdog abi and guc whitelist & register-restore fixes (including an old patch from Daniele).
v7: Removed leftovers from v5; review comments; ability to cancel the reset if there's no active request.
v8: Moved patch looking for active request at the beginning of these series; drop patch to request the engine's reset readinnes earlier since this is done during the reset flow too; warn if hw fails to acknowledge reset _readiness_.
v9: Support parallel resets (in different engines). Return type of reset available in get-param ioctl. Watchdog timeout won't capture the error state.
Daniele Ceraolo Spurio (1):
drm/i915/guc: fix mmio whitelist mmio_start offset and add reminder
Michel Thierry (20):
drm/i915: Look for active requests earlier in the reset path drm/i915: Update i915.reset to handle engine resets drm/i915: Modify error handler for per engine hang recovery drm/i915: Include reset engine information in has_gpu_reset getparam drm/i915: Add support for per engine reset recovery drm/i915: Add engine reset count to error state
drm/i915: Export per-engine reset count info to debugfs drm/i915: Carry on with reset even if hw engine is not ready drm/i915: Enable Engine reset and recovery support drm/i915: Add engine reset count in get-reset-stats ioctl drm/i915/selftests: reset engine self tests
drm/i915/guc: Provide register list to be saved/restored during engine
reset
drm/i915/guc: Rename the function that resets the GuC drm/i915/guc: Add support for reset engine using GuC commands drm/i915: Watchdog timeout: Pass GuC shared data structure during
param load
drm/i915: Watchdog timeout: IRQ handler for gen8+ drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+ drm/i915: Watchdog timeout: DRM kernel interface to set the timeout drm/i915: Watchdog timeout: Include threshold value in error state drm/i915: Watchdog timeout: Export media reset count from GuC to
debugfs
drivers/gpu/drm/i915/i915_debugfs.c | 43 +++++++ drivers/gpu/drm/i915/i915_drv.c | 76 +++++++++++ drivers/gpu/drm/i915/i915_drv.h | 92 +++++++++++++- drivers/gpu/drm/i915/i915_gem.c | 104 +++++++++------ drivers/gpu/drm/i915/i915_gem_context.c | 107 +++++++++++++++- drivers/gpu/drm/i915/i915_gem_context.h | 4 + drivers/gpu/drm/i915/i915_gpu_error.c | 15 ++- drivers/gpu/drm/i915/i915_guc_submission.c | 138 ++++++++++++++++++-- drivers/gpu/drm/i915/i915_irq.c | 62 ++++++++- drivers/gpu/drm/i915/i915_params.c | 6 +- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 5 +- drivers/gpu/drm/i915/i915_reg.h | 6 + drivers/gpu/drm/i915/intel_engine_cs.c | 65 +++++++--- drivers/gpu/drm/i915/intel_guc_fwif.h | 27 +++- drivers/gpu/drm/i915/intel_guc_loader.c | 11 ++ drivers/gpu/drm/i915/intel_hangcheck.c | 13 +- drivers/gpu/drm/i915/intel_lrc.c | 155 ++++++++++++++++++++++- drivers/gpu/drm/i915/intel_ringbuffer.h | 9 ++ drivers/gpu/drm/i915/intel_uc.c | 4 +- drivers/gpu/drm/i915/intel_uc.h | 3 + drivers/gpu/drm/i915/intel_uncore.c | 16 ++- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 150 ++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 7 +- 24 files changed, 1015 insertions(+), 105 deletions(-)
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 1/21 drm/i915: Look for active requests earlier in the reset path
And store the active request so that we only search for it once.
v2: Check for request completion inside _prepare_engine, don't use ECANCELED, remove unnecessary null checks (Chris).
v3: Capture active requests during reset_prepare and store it the engine hangcheck obj.
v4: Rename commit, change i915_gem_reset_request to just confirm the active_request is still incomplete, instead of engine_stalled (Chris).
v5: With style; pass the active request to gem_reset_engine, keep single return in reset_prepare_engine (Chris).
v6: Moved before reset-engine code appears (Chris)
--- drivers/gpu/drm/i915/i915_gem.c | 14 +++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +7 -7
@@ -2820,7 +2820,7 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)/* Ensure irq handler finishes, and not run again. */ for_each_engine (engine, dev_priv, id) { -struct drm_i915_gem_request *request; +struct drm_i915_gem_request *request =NULL ;/* Prevent the signaler thread from updating the request * state (by calling dma_fence_signal) as we are processing
@@ -2852,6 +2852,8 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)if (request && request->fence.error == -EIO ) err = -EIO ;/* Previous reset failed! */ } + + engine->hangcheck.active_request = request; }i915_gem_revoke_fences (dev_priv);
@@ -2905,7 +2907,7 @@ static void engine_skip_context(struct drm_i915_gem_request *request)static bool i915_gem_reset_request (struct drm_i915_gem_request *request) {/* Read once and return the resolution */ -const bool guilty =engine_stalled (request->engine); +const bool guilty = !i915_gem_request_completed (request);/* The guilty request will get skipped on a hung engine. *
@@ -2939,11 +2941,9 @@ static bool i915_gem_reset_request(struct drm_i915_gem_request *request)return guilty; } -static void i915_gem_reset_engine (struct intel_engine_cs *engine) +static void i915_gem_reset_engine (struct intel_engine_cs *engine, +struct drm_i915_gem_request *request) { -struct drm_i915_gem_request *request; - - request =i915_gem_find_active_request (engine);if (request &&i915_gem_reset_request (request)) {DRM_DEBUG_DRIVER ("resetting %s to restart from tail of request 0x%x\n" , engine->name, request->global_seqno);
@@ -2969,7 +2969,7 @@ void i915_gem_reset(struct drm_i915_private *dev_priv)for_each_engine (engine, dev_priv, id) {struct i915_gem_context *ctx; -i915_gem_reset_engine (engine); +i915_gem_reset_engine (engine, engine->hangcheck.active_request); ctx =fetch_and_zero (&engine->last_retired_context);if (ctx) engine->context_unpin (engine, ctx);
drivers/gpu/drm/i915/intel_ringbuffer.h +1 -0
@@ -121,6 +121,7 @@ struct intel_engine_hangcheck {unsigned long action_timestamp;int deadlock;struct intel_instdone instdone; +struct drm_i915_gem_request *active_request;bool stalled; };
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 2/21 drm/i915: Update i915.reset to handle engine resets
In reply to Michel ThierryIn preparation for engine reset work update this parameter to handle more than one type of reset. Default at the moment is still full gpu reset.
--- drivers/gpu/drm/i915/i915_params.c | 6 +++--- drivers/gpu/drm/i915/i915_params.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_params.c +3 -3
@@ -46,7 +46,7 @@ struct i915_params i915 __read_mostly = { .prefault_disable = 0, .load_detect_test = 0, .force_reset_modeset_test = 0, - .reset = true, + .reset = 1, .error_capture = true, .invert_brightness = 0, .disable_display = 0,
@@ -115,8 +115,8 @@ MODULE_PARM_DESC(vbt_sdvo_panel_type,"Override/Ignore selection of SDVO panel mode in the VBT " "(-2=ignore, -1=auto [default], index in VBT BIOS table)"); -module_param_named_unsafe (reset, i915.reset, bool,0600 ); -MODULE_PARM_DESC (reset,"Attempt GPU resets (default: true)" ); +module_param_named_unsafe (reset, i915.reset, int,0600 ); +MODULE_PARM_DESC (reset,"Attempt GPU resets (0=disabled, 1=full gpu reset [default], 2=engine reset)" );#if IS_ENABLED (CONFIG_DRM_I915_CAPTURE_ERROR )module_param_named (error_capture, i915.error_capture, bool,0600 );
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -51,6 +51,7 @@func (int, use_mmio_flip); \func (int, mmio_debug); \func (int, edp_vswing); \ +func (int, reset); \ func(unsigned int, inject_load_failure); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \
@@ -60,7 +61,6 @@func (bool, prefault_disable); \func (bool, load_detect_test); \func (bool, force_reset_modeset_test); \ -func (bool, reset); \func (bool, error_capture); \func (bool, disable_display); \func (bool, verbose_state_checks); \
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 3/21 drm/i915: Modify error handler for per engine hang recovery
In reply to Michel ThierryThis is a preparatory patch which modifies error handler to do per engine hang recovery. The actual patch which implements this sequence follows later in the series. The aim is to prepare existing recovery function to adapt to this new function where applicable (which fails at this point because core implementation is lacking) and continue recovery using legacy full gpu reset.
A helper function is also added to query the availability of engine reset. A subsequent patch will add the capability to query which type of reset is present (engine -> full -> no-reset) via the get-param ioctl.
It has been decided that the error events that are used to notify user of reset will only be sent in case if full chip reset. In case of just single (or multiple) engine resets, userspace won't be notified by these events.
Note that this implementation of engine reset is for i915 directly submitting to the ELSP, where the driver manages the hang detection, recovery and resubmission. With GuC submission these tasks are shared between driver and firmware; i915 will still responsible for detecting a hang, and when it does it will have to request GuC to reset that Engine and remind the firmware about the outstanding submissions. This will be added in different patch.
v2: rebase, advertise engine reset availability in platform definition, add note about GuC submission.
v3: s/*engine_reset*/*reset_engine*/. (Chris)
Handle reset as 2 level resets, by first going to engine only and fall backing to full/chip reset as needed, i.e. reset_engine will need the struct_mutex.
v4: Pass the engine mask to i915_reset. (Chris)
v5: Rebase, update selftests.
v6: Rebase, prepare for mutex-less reset engine.
v7: Pass reset_engine mask as a function parameter, and iterate over the engine mask for reset_engine. (Chris)
v8: Use i915.reset >=2 in has_reset_engine; remove redundant reset logging; add a reset-engine-in-progress flag to prevent concurrent resets, and avoid dual purposing of reset-backoff. (Chris)
v9: Support reset of different engines in parallel (Chris)
v10: Handle reset-engine flag locking better (Chris)
--- drivers/gpu/drm/i915/i915_drv.c | 13 +++++++++++ drivers/gpu/drm/i915/i915_drv.h | 10 +++++++++ drivers/gpu/drm/i915/i915_irq.c | 45 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_pci.c | 5 ++++- drivers/gpu/drm/i915/intel_uncore.c | 11 +++++++++ 5 files changed, 83 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +13 -0
@@ -1901,6 +1901,19 @@ void i915_reset(struct drm_i915_private *dev_priv) goto finish; } +/** +* i915_reset_engine - reset GPU engine to recover from a hang +* @engine: engine to reset +* +* Reset a specific GPU engine. Useful if a hang is detected. +* Returns zero on successful reset or otherwise an error code. +*/ +int i915_reset_engine (struct intel_engine_cs *engine) +{ +/* FIXME: replace me with engine reset sequence */ +return -ENODEV ; +} +static int i915_pm_suspend (struct device *kdev) {struct pci_dev *pdev =to_pci_dev (kdev);
drivers/gpu/drm/i915/i915_drv.h +10 -0
@@ -753,6 +753,7 @@ struct intel_csr {func (has_csr); \func (has_ddi); \func (has_dp_mst); \ +func (has_reset_engine); \func (has_fbc); \func (has_fpga_dbg); \func (has_full_ppgtt); \
@@ -1548,6 +1549,12 @@ struct i915_gpu_error {* inspect the bit and do the reset directly, otherwise the worker * waits for the struct_mutex. * +* #I915_RESET_ENGINE[num_engines] - Since the driver doesn't need to +* acquire the struct_mutex to reset an engine, we need an explicit +* flag to prevent two concurrent reset attempts in the same engine. +* As the number of engines continues to grow, allocate the flags from +* the most significant bits. +* * #I915_WEDGED - If reset fails and we can no longer use the GPU, * we set the #I915_WEDGED bit. Prior to command submission, e.g. * i915_gem_request_alloc(), this bit is checked and the sequence
@@ -1557,6 +1564,7 @@ struct i915_gpu_error {#define I915_RESET_BACKOFF 0#define I915_RESET_HANDOFF 1#define I915_WEDGED (BITS_PER_LONG - 1) +#define I915_RESET_ENGINE (I915_WEDGED - I915_NUM_ENGINES)/** * Waitqueue to signal when a hang is detected. Used to for waiters
@@ -3087,6 +3095,8 @@ extern void i915_driver_unload(struct drm_device *dev);extern int intel_gpu_reset (struct drm_i915_private *dev_priv,u32 engine_mask);extern bool intel_has_gpu_reset (struct drm_i915_private *dev_priv);extern void i915_reset (struct drm_i915_private *dev_priv); +extern int i915_reset_engine (struct intel_engine_cs *engine); +extern bool intel_has_reset_engine (struct drm_i915_private *dev_priv);extern int intel_guc_reset (struct drm_i915_private *dev_priv);extern void intel_engine_init_hangcheck (struct intel_engine_cs *engine);extern void intel_hangcheck_init (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_irq.c +45 -0
63 lines not on this page · raw message
drivers/gpu/drm/i915/i915_pci.c +4 -1
@@ -310,7 +310,8 @@ static const struct intel_device_info intel_haswell_info = { BDW_COLORS, \ .has_logical_ring_contexts = 1, \ .has_full_48bit_ppgtt = 1, \ - .has_64bit_reloc = 1 + .has_64bit_reloc = 1, \ + .has_reset_engine = 1#define BDW_PLATFORM \ BDW_FEATURES, \
@@ -342,6 +343,7 @@ static const struct intel_device_info intel_cherryview_info = { .has_gmch_display = 1, .has_aliasing_ppgtt = 1, .has_full_ppgtt = 1, + .has_reset_engine = 1, .display_mmio_offset =VLV_DISPLAY_BASE ,GEN_CHV_PIPEOFFSETS , CURSOR_OFFSETS,
@@ -387,6 +389,7 @@ static const struct intel_device_info intel_skylake_gt3_info = { .has_aliasing_ppgtt = 1, \ .has_full_ppgtt = 1, \ .has_full_48bit_ppgtt = 1, \ + .has_reset_engine =1 , \GEN_DEFAULT_PIPEOFFSETS , \IVB_CURSOR_OFFSETS , \BDW_COLORS
drivers/gpu/drm/i915/intel_uncore.c +11 -0
@@ -1719,6 +1719,17 @@ bool intel_has_gpu_reset(struct drm_i915_private *dev_priv)return intel_get_gpu_reset (dev_priv) !=NULL ; } +/* +* When GuC submission is enabled, GuC manages ELSP and can initiate the +* engine reset too. For now, fall back to full GPU reset if it is enabled. +*/ +bool intel_has_reset_engine (struct drm_i915_private *dev_priv) +{ +return (dev_priv->info.has_reset_engine && + !dev_priv->guc.execbuf_client && + i915.reset >=2 ); +} +int intel_guc_reset (struct drm_i915_private *dev_priv) {int ret;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 4/21 drm/i915: Include reset engine information in has_gpu_reset getparam
In reply to Michel ThierrySo users (tests) can detect which type of reset (engine vs global) is active.
--- drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
@@ -322,6 +322,8 @@ static int i915_getparam(struct drm_device *dev, void *data,break ;case I915_PARAM_HAS_GPU_RESET : value = i915.enable_hangcheck &&intel_has_gpu_reset (dev_priv); +if (value &&intel_has_reset_engine (dev_priv)) + value =2 ;break ;case I915_PARAM_HAS_RESOURCE_STREAMER : value =HAS_RESOURCE_STREAMER (dev_priv);
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 5/21 drm/i915: Add support for per engine reset recovery
In reply to Michel ThierryThis 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.
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,
- identifies the request that caused the hang and it is dropped
- force engine to idle: this is done by issuing a reset request
- reset the engine
- re-init the engine to resume submissions.
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.
v2: Rebase.
v3: s/*engine_reset*/*reset_engine*/; freeze engine and irqs before calling i915_gem_reset_engine (Chris).
v4: Rebase, modify i915_gem_reset_prepare to use a ring mask and reuse the function for reset_engine.
v5: intel_reset_engine_start/cancel instead of request/unrequest_reset.
v6: Clean up reset_engine function to not require mutex, i.e. no need to call revoke/restore_fences and _retire_requests (Chris).
v7: Remove leftovers from v5, i.e. no need to disable irq, hold forcewake or wakeup the handoff bit (Chris).
v8: engine_retire_requests should be (and it was) static; explain that we have to re-init the engine after reset, which is why the init_hw call is needed; check reset-in-progress flag (Chris).
v9: Rebase, include code to pass the active request to gem_reset_engine (as it is already done in full reset). Remove unnecessary intel_reset_engine_start/cancel, these are executed as part of the reset.
v10: Rebase, use the right I915_RESET_ENGINE flag.
--- drivers/gpu/drm/i915/i915_drv.c | 48 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_gem.c | 96 +++++++++++++++++++++++++---------------- 3 files changed, 109 insertions(+), 40 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +46 -2
@@ -1909,11 +1909,55 @@ void i915_reset(struct drm_i915_private *dev_priv)* * Reset a specific GPU engine. Useful if a hang is detected. * Returns zero on successful reset or otherwise an error code. +* +* Procedure is: +* - identifies the request that caused the hang and it is dropped +* - reset engine (which will force the engine to idle) +* - re-init/configure engine */ int i915_reset_engine (struct intel_engine_cs *engine) { -/* FIXME: replace me with engine reset sequence */ -return -ENODEV ; +int ret; +struct drm_i915_private *dev_priv = engine->i915; +struct i915_gpu_error *error = &dev_priv->gpu_error; +struct drm_i915_gem_request *active_request; + +GEM_BUG_ON (!test_bit (I915_RESET_ENGINE + engine->id, &error->flags)); + +DRM_DEBUG_DRIVER ("resetting %s\n" , engine->name); + + active_request =i915_gem_reset_prepare_engine (engine); +if (IS_ERR (active_request)) { +DRM_DEBUG_DRIVER ("Previous reset failed, promote to full reset\n" ); + ret =PTR_ERR (active_request); + goto out; + } + +/* +* the request that caused the hang is stuck on elsp, we know the +* active request and can drop it, adjust head to skip the offending +* request to resume executing remaining requests in the queue. +*/ +i915_gem_reset_engine (engine, active_request); + +/* finally, reset engine */ + ret =intel_gpu_reset (dev_priv,intel_engine_flag (engine)); +if (ret) { +DRM_ERROR ("Failed to reset %s, ret=%d\n" , engine->name, ret); + goto out; + } + +i915_gem_reset_finish_engine (engine); + +/* +* The engine and its registers (and workarounds in case of render) +* have been reset to their default values. Follow the init_ring +* process to program RING_MODE, HWSP and re-enable submission. +*/ + ret = engine->init_hw (engine); + +out: +return ret; }static int i915_pm_suspend (struct device *kdev)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -3468,11 +3468,16 @@ static inline u32 i915_reset_count(struct i915_gpu_error *error)return READ_ONCE (error->reset_count); } +struct drm_i915_gem_request * +i915_gem_reset_prepare_engine (struct intel_engine_cs *engine);int i915_gem_reset_prepare (struct drm_i915_private *dev_priv);void i915_gem_reset (struct drm_i915_private *dev_priv); +void i915_gem_reset_finish_engine (struct intel_engine_cs *engine);void i915_gem_reset_finish (struct drm_i915_private *dev_priv);void i915_gem_set_wedged (struct drm_i915_private *dev_priv);bool i915_gem_unset_wedged (struct drm_i915_private *dev_priv); +void i915_gem_reset_engine (struct intel_engine_cs *engine, +struct drm_i915_gem_request *request);void i915_gem_init_mmio (struct drm_i915_private *i915);int __must_check i915_gem_init (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_gem.c +58 -38
127 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v9 05/21] drm/i915: Add support for per engine reset recovery
Quoting Michel Thierry (2017-06-15 21:18:12)
Quoted 34 lines
int
i915_gem_reset_prepare(struct drm_i915_private *dev_priv){ struct intel_engine_cs *engine;drivers/gpu/drm/i915/i915_gem.c +1
-26+struct drm_i915_gem_request *request;enum intel_engine_id id;int err =0 ; -/* Ensure irq handler finishes, and not run again. */ for_each_engine (engine, dev_priv, id) { -struct drm_i915_gem_request *request =NULL ; - -/* Prevent the signaler thread from updating the request -* state (by calling dma_fence_signal) as we are processing -* the reset. The write from the GPU of the seqno is -* asynchronous and the signaler thread may see a different -* value to us and declare the request complete, even though -* the reset routine have picked that request as the active -* (incomplete) request. This conflict is not handled -* gracefully! -*/ -kthread_park (engine->breadcrumbs.signaler); - -/* Prevent request submission to the hardware until we have -* completed the reset in i915_gem_reset_finish(). If a request -* is completed by one engine, it may then queue a request -* to a second via its engine->irq_tasklet *just* as we are -* calling engine->init_hw() and also writing the ELSP. -* Turning off the engine->irq_tasklet until the reset is over -* prevents the race. -*/ -tasklet_kill (&engine->irq_tasklet); -tasklet_disable (&engine->irq_tasklet); - -if (engine->irq_seqno_barrier)
drivers/gpu/drm/i915/i915_gem.c static bool engine_stalled(struct intel_engine_cs *engine) · line 2869
Quoted 10 lines
drivers/gpu/drm/i915/i915_gem.c +4
-6- engine->irq_seqno_barrier (engine); - -if (engine_stalled (engine)) { - request =i915_gem_find_active_request (engine); -if (request && request->fence.error == -EIO ) - err = -EIO ;/* Previous reset failed! */ + request =i915_gem_reset_prepare_engine (engine); +if (IS_ERR (request)) { + err =PTR_ERR (request); +break ;
s/break/continue/
Otherwise, prepare/finish are unbalanced leading to tasklets being very confused.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v9 05/21] drm/i915: Add support for per engine reset recovery
In reply to Michel ThierryQuoting Michel Thierry (2017-06-15 21:18:12)
drivers/gpu/drm/i915/i915_gem.c void i915_gem_reset_finish(struct drm_i915_private *dev_priv) · line 3018
Quoted 10 lines
drivers/gpu/drm/i915/i915_gem.c +2
-4@@ -2992,10 +3014,8 @@ void i915_gem_reset_finish(struct drm_i915_private *dev_priv)lockdep_assert_held (&dev_priv->drm.struct_mutex); -for_each_engine (engine, dev_priv, id) { -tasklet_enable (&engine->irq_tasklet); -kthread_unpark (engine->breadcrumbs.signaler); - } +for_each_engine (engine, dev_priv, id) +i915_gem_reset_finish_engine (engine);
And we shouldn't forget to clear the active_request here! -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v9 05/21] drm/i915: Add support for per engine reset recovery
Quoted 5 lines · Chris Wilson
Quoting Michel Thierry (2017-06-15 21:18:12)
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -2992,10 +3014,8 @@ void i915_gem_reset_finish(struct drm_i915_private *dev_priv)lockdep_assert_held (&dev_priv->drm.struct_mutex);
Quoted 8 lines
drivers/gpu/drm/i915/i915_gem.c void i915_gem_reset_finish(struct drm_i915_private *dev_priv) · line 3018
Quoted 6 lines
drivers/gpu/drm/i915/i915_gem.c +2
-4-for_each_engine (engine, dev_priv, id) { -tasklet_enable (&engine->irq_tasklet); -kthread_unpark (engine->breadcrumbs.signaler); - } +for_each_engine (engine, dev_priv, id) +i915_gem_reset_finish_engine (engine);And we shouldn't forget to clear the
active_requesthere!
The hangcheck.active_request?
And thanks for spotting the break/continue error.
-Michel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 6/21 drm/i915: Add engine reset count to error state
In reply to Michel ThierryDriver maintains count of how many times a given engine is reset, useful to capture this in error state also. It gives an idea of how engine is coping up with the workloads it is executing before this error state.
A follow-up patch will provide this information in debugfs.
v2: s/engine_reset/reset_engine/ (Chris)
Define count as unsigned int (Tvrtko)
--- drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++++ drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++ 3 files changed, 16 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -1955,7 +1955,10 @@ int i915_reset_engine(struct intel_engine_cs *engine)* process to program RING_MODE, HWSP and re-enable submission. */ ret = engine->init_hw (engine); +if (ret) + goto out; + error->reset_engine_count[engine->id]++; out:return ret; }
drivers/gpu/drm/i915/i915_drv.h +10 -0
@@ -923,6 +923,7 @@ struct i915_gpu_state {enum intel_engine_hangcheck_action hangcheck_action;struct i915_address_space *vm;int num_requests; +u32 reset_count;/* position of active request inside the ring */ u32 rq_head, rq_post, rq_tail;
@@ -1566,6 +1567,9 @@ struct i915_gpu_error {#define I915_WEDGED (BITS_PER_LONG - 1)#define I915_RESET_ENGINE (I915_WEDGED - I915_NUM_ENGINES) +/** Number of times an engine has been reset */ +u32 reset_engine_count[I915_NUM_ENGINES ]; +/** * Waitqueue to signal when a hang is detected. Used to for waiters * to release the struct_mutex for the reset to procede.
@@ -3468,6 +3472,12 @@ static inline u32 i915_reset_count(struct i915_gpu_error *error)return READ_ONCE (error->reset_count); } +static inline u32 i915_reset_engine_count (struct i915_gpu_error *error, +struct intel_engine_cs *engine) +{ +return READ_ONCE (error->reset_engine_count[engine->id]); +} +struct drm_i915_gem_request *i915_gem_reset_prepare_engine (struct intel_engine_cs *engine);int i915_gem_reset_prepare (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_gpu_error.c +3 -0
@@ -463,6 +463,7 @@ static void error_print_engine(struct drm_i915_error_state_buf *m,err_printf (m," hangcheck action timestamp: %lu, %u ms ago\n" , ee->hangcheck_timestamp,jiffies_to_msecs (jiffies - ee->hangcheck_timestamp)); +err_printf (m," engine reset count: %u\n" , ee->reset_count);error_print_request (m," ELSP[0]: " , &ee->execlist[0 ]);error_print_request (m," ELSP[1]: " , &ee->execlist[1 ]);
@@ -1244,6 +1245,8 @@ static void error_record_engine_registers(struct i915_gpu_state *error, ee->hangcheck_timestamp = engine->hangcheck.action_timestamp; ee->hangcheck_action = engine->hangcheck.action; ee->hangcheck_stalled = engine->hangcheck.stalled; + ee->reset_count =i915_reset_engine_count (&dev_priv->gpu_error, + engine);if (USES_PPGTT (dev_priv)) {int i;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 7/21 drm/i915: Export per-engine reset count info to debugfs
In reply to Michel ThierryA new variable is added to export the reset counts to debugfs, this includes full gpu reset and engine reset count. This is useful for tests where they are expected to trigger reset; these counts are checked before and after the test to ensure the same.
v2: Include reset engine count in i915_engine_info too (Chris).
--- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +21 -0
@@ -1403,6 +1403,23 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)return 0 ; } +static int i915_reset_info (struct seq_file *m,void *unused) +{ +struct drm_i915_private *dev_priv =node_to_i915 (m->private); +struct i915_gpu_error *error = &dev_priv->gpu_error; +struct intel_engine_cs *engine; +enum intel_engine_id id; + +seq_printf (m,"full gpu reset = %u\n" ,i915_reset_count (error)); + +for_each_engine (engine, dev_priv, id) { +seq_printf (m,"%s = %u\n" , engine->name, +i915_reset_engine_count (error, engine)); + } + +return 0 ; +} +static int ironlake_drpc_info (struct seq_file *m) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);
@@ -3279,6 +3296,7 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_engine_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); +struct i915_gpu_error *error = &dev_priv->gpu_error;struct intel_engine_cs *engine;enum intel_engine_id id;
@@ -3302,6 +3320,8 @@ static int i915_engine_info(struct seq_file *m, void *unused) engine->hangcheck.seqno,jiffies_to_msecs (jiffies - engine->hangcheck.action_timestamp), engine->timeline->inflight_seqnos); +seq_printf (m,"\tReset count: %d\n" , +i915_reset_engine_count (error, engine));rcu_read_lock ();
@@ -4814,6 +4834,7 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_huc_load_status", i915_huc_load_status_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_hangcheck_info", i915_hangcheck_info, 0}, + {"i915_reset_info", i915_reset_info, 0}, {"i915_drpc_info", i915_drpc_info, 0}, {"i915_emon_status", i915_emon_status, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0},
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
RFC PATCH v9 8/21 drm/i915: Carry on with reset even if hw engine is not ready
In reply to Michel ThierryWe try to get the engines ready/idle before triggering the reset, but it has been seen that sometimes the hw never acknowledges this.
If we miss the acknowledgment, carry on with the reset instead of leaving the GPU in a wedged state.
The frequency of missed acknowledgment from hw is low, but it has been seen at least once in CI.
References: https://intel-gfx-ci.01.org/CI/Trybot_831/
--- drivers/gpu/drm/i915/intel_uncore.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +6 -2
@@ -1630,8 +1630,12 @@ static int gen8_reset_engine_start(struct intel_engine_cs *engine)RESET_CTL_READY_TO_RESET ,RESET_CTL_READY_TO_RESET , 700); -if (ret) -DRM_ERROR ("%s: reset request timeout\n" , engine->name); +if (GEM_WARN_ON (ret)) { +/* hw did not ack ready-to-reset, reset anyway */ +DRM_DEBUG_DRIVER ("%s: reset request timeout, continue\n" , + engine->name); + ret =0 ; + }return ret; }
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 9/21 drm/i915: Enable Engine reset and recovery support
In reply to Michel ThierryThis feature is made available only from Gen8, for previous gen devices driver uses legacy full gpu reset.
--- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_params.c +2 -2
@@ -46,7 +46,7 @@ struct i915_params i915 __read_mostly = { .prefault_disable = 0, .load_detect_test = 0, .force_reset_modeset_test = 0, - .reset = 1, + .reset = 2, .error_capture = true, .invert_brightness = 0, .disable_display = 0,
@@ -116,7 +116,7 @@ MODULE_PARM_DESC(vbt_sdvo_panel_type, "(-2=ignore, -1=auto [default], index in VBT BIOS table)");module_param_named_unsafe (reset, i915.reset, int,0600 ); -MODULE_PARM_DESC (reset,"Attempt GPU resets (0=disabled, 1=full gpu reset [default], 2=engine reset)" ); +MODULE_PARM_DESC (reset,"Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])" );#if IS_ENABLED (CONFIG_DRM_I915_CAPTURE_ERROR )module_param_named (error_capture, i915.error_capture, bool,0600 );
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 10/21 drm/i915: Add engine reset count in get-reset-stats ioctl
In reply to Michel ThierryUsers/tests relying on the total reset count will start seeing a smaller number since most of the hangs can be handled by engine reset. Note that if reset engine x, context a running on engine y will be unaware and unaffected.
To start the discussion, include just a total engine reset count. If it is deemed useful, it can be extended to report each engine separately. Our igt's gem_reset_stats test will need changes to ignore the pad field, since it can now return reset_engine_count.
v2: s/engine_reset/reset_engine/, use union in uapi to not break compatibility.
v3: Keep rejecting attempts to use pad as input (Antonio)
--- drivers/gpu/drm/i915/i915_gem_context.c | 12 ++++++++++-- include/uapi/drm/i915_drm.h | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_context.c +10 -2
@@ -1029,6 +1029,8 @@ int i915_gem_context_reset_stats_ioctl(struct drm_device *dev,struct drm_i915_private *dev_priv =to_i915 (dev);struct drm_i915_reset_stats *args = data;struct i915_gem_context *ctx; +struct intel_engine_cs *engine; +enum intel_engine_id id;int ret;if (args->flags || args->pad)
@@ -1047,10 +1049,16 @@ int i915_gem_context_reset_stats_ioctl(struct drm_device *dev,return PTR_ERR (ctx); } -if (capable (CAP_SYS_ADMIN )) +if (capable (CAP_SYS_ADMIN )) { args->reset_count =i915_reset_count (&dev_priv->gpu_error); -else +for_each_engine (engine, dev_priv, id) + args->reset_engine_count += +i915_reset_engine_count (&dev_priv->gpu_error, + engine); + }else { args->reset_count =0 ; + args->reset_engine_count =0 ; + } args->batch_active = ctx->guilty_count; args->batch_pending = ctx->active_count;
include/uapi/drm/i915_drm.h +5 -1
@@ -1286,7 +1286,11 @@ struct drm_i915_reset_stats {/* Number of batches lost pending for execution, for this context */ __u32 batch_pending; -__u32 pad; +union { +__u32 pad; +/* Engine resets since boot/module reload, for all contexts */ +__u32 reset_engine_count; + }; };struct drm_i915_gem_userptr {
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v9 10/21] drm/i915: Add engine reset count in get-reset-stats ioctl
Quoting Michel Thierry (2017-06-15 21:18:17)
Quoted 5 lines
Users/tests relying on the total reset count will start seeing a smaller number since most of the hangs can be handled by engine reset. Note that if reset engine x, context a running on engine y will be unaware and unaffected.
Quoted 7 lines
To start the discussion, include just a total engine reset count. If it is deemed useful, it can be extended to report each engine separately. Our igt's
gem_reset_statstest will need changes to ignore the pad field, since it can now returnreset_engine_count.v2: s/engine_reset/reset_engine/, use union in uapi to not break compatibility.
v3: Keep rejecting attempts to use pad as input (Antonio)
Nope. You have now defined that pad works as an output-only parameter. It is no longer in a state of flux and can be any value on input. The test in gem_reset_stats becomes invalid.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v9 10/21] drm/i915: Add engine reset count in get-reset-stats ioctl
Quoted 11 lines · Chris Wilson
Quoting Michel Thierry (2017-06-15 21:18:17)
Quoted 10 lines
Users/tests relying on the total reset count will start seeing a smaller number since most of the hangs can be handled by engine reset. Note that if reset engine x, context a running on engine y will be unaware and unaffected.
To start the discussion, include just a total engine reset count. If it is deemed useful, it can be extended to report each engine separately. Our igt's
gem_reset_statstest will need changes to ignore the pad field, since it can now returnreset_engine_count.
Quoted 6 lines
Quoted 2 lines
v2: s/engine_reset/reset_engine/, use union in uapi to not break compatibility.
v3: Keep rejecting attempts to use pad as input (Antonio)Nope. You have now defined that pad works as an output-only parameter. It is no longer in a state of flux and can be any value on input. The test in
gem_reset_statsbecomes invalid.
Ok, I'll also have to make more changes to that test; the existing subtests must enforce i915.reset=1 (or read both reset_count and pad/reset_engine_count).
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 11/21 drm/i915/selftests: reset engine self tests
In reply to Michel ThierryCheck that we can reset specific engines, also check the fallback to full reset if something didn't work.
v2: rebase.
v3: use RESET_ENGINE_IN_PROGRESS flag.
v4: use I915_RESET_ENGINE flag.
--- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 150 +++++++++++++++++++++++ 1 file changed, 150 insertions(+)
drivers/gpu/drm/i915/selftests/intel_hangcheck.c +150 -0
@@ -322,6 +322,57 @@ static int igt_global_reset(void *arg)return err; } +static int igt_reset_engine (void *arg) +{ +struct drm_i915_private *i915 = arg; +struct intel_engine_cs *engine; +enum intel_engine_id id; +unsigned int reset_count, reset_engine_count; +int err =0 ; + +/* Check that we can issue a global GPU and engine reset */ + +if (!intel_has_gpu_reset (i915)) +return 0 ; + +if (!intel_has_reset_engine (i915)) +return 0 ; + +for_each_engine (engine, i915, id) { +set_bit (I915_RESET_ENGINE + engine->id, &i915->gpu_error.flags); + reset_count =i915_reset_count (&i915->gpu_error); + reset_engine_count =i915_reset_engine_count (&i915->gpu_error, + engine); + + err =i915_reset_engine (engine); +if (err) { +pr_err ("i915_reset_engine failed\n" ); +break ; + } + +if (i915_reset_count (&i915->gpu_error) != reset_count) { +pr_err ("Full GPU reset recorded! (engine reset expected)\n" ); + err = -EINVAL ; +break ; + } + +if (i915_reset_engine_count (&i915->gpu_error, engine) == + reset_engine_count) { +pr_err ("No %s engine reset recorded!\n" , engine->name); + err = -EINVAL ; +break ; + } + +clear_bit (I915_RESET_ENGINE + engine->id, + &i915->gpu_error.flags); + } + +if (i915_terminally_wedged (&i915->gpu_error)) + err = -EIO ; + +return err; +} +static u32 fake_hangcheck (struct drm_i915_gem_request *rq) {u32 reset_count;
@@ -526,13 +577,112 @@ static int igt_reset_queue(void *arg)return err; } +static int igt_render_engine_reset_fallback (void *arg) +{ +struct drm_i915_private *i915 = arg; +struct intel_engine_cs *engine = i915->engine[RCS ]; +struct hang h; +struct drm_i915_gem_request *rq; +unsigned int reset_count, reset_engine_count; +int err =0 ; + +/* Check that we can issue a global GPU and engine reset */ + +if (!intel_has_gpu_reset (i915)) +return 0 ; + +if (!intel_has_reset_engine (i915)) +return 0 ; + +set_bit (I915_RESET_BACKOFF , &i915->gpu_error.flags); +mutex_lock (&i915->drm.struct_mutex); + + err =hang_init (&h, i915); +if (err) + goto unlock; + + rq =hang_create_request (&h, engine, i915->kernel_context); +if (IS_ERR (rq)) { + err =PTR_ERR (rq); + goto fini; + } + +i915_gem_request_get (rq); +__i915_add_request (rq, true); + +/* make reset engine fail */ + rq->fence.error = -EIO ; + +if (!wait_for_hang (&h, rq)) { +pr_err ("Failed to start request %x\n" , rq->fence.seqno); + err = -EIO ; + goto fini; + } + + reset_engine_count =i915_reset_engine_count (&i915->gpu_error, engine); + reset_count =fake_hangcheck (rq); + +/* unlock since we'll call handle_error */ +mutex_unlock (&i915->drm.struct_mutex); +clear_bit (I915_RESET_BACKOFF , &i915->gpu_error.flags); + +i915_handle_error (i915,intel_engine_flag (engine),"live test" ); + +if (i915_reset_engine_count (&i915->gpu_error, engine) != + reset_engine_count) { +pr_err ("render engine reset recorded! (full reset expected)\n" ); + err = -EINVAL ; + goto fini; + } + +if (i915_reset_count (&i915->gpu_error) == reset_count) { +pr_err ("No full GPU reset recorded!\n" ); + err = -EINVAL ; + goto fini; + } + +/* +* by using fence.error = -EIO, full reset sets the wedged flag, do one +* more full reset to re-enable the hw. +*/ +if (i915_terminally_wedged (&i915->gpu_error)) { +set_bit (I915_RESET_BACKOFF , &i915->gpu_error.flags); +mutex_lock (&i915->drm.struct_mutex); + rq->fence.error =0 ; + +set_bit (I915_RESET_HANDOFF , &i915->gpu_error.flags); +i915_reset (i915); +GEM_BUG_ON (test_bit (I915_RESET_HANDOFF , + &i915->gpu_error.flags)); + +if (i915_reset_count (&i915->gpu_error) == reset_count) { +pr_err ("No full GPU reset recorded!\n" ); + err = -EINVAL ; + goto fini; + } + } + +fini: +hang_fini (&h); +unlock: +mutex_unlock (&i915->drm.struct_mutex); +clear_bit (I915_RESET_BACKOFF , &i915->gpu_error.flags); + +if (i915_terminally_wedged (&i915->gpu_error)) +return -EIO ; + +return err; +} +int intel_hangcheck_live_selftests (struct drm_i915_private *i915) {static const struct i915_subtest tests[] = {SUBTEST (igt_hang_sanitycheck),SUBTEST (igt_global_reset), +SUBTEST (igt_reset_engine),SUBTEST (igt_wait_reset),SUBTEST (igt_reset_queue), +SUBTEST (igt_render_engine_reset_fallback), };if (!intel_has_gpu_reset (i915))
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 12/21 drm/i915/guc: fix mmio whitelist mmio_start offset and add reminder
In reply to Michel ThierryFrom: Daniele Ceraolo Spurio <[email protected]>
The mmio_start offset for the whitelist is the first FORCE_TO_NONPRIV register the GuC can use to restore the provided whitelist when an engine reset via GuC (which we still don't support) is triggered.
We're currently adding the mmio_base of the engine to the absolute address of the RCS version of the register, which results in the wrong offset. Fix it by using the definition we already have instead of re-defining it in the GuC FW header.
Also add a comment to avoid future issues with FORCE_TO_NONPRIV registers, which are also used by the workaround framework.
v2: improve comment (Michal), move comment about save/restore because it
is not related to the mmio_white_list field.
v3: rebase/resurrect.
--- drivers/gpu/drm/i915/i915_guc_submission.c | 11 +++++++++-- drivers/gpu/drm/i915/intel_guc_fwif.h | 1 - 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_guc_submission.c +9 -2
@@ -1051,10 +1051,17 @@ static int guc_ads_create(struct intel_guc *guc)/* MMIO reg state */ for_each_engine (engine, dev_priv, id) { blob->reg_state.white_list[engine->guc_id].mmio_start = - engine->mmio_base +GUC_MMIO_WHITE_LIST_START ; +i915_mmio_reg_offset (RING_FORCE_TO_NONPRIV (engine->mmio_base,0 )); -/* Nothing to be saved or restored for now. */ +/* +* Note: if the GuC whitelist management is enabled, the values +* should be filled using the workaround framework to avoid +* inconsistencies with the handling of FORCE_TO_NONPRIV +* registers. +*/ blob->reg_state.white_list[engine->guc_id].count =0 ; + +/* Nothing to be saved or restored for now. */ }/*
drivers/gpu/drm/i915/intel_guc_fwif.h +0 -1
@@ -435,7 +435,6 @@ struct guc_policies {#define GUC_REGSET_SAVE_CURRENT_VALUE 0x10#define GUC_REGSET_MAX_REGISTERS 25 -#define GUC_MMIO_WHITE_LIST_START 0x24d0#define GUC_MMIO_WHITE_LIST_MAX 12#define GUC_S3_SAVE_SPACE_PAGES 10
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 13/21 drm/i915/guc: Provide register list to be saved/restored during engine reset
In reply to Michel ThierryGuC expects a list of registers from the driver which are saved/restored during engine reset. The type of value to be saved is controlled by flags. We provide a minimal set of registers that we want GuC to save and restore. This is not an issue in case of engine reset as driver initializes most of them following an engine reset, but in case of media reset (aka watchdog reset) which is completely internal to GuC (including resubmission of hung workload), it is necessary to provide this list, otherwise GuC won't be able to schedule further workloads after a reset. This is the minimal set of registers identified for things to work as expected but if we see any new issues, this register list can be expanded.
In order to not loose any existing workarounds, we have to let GuC know the registers and its values. These will be reapplied after the reset. Note that we can't just read the current value because most of these registers are masked (so we have a workaround for a workaround for a workaround).
v2: REGSET_MASKED is too difficult for GuC, use REGSET_SAVE_DEFAULT_VALUE and current value from RING_MODE reg instead; no need to preserve head/tail either, be extra paranoid and save whitelisted registers (Daniele).
v3: Workarounds added only once during _init_workarounds also have to been restored, or we risk loosing them after internal GuC reset (Daniele).
v4: Rename macro used to keep track the workaround registers we will have to restore after reset (s/I915_GUC_REG_WRITE/WA_REG_WR_GUC_RESTORE).
v5: Only ask guc to reapply workarounds in case of render reset (Daniele).
--- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_guc_submission.c | 70 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_engine_cs.c | 65 ++++++++++++++++++--------- 3 files changed, 116 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -1873,7 +1873,10 @@ struct i915_wa_reg {struct i915_workarounds {struct i915_wa_reg reg[I915_MAX_WA_REGS ]; +/* list of registers (and their values) that GuC will have to restore */ +struct i915_wa_reg guc_reg[GUC_REGSET_MAX_REGISTERS ];u32 count; +u32 guc_count;u32 hw_whitelist_count[I915_NUM_ENGINES ]; };
drivers/gpu/drm/i915/i915_guc_submission.c +68 -2
95 lines not on this page · raw message
drivers/gpu/drm/i915/intel_engine_cs.c +45 -20
128 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 14/21 drm/i915/guc: Rename the function that resets the GuC
In reply to Michel Thierryintel_guc_reset sounds more like the microcontroller is the one performing a reset, while in this case is the opposite. intel_reset_guc not only makes it clearer, it follows the other intel_reset functions available.
v2: Print error message in English.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_uc.c | 4 ++-- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -3104,7 +3104,7 @@ extern bool intel_has_gpu_reset(struct drm_i915_private *dev_priv);extern void i915_reset (struct drm_i915_private *dev_priv);extern int i915_reset_engine (struct intel_engine_cs *engine);extern bool intel_has_reset_engine (struct drm_i915_private *dev_priv); -extern int intel_guc_reset (struct drm_i915_private *dev_priv); +extern int intel_reset_guc (struct drm_i915_private *dev_priv);extern void intel_engine_init_hangcheck (struct intel_engine_cs *engine);extern void intel_hangcheck_init (struct drm_i915_private *dev_priv);extern unsigned long i915_chipset_val (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/intel_uc.c +2 -2
@@ -46,9 +46,9 @@ static int __intel_uc_reset_hw(struct drm_i915_private *dev_priv)int ret;u32 guc_status; - ret =intel_guc_reset (dev_priv); + ret =intel_reset_guc (dev_priv);if (ret) { -DRM_ERROR ("GuC reset failed, ret = %d\n" , ret); +DRM_ERROR ("Failed to reset GuC, ret = %d\n" , ret);return ret; }
drivers/gpu/drm/i915/intel_uncore.c +1 -1
@@ -1734,7 +1734,7 @@ bool intel_has_reset_engine(struct drm_i915_private *dev_priv) i915.reset >= 2); } -int intel_guc_reset (struct drm_i915_private *dev_priv) +int intel_reset_guc (struct drm_i915_private *dev_priv) {int ret;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 15/21 drm/i915/guc: Add support for reset engine using GuC commands
In reply to Michel ThierryThis patch adds per engine reset and recovery (TDR) support when GuC is used to submit workloads to GPU.
In the case of i915 directly submission to ELSP, driver manages hang detection, recovery and resubmission. With GuC submission these tasks are shared between driver and GuC. i915 is still responsible for detecting a hang, and when it does it only requests GuC to reset that Engine. GuC internally manages acquiring forcewake and idling the engine before actually resetting it.
Once the reset is successful, i915 takes over again and handles resubmission. The scheduler in i915 knows which requests are pending so after resetting a engine, pending workloads/requests are resubmitted again.
v2: s/i915_guc_request_engine_reset/i915_guc_reset_engine/ to match the non-guc funtion names.
v3: Removed debug message about engine restarting from which request, since the new baseline do it regardless of submission mode. (Chris)
--- drivers/gpu/drm/i915/i915_drv.c | 24 +++++++++++---- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 48 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_fwif.h | 6 ++++ drivers/gpu/drm/i915/intel_uc.h | 1 + drivers/gpu/drm/i915/intel_uncore.c | 5 ---- 6 files changed, 75 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +19 -5
@@ -1940,11 +1940,21 @@ int i915_reset_engine(struct intel_engine_cs *engine)*/ i915_gem_reset_engine (engine, active_request); -/* finally, reset engine */ - ret =intel_gpu_reset (dev_priv,intel_engine_flag (engine)); -if (ret) { -DRM_ERROR ("Failed to reset %s, ret=%d\n" , engine->name, ret); - goto out; +if (!dev_priv->guc.execbuf_client) { +/* finally, reset engine */ + ret =intel_gpu_reset (dev_priv,intel_engine_flag (engine)); +if (ret) { +DRM_ERROR ("Failed to reset %s, ret=%d\n" , + engine->name, ret); + goto out; + } + }else { + ret =i915_guc_reset_engine (engine); +if (ret) { +DRM_ERROR ("GuC failed to reset %s, ret=%d\n" , + engine->name, ret); + goto out; + } }i915_gem_reset_finish_engine (engine);
@@ -1958,6 +1968,10 @@ int i915_reset_engine(struct intel_engine_cs *engine)if (ret) goto out; +/* for guc too */ +if (dev_priv->guc.execbuf_client) +i915_guc_submission_reenable_engine (engine); + error->reset_engine_count[engine->id]++; out:return ret;
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -3105,6 +3105,7 @@ extern void i915_reset(struct drm_i915_private *dev_priv);extern int i915_reset_engine (struct intel_engine_cs *engine);extern bool intel_has_reset_engine (struct drm_i915_private *dev_priv);extern int intel_reset_guc (struct drm_i915_private *dev_priv); +extern int i915_guc_reset_engine (struct intel_engine_cs *engine);extern void intel_engine_init_hangcheck (struct intel_engine_cs *engine);extern void intel_hangcheck_init (struct drm_i915_private *dev_priv);extern unsigned long i915_chipset_val (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_guc_submission.c +48 -0
57 lines not on this page · raw message
drivers/gpu/drm/i915/intel_guc_fwif.h +6 -0
@@ -546,6 +546,7 @@ union guc_log_control {/* This Action will be programmed in C180 - SOFT_SCRATCH_O_REG */ enum intel_guc_action {INTEL_GUC_ACTION_DEFAULT =0x0 , +INTEL_GUC_ACTION_REQUEST_ENGINE_RESET =0x3 ,INTEL_GUC_ACTION_SAMPLE_FORCEWAKE =0x6 ,INTEL_GUC_ACTION_ALLOCATE_DOORBELL =0x10 ,INTEL_GUC_ACTION_DEALLOCATE_DOORBELL =0x20 ,
@@ -561,6 +562,11 @@ enum intel_guc_action { INTEL_GUC_ACTION_LIMIT }; +/* Reset engine options */ +enum action_engine_reset_options { +INTEL_GUC_RESET_OPTION_REPORT_AFFECTED_CONTEXTS =0x10 , +}; +/* * The GuC sends its response to a command by overwriting the * command in SS0. The response is distinguishable from a command
drivers/gpu/drm/i915/intel_uc.h +1 -0
@@ -250,6 +250,7 @@ int i915_guc_wq_reserve(struct drm_i915_gem_request *rq);void i915_guc_wq_unreserve (struct drm_i915_gem_request *request);void i915_guc_submission_disable (struct drm_i915_private *dev_priv);void i915_guc_submission_fini (struct drm_i915_private *dev_priv); +void i915_guc_submission_reenable_engine (struct intel_engine_cs *engine);struct i915_vma *intel_guc_allocate_vma (struct intel_guc *guc,u32 size);/* intel_guc_log.c */
drivers/gpu/drm/i915/intel_uncore.c +0 -5
@@ -1723,14 +1723,9 @@ bool intel_has_gpu_reset(struct drm_i915_private *dev_priv)return intel_get_gpu_reset (dev_priv) !=NULL ; } -/* -* When GuC submission is enabled, GuC manages ELSP and can initiate the -* engine reset too. For now, fall back to full GPU reset if it is enabled. -*/ bool intel_has_reset_engine (struct drm_i915_private *dev_priv) {return (dev_priv->info.has_reset_engine && - !dev_priv->guc.execbuf_client && i915.reset >=2 ); }
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 16/21 drm/i915: Watchdog timeout: Pass GuC shared data structure during param load
In reply to Michel ThierryFor watchdog / media reset, the firmware must know the address of the shared data page (the first page of the default context).
This information should be in DWORD 9 of the GUC_CTL structure.
v2: Use guc_ggtt_offset (Chris).
Store the ggtt offset of the default ctx as we needed for suspend/resume/reset (Daniele).
--- drivers/gpu/drm/i915/i915_guc_submission.c | 21 ++++++--------------- drivers/gpu/drm/i915/intel_guc_fwif.h | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 11 +++++++++++ drivers/gpu/drm/i915/intel_uc.h | 2 ++ 4 files changed, 20 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_guc_submission.c +6 -15
@@ -1388,7 +1388,6 @@ void i915_guc_submission_reenable_engine(struct intel_engine_cs *engine)int intel_guc_suspend (struct drm_i915_private *dev_priv) {struct intel_guc *guc = &dev_priv->guc; -struct i915_gem_context *ctx;u32 data[3 ];if (guc->fw.load_status !=INTEL_UC_FIRMWARE_SUCCESS )
@@ -1396,13 +1395,11 @@ int intel_guc_suspend(struct drm_i915_private *dev_priv)gen9_disable_guc_interrupts (dev_priv); - ctx = dev_priv->kernel_context; - data[0 ] =INTEL_GUC_ACTION_ENTER_S_STATE ;/* any value greater than GUC_POWER_D0 */ data[1 ] =GUC_POWER_D1 ; -/* first page is shared data with GuC */ - data[2 ] =guc_ggtt_offset (ctx->engine[RCS ].state); +/* first page of default ctx is shared data with GuC */ + data[2 ] = guc->shared_data_offset;return intel_guc_send (guc, data,ARRAY_SIZE (data)); }
@@ -1414,7 +1411,6 @@ int intel_guc_suspend(struct drm_i915_private *dev_priv)int intel_guc_resume (struct drm_i915_private *dev_priv) {struct intel_guc *guc = &dev_priv->guc; -struct i915_gem_context *ctx;u32 data[3 ];if (guc->fw.load_status !=INTEL_UC_FIRMWARE_SUCCESS )
@@ -1423,12 +1419,10 @@ int intel_guc_resume(struct drm_i915_private *dev_priv)if (i915.guc_log_level >=0 )gen9_enable_guc_interrupts (dev_priv); - ctx = dev_priv->kernel_context; - data[0 ] =INTEL_GUC_ACTION_EXIT_S_STATE ; data[1 ] =GUC_POWER_D0 ; -/* first page is shared data with GuC */ - data[2 ] =guc_ggtt_offset (ctx->engine[RCS ].state); +/* first page of default ctx is shared data with GuC */ + data[2 ] = guc->shared_data_offset;return intel_guc_send (guc, data,ARRAY_SIZE (data)); }
@@ -1437,14 +1431,11 @@ int i915_guc_reset_engine(struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915;struct intel_guc *guc = &dev_priv->guc; -struct i915_gem_context *ctx;u32 data[7 ];if (!i915.enable_guc_submission)return 0 ; - ctx = dev_priv->kernel_context; -/* * The affected context report is populated by GuC and is provided * to the driver using the shared page. We request for it but don't
@@ -1456,8 +1447,8 @@ int i915_guc_reset_engine(struct intel_engine_cs *engine) data[3 ] =0 ; data[4 ] =0 ; data[5 ] = guc->execbuf_client->stage_id; -/* first page is shared data with GuC */ - data[6 ] =guc_ggtt_offset (ctx->engine[RCS ].state); +/* first page of default ctx is shared data with GuC */ + data[6 ] = guc->shared_data_offset;return intel_guc_send (guc, data,ARRAY_SIZE (data)); }
drivers/gpu/drm/i915/intel_guc_fwif.h +1 -1
@@ -135,7 +135,7 @@#define GUC_ADS_ADDR_SHIFT 11#define GUC_ADS_ADDR_MASK 0xfffff800 -#define GUC_CTL_RSRVD 9 +#define GUC_CTL_SHARED_DATA 9#define GUC_CTL_MAX_DWORDS (SOFT_SCRATCH_COUNT - 2)/* [1..14] */
drivers/gpu/drm/i915/intel_guc_loader.c +11 -0
@@ -108,6 +108,7 @@ static void guc_params_init(struct drm_i915_private *dev_priv) {struct intel_guc *guc = &dev_priv->guc;u32 params[GUC_CTL_MAX_DWORDS ]; +struct i915_gem_context *ctx;int i;memset (¶ms,0 ,sizeof (params));
@@ -156,6 +157,16 @@ static void guc_params_init(struct drm_i915_private *dev_priv) params[GUC_CTL_FEATURE ] &= ~GUC_CTL_DISABLE_SCHEDULER ; } +/* +* For watchdog / media reset, GuC must know the address of the shared +* data page, which is the first page of the default context. +* We will also use this page in several places (suspend/resume/reset), +* so save the ggtt offset. +*/ + ctx = dev_priv->kernel_context; + guc->shared_data_offset =guc_ggtt_offset (ctx->engine[RCS ].state); + params[GUC_CTL_SHARED_DATA ] = guc->shared_data_offset; +I915_WRITE (SOFT_SCRATCH (0 ),0 );for (i =0 ; i <GUC_CTL_MAX_DWORDS ; i++)
drivers/gpu/drm/i915/intel_uc.h +2 -0
@@ -191,6 +191,8 @@ struct intel_guc {DECLARE_BITMAP (doorbell_bitmap,GUC_NUM_DOORBELLS );uint32_t db_cacheline;/* Cyclic counter mod pagesize */ +uint32_t shared_data_offset;/* First page of default ctx */ +/* GuC's FW specific registers used in MMIO send */ struct {u32 base;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 17/21 drm/i915: Watchdog timeout: IRQ handler for gen8+
In reply to Michel Thierry*** General ***
Watchdog timeout (or "media engine reset") is a feature that allows userland applications to enable hang detection on individual batch buffers. The detection mechanism itself is mostly bound to the hardware and the only thing that the driver needs to do to support this form of hang detection is to implement the interrupt handling support as well as watchdog command emission before and after the emitted batch buffer start instruction in the ring buffer.
The principle of the hang detection mechanism is as follows:
1. Once the decision has been made to enable watchdog timeout for a particular batch buffer and the driver is in the process of emitting the batch buffer start instruction into the ring buffer it also emits a watchdog timer start instruction before and a watchdog timer cancellation instruction after the batch buffer start instruction in the ring buffer.
2. Once the GPU execution reaches the watchdog timer start instruction the hardware watchdog counter is started by the hardware. The counter keeps counting until either reaching a previously configured threshold value or the timer cancellation instruction is executed.
2a. If the counter reaches the threshold value the hardware fires a watchdog interrupt that is picked up by the watchdog interrupt handler. This means that a hang has been detected and the driver needs to deal with it the same way it would deal with a engine hang detected by the periodic hang checker. The only difference between the two is that we already blamed the active request (to ensure an engine reset).
2b. If the batch buffer completes and the execution reaches the watchdog cancellation instruction before the watchdog counter reaches its threshold value the watchdog is cancelled and nothing more comes of it. No hang is detected.
Note about future interaction with preemption: Preemption could happen in a command sequence prior to watchdog counter getting disabled, resulting in watchdog being triggered following preemption (e.g. when watchdog had been enabled in the low priority batch). The driver will need to explicitly disable the watchdog counter as part of the preemption sequence.
*** This patch introduces: ***
1. IRQ handler code for watchdog timeout allowing direct hang recovery based on hardware-driven hang detection, which then integrates directly with the hang recovery path. This is independent of having per-engine reset or just full gpu reset.
2. Watchdog specific register information.
Currently the render engine and all available media engines support watchdog timeout (VECS is only supported in GEN9). The specifications elude to the BCS engine being supported but that is currently not supported by this commit.
Note that the value to stop the counter is different between render and non-render engines in GEN8; GEN9 onwards it's the same.
v2: Move irq handler to tasklet, arm watchdog for a 2nd time to check against false-positives.
v3: Don't use high priority tasklet, use engine_last_submit while checking for false-positives. From GEN9 onwards, the stop counter bit is the same for all engines.
v4: Remove unnecessary brackets, use current_seqno to mark the request as guilty in the hangcheck/capture code.
v5: Rebased after RESET_ENGINEs flag.
v6: Don't capture error state in case of watchdog timeout. The capture process is time consuming and this will align to what happens when we use GuC to handle the watchdog timeout. (Chris)
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_irq.c | 19 +++++++-- drivers/gpu/drm/i915/i915_reg.h | 6 +++ drivers/gpu/drm/i915/intel_hangcheck.c | 13 +++++-- drivers/gpu/drm/i915/intel_lrc.c | 69 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++ 6 files changed, 108 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +4 -0
@@ -1550,6 +1550,9 @@ struct i915_gpu_error {* inspect the bit and do the reset directly, otherwise the worker * waits for the struct_mutex. * +* #I915_RESET_WATCHDOG - When hw detects a hang before us, we can use +* I915_RESET_WATCHDOG to report the hang detection cause accurately. +* * #I915_RESET_ENGINE[num_engines] - Since the driver doesn't need to * acquire the struct_mutex to reset an engine, we need an explicit * flag to prevent two concurrent reset attempts in the same engine.
@@ -1564,6 +1567,7 @@ struct i915_gpu_error {unsigned long flags;#define I915_RESET_BACKOFF 0#define I915_RESET_HANDOFF 1 +#define I915_RESET_WATCHDOG 2#define I915_WEDGED (BITS_PER_LONG - 1)#define I915_RESET_ENGINE (I915_WEDGED - I915_NUM_ENGINES)
drivers/gpu/drm/i915/i915_irq.c +16 -3
@@ -1336,6 +1336,9 @@ gen8_cs_irq_handler(struct intel_engine_cs *engine, u32 iir, int test_shift)if (tasklet)tasklet_hi_schedule (&engine->irq_tasklet); + +if (iir & (GT_GEN8_WATCHDOG_INTERRUPT << test_shift)) +tasklet_schedule (&engine->watchdog_tasklet); } static irqreturn_t gen8_gt_irq_ack(struct drm_i915_private *dev_priv,
@@ -2740,7 +2743,10 @@ void i915_handle_error(struct drm_i915_private *dev_priv,*/ intel_runtime_pm_get (dev_priv); -i915_capture_error_state (dev_priv, engine_mask, error_msg); +if (strstr (error_msg,"Watchdog timeout" )) +DRM_INFO ("%s" , error_msg); +else +i915_capture_error_state (dev_priv, engine_mask, error_msg);i915_clear_error_registers (dev_priv);if (!engine_mask)
@@ -2752,7 +2758,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,*/ if (intel_has_reset_engine (dev_priv)) {for_each_engine_masked (engine, dev_priv, engine_mask, tmp) { -BUILD_BUG_ON (I915_RESET_HANDOFF >=I915_RESET_ENGINE ); +BUILD_BUG_ON (I915_RESET_WATCHDOG >=I915_RESET_ENGINE );if (test_and_set_bit (I915_RESET_ENGINE + engine->id, &dev_priv->gpu_error.flags))continue ;
@@ -3437,12 +3443,15 @@ static void gen8_gt_irq_postinstall(struct drm_i915_private *dev_priv)uint32_t gt_interrupts[] = {GT_RENDER_USER_INTERRUPT <<GEN8_RCS_IRQ_SHIFT |GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_RCS_IRQ_SHIFT | +GT_GEN8_WATCHDOG_INTERRUPT <<GEN8_RCS_IRQ_SHIFT |GT_RENDER_USER_INTERRUPT <<GEN8_BCS_IRQ_SHIFT |GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_BCS_IRQ_SHIFT ,GT_RENDER_USER_INTERRUPT <<GEN8_VCS1_IRQ_SHIFT |GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_VCS1_IRQ_SHIFT | +GT_GEN8_WATCHDOG_INTERRUPT <<GEN8_VCS1_IRQ_SHIFT |GT_RENDER_USER_INTERRUPT <<GEN8_VCS2_IRQ_SHIFT | -GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_VCS2_IRQ_SHIFT , +GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_VCS2_IRQ_SHIFT | +GT_GEN8_WATCHDOG_INTERRUPT <<GEN8_VCS2_IRQ_SHIFT ,0 ,GT_RENDER_USER_INTERRUPT <<GEN8_VECS_IRQ_SHIFT |GT_CONTEXT_SWITCH_INTERRUPT <<GEN8_VECS_IRQ_SHIFT
@@ -3451,6 +3460,10 @@ static void gen8_gt_irq_postinstall(struct drm_i915_private *dev_priv)if (HAS_L3_DPF (dev_priv)) gt_interrupts[0 ] |=GT_RENDER_L3_PARITY_ERROR_INTERRUPT ; +/* VECS watchdog is only available in skl+ */ +if (INTEL_GEN (dev_priv) >=9 ) + gt_interrupts[3 ] |=GT_GEN8_WATCHDOG_INTERRUPT ; + dev_priv->pm_ier =0x0 ; dev_priv->pm_imr = ~dev_priv->pm_ier;GEN8_IRQ_INIT_NDX (GT ,0 , ~gt_interrupts[0 ], gt_interrupts[0 ]);
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -2096,6 +2096,11 @@ enum skl_disp_power_wells {#define RING_START (base) _MMIO((base)+0x38)#define RING_CTL (base) _MMIO((base)+0x3c)#define RING_CTL_SIZE (size) ((size) - PAGE_SIZE)/* in bytes -> pages */ +#define RING_CNTR (base) _MMIO((base) + 0x178) +#define GEN8_WATCHDOG_ENABLE 0 +#define GEN8_WATCHDOG_DISABLE 1 +#define GEN8_XCS_WATCHDOG_DISABLE 0xFFFFFFFF/* GEN8 & non-render only */ +#define RING_THRESH (base) _MMIO((base) + 0x17C)#define RING_SYNC_0 (base) _MMIO((base)+0x40)#define RING_SYNC_1 (base) _MMIO((base)+0x44)#define RING_SYNC_2 (base) _MMIO((base)+0x48)
@@ -2577,6 +2582,7 @@ enum skl_disp_power_wells {#define GT_BSD_USER_INTERRUPT (1 << 12)#define GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 (1 << 11)/* hsw+; rsvd on snb, ivb, vlv */ #define GT_CONTEXT_SWITCH_INTERRUPT (1 << 8) +#define GT_GEN8_WATCHDOG_INTERRUPT (1 << 6)/* gen8+ */ #define GT_RENDER_L3_PARITY_ERROR_INTERRUPT (1 << 5)/* !snb */ #define GT_RENDER_PIPECTL_NOTIFY_INTERRUPT (1 << 4)#define GT_RENDER_CS_MASTER_ERROR_INTERRUPT (1 << 3)
drivers/gpu/drm/i915/intel_hangcheck.c +9 -4
@@ -388,7 +388,8 @@ static void hangcheck_accumulate_sample(struct intel_engine_cs *engine,static void hangcheck_declare_hang (struct drm_i915_private *i915,unsigned int hung, -unsigned int stuck) +unsigned int stuck, +unsigned int watchdog) {struct intel_engine_cs *engine;char msg[80 ];
@@ -401,7 +402,8 @@ static void hangcheck_declare_hang(struct drm_i915_private *i915,if (stuck != hung) hung &= ~stuck; len =scnprintf (msg,sizeof (msg), -"%s on " , stuck == hung ?"No progress" :"Hang" ); +"%s on " , watchdog ?"Watchdog timeout" : + stuck == hung ?"No progress" :"Hang" );for_each_engine_masked (engine, i915, hung, tmp) len +=scnprintf (msg + len,sizeof (msg) - len,"%s, " , engine->name);
@@ -425,7 +427,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work) gpu_error.hangcheck_work.work);struct intel_engine_cs *engine;enum intel_engine_id id; -unsigned int hung =0 , stuck =0 ; +unsigned int hung =0 , stuck =0 , watchdog =0 ;int busy_count =0 ;if (!i915.enable_hangcheck)
@@ -437,6 +439,9 @@ static void i915_hangcheck_elapsed(struct work_struct *work)if (i915_terminally_wedged (&dev_priv->gpu_error))return ; +if (test_and_clear_bit (I915_RESET_WATCHDOG , &dev_priv->gpu_error.flags)) + watchdog =1 ; +/* As enabling the GPU requires fairly extensive mmio access, * periodically arm the mmio checker to see if we are triggering * any invalid access.
@@ -463,7 +468,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work) }if (hung) -hangcheck_declare_hang (dev_priv, hung, stuck); +hangcheck_declare_hang (dev_priv, hung, stuck, watchdog);/* Reset timer in case GPU hangs without another request being added */ if (busy_count)
drivers/gpu/drm/i915/intel_lrc.c +69 -0
93 lines not on this page · raw message
drivers/gpu/drm/i915/intel_ringbuffer.h +4 -0
@@ -117,6 +117,7 @@ struct intel_instdone {struct intel_engine_hangcheck {u64 acthd;u32 seqno; +u32 watchdog;enum intel_engine_hangcheck_action action;unsigned long action_timestamp;int deadlock;
@@ -416,6 +417,9 @@ struct intel_engine_cs {struct intel_engine_hangcheck hangcheck; +/* watchdog_tasklet: stop counter and re-schedule hangcheck_work asap */ +struct tasklet_struct watchdog_tasklet; +bool needs_cmd_parser;/*
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 18/21 drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+
In reply to Michel ThierryEmit the required commands into the ring buffer for starting and stopping the watchdog timer before/after batch buffer start during batch buffer submission.
v2: Support watchdog threshold per context engine, merge lri commands, and move watchdog commands emission to emit_bb_start. Request space of combined start_watchdog, bb_start and stop_watchdog to avoid any error after emitting bb_start.
v3: There were too many req->engine in emit_bb_start.
Use GEM_BUG_ON instead of returning a very late EINVAL in the remote case of watchdog misprogramming; set correct LRI cmd size in emit_stop_watchdog. (Chris)
--- drivers/gpu/drm/i915/i915_gem_context.h | 4 ++ drivers/gpu/drm/i915/intel_lrc.c | 85 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++ 3 files changed, 89 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_gem_context.h +4 -0
@@ -150,6 +150,10 @@ struct i915_gem_context {u32 *lrc_reg_state;u64 lrc_desc;int pin_count; +/** watchdog_threshold: hw watchdog threshold value, +* in clock counts +*/ +u32 watchdog_threshold;bool initialised; } engine[I915_NUM_ENGINES ];
drivers/gpu/drm/i915/intel_lrc.c +81 -4
134 lines not on this page · raw message
drivers/gpu/drm/i915/intel_ringbuffer.h +4 -0
@@ -277,6 +277,10 @@ struct intel_engine_cs {int (*emit_flush)(struct drm_i915_gem_request *request,u32 mode); +u32 * (*emit_start_watchdog)(struct drm_i915_gem_request *req, +u32 *cs); +u32 * (*emit_stop_watchdog)(struct drm_i915_gem_request *req, +u32 *cs);#define EMIT_INVALIDATE BIT(0)#define EMIT_FLUSH BIT(1)#define EMIT_BARRIER (EMIT_INVALIDATE | EMIT_FLUSH)
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 19/21 drm/i915: Watchdog timeout: DRM kernel interface to set the timeout
In reply to Michel ThierryFinal enablement patch for GPU hang detection using watchdog timeout. Using the gem_context_setparam ioctl, users can specify the desired timeout value in microseconds, and the driver will do the conversion to 'timestamps'.
The recommended default watchdog threshold for video engines is 60000 us, since this has been _empirically determined_ to be a good compromise for low-latency requirements and low rate of false positives. The default register value is ~106000us and the theoretical max value (all 1s) is 353 seconds.
Note, UABI engine ids and i915 engine ids are different, and this patch uses the i915 ones. Some kind of mapping table [1] is required if we decide to use the UABI engine ids.
[1] http://patchwork.freedesktop.org/patch/msgid/[email protected]
v2: Fixed get api to return values in microseconds. Threshold updated to be per context engine. Check for u32 overflow. Capture ctx threshold value in error state.
v3: Add a way to get array size, short-cut to disable all thresholds, return EFAULT / EINVAL as needed. Move the capture of the threshold value in the error state into a new patch. BXT has a different timestamp base (because why not?).
v4: Checking if watchdog is available should be the first thing to do, instead of giving false hopes to abi users; remove unnecessary & in set_watchdog; ignore args->size in getparam.
v5: GEN9-LP platforms have a different crystal clock frequency, use the right timestamp base for them (magic 8-ball predicts this will change again later on, so future-proof it). (Daniele)
--- drivers/gpu/drm/i915/i915_drv.h | 56 +++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_context.c | 95 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 5 +- include/uapi/drm/i915_drm.h | 1 + 4 files changed, 155 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +56 -0
@@ -2196,6 +2196,9 @@ struct drm_i915_private {struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES ];/* assume 965 */ int num_fence_regs;/* 8 on pre-965, 16 otherwise */ +/* Command stream timestamp base - helps define watchdog threshold */ +u32 cs_timestamp_base; +unsigned int fsb_freq, mem_freq, is_ddr3;unsigned int skl_preferred_vco_freq;unsigned int max_cdclk_freq;
@@ -3605,6 +3608,59 @@ i915_gem_context_lookup_timeline(struct i915_gem_context *ctx,return &vm->timeline.engine[engine->id]; } +/* +* BDW, CHV & SKL+ Timestamp timer resolution = 0.080 uSec, +* or 12500000 counts per second, or ~12 counts per microsecond. +* +* But BXT/GLK Timestamp timer resolution is different, 0.052 uSec, +* or 19200000 counts per second, or ~19 counts per microsecond. +* +* Future-proofing, some day it won't be as simple as just GEN & IS_LP. +*/ +#define GEN8_TIMESTAMP_CNTS_PER_USEC 12 +#define GEN9_LP_TIMESTAMP_CNTS_PER_USEC 19 +static inline u32 cs_timestamp_in_us (struct drm_i915_private *dev_priv) +{ +u32 cs_timestamp_base = dev_priv->cs_timestamp_base; + +if (cs_timestamp_base) +return cs_timestamp_base; + +switch (INTEL_GEN (dev_priv)) { +default : +MISSING_CASE (INTEL_GEN (dev_priv)); +/* fall through */ +case 9 : + cs_timestamp_base =IS_GEN9_LP (dev_priv) ? +GEN9_LP_TIMESTAMP_CNTS_PER_USEC : +GEN8_TIMESTAMP_CNTS_PER_USEC ; +break ; +case 8 : + cs_timestamp_base =GEN8_TIMESTAMP_CNTS_PER_USEC ; +break ; + } + + dev_priv->cs_timestamp_base = cs_timestamp_base; +return cs_timestamp_base; +} + +static inline u32 +watchdog_to_us (struct drm_i915_private *dev_priv,u32 value_in_clock_counts) +{ +return value_in_clock_counts /cs_timestamp_in_us (dev_priv); +} + +static inline u32 +watchdog_to_clock_counts (struct drm_i915_private *dev_priv,u64 value_in_us) +{ +u64 threshold = value_in_us *cs_timestamp_in_us (dev_priv); + +if (overflows_type (threshold, u32)) +return -EINVAL ; + +return threshold; +} +int i915_perf_open_ioctl (struct drm_device *dev,void *data,struct drm_file *file); void i915_oa_init_reg_state(struct intel_engine_cs *engine,
drivers/gpu/drm/i915/i915_gem_context.c +95 -0
113 lines not on this page · raw message
drivers/gpu/drm/i915/intel_lrc.c +3 -2
@@ -1574,7 +1574,7 @@ static inline u32 get_watchdog_disable(struct intel_engine_cs *engine)return GEN8_XCS_WATCHDOG_DISABLE ; } -#define GEN8_WATCHDOG_1000US 0x2ee0 //XXX: Temp, replace with helper function +#define GEN8_WATCHDOG_1000US (dev_priv) watchdog_to_clock_counts(dev_priv, 1000)static void gen8_watchdog_irq_handler (unsigned long data) {struct intel_engine_cs *engine = (struct intel_engine_cs *)data;
@@ -1604,7 +1604,8 @@ static void gen8_watchdog_irq_handler(unsigned long data) }else { engine->hangcheck.watchdog = current_seqno;/* Re-start the counter, if really hung, it will expire again */ -I915_WRITE_FW (RING_THRESH (engine->mmio_base),GEN8_WATCHDOG_1000US ); +I915_WRITE_FW (RING_THRESH (engine->mmio_base), +GEN8_WATCHDOG_1000US (dev_priv));I915_WRITE_FW (RING_CNTR (engine->mmio_base),GEN8_WATCHDOG_ENABLE ); }
include/uapi/drm/i915_drm.h +1 -0
@@ -1316,6 +1316,7 @@ struct drm_i915_gem_context_param {#define I915_CONTEXT_PARAM_GTT_SIZE 0x3#define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4#define I915_CONTEXT_PARAM_BANNABLE 0x5 +#define I915_CONTEXT_PARAM_WATCHDOG 0x6__u64 value; };
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 20/21 drm/i915: Watchdog timeout: Include threshold value in error state
In reply to Michel ThierrySave the watchdog threshold (in us) as part of the engine state.
v2: Only do it for gen8+ (and prevent a missing-case warn).
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -963,6 +963,7 @@ struct i915_gpu_state {int ban_score;int active;int guilty; +int watchdog_threshold; } context;struct drm_i915_error_object {
drivers/gpu/drm/i915/i915_gpu_error.c +8 -4
@@ -388,9 +388,11 @@ static void error_print_context(struct drm_i915_error_state_buf *m, const char *header, const struct drm_i915_error_context *ctx) { - err_printf(m, "%s%s[%d] user_handle %d hw_id %d, ban score %d guilty %d active %d\n", + err_printf(m, "%s%s[%d] user_handle %d hw_id %d, ban score %d guilty %d active %d, watchdog %dus\n", header, ctx->comm, ctx->pid, ctx->handle, ctx->hw_id, - ctx->ban_score, ctx->guilty, ctx->active); + ctx->ban_score, ctx->guilty, ctx->active, +INTEL_GEN (m->i915) >=8 ? + watchdog_to_us(m->i915, ctx->watchdog_threshold) : 0); } static void error_print_engine(struct drm_i915_error_state_buf *m,
@@ -1349,7 +1351,8 @@ static void error_record_engine_execlists(struct intel_engine_cs *engine, }static void record_context (struct drm_i915_error_context *e, -struct i915_gem_context *ctx) +struct i915_gem_context *ctx, +u32 engine_id) {if (ctx->pid) {struct task_struct *task;
@@ -1368,6 +1371,7 @@ static void record_context(struct drm_i915_error_context *e, e->ban_score = ctx->ban_score; e->guilty = ctx->guilty_count; e->active = ctx->active_count; + e->watchdog_threshold = ctx->engine[engine_id].watchdog_threshold; } static void request_record_user_bo(struct drm_i915_gem_request *request,
@@ -1431,7 +1435,7 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv, ee->vm = request->ctx->ppgtt ? &request->ctx->ppgtt->base : &ggtt->base; -record_context (&ee->context, request->ctx); +record_context (&ee->context, request->ctx, engine->id);/* We need to copy these to an anonymous buffer * as the simplest method to avoid being overwritten
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v9 21/21 drm/i915: Watchdog timeout: Export media reset count from GuC to debugfs
In reply to Michel ThierryFrom firmware v8.8, GuC provides the count of media engine resets (watchdog timeout). This information is available in the GuC shared context data struct, which resides in the first page of the default (kernel) lrc context.
Since GuC handled engine resets are transparent for kernel and user, provide a simple debugfs entry to see the number of times media reset has happened.
v2: Remove unnecessary struct_mutex, _get_dirty_page and kmap_atomic; use READ_ONCE. (Chris)
--- drivers/gpu/drm/i915/i915_debugfs.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_fwif.h | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +22 -0
@@ -1403,6 +1403,26 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)return 0 ; } +static u32 i915_watchdog_reset_count (struct drm_i915_private *dev_priv) +{ +struct i915_gem_context *ctx; +struct page *page; +struct guc_shared_ctx_data *guc_shared_data; +u32 guc_media_reset_count; + +if (!i915.enable_guc_submission) +return 0 ; + + ctx = dev_priv->kernel_context; + page =i915_gem_object_get_page (ctx->engine[RCS ].state->obj, +LRC_GUCSHR_PN ); + guc_shared_data =kmap (page); + guc_media_reset_count =READ_ONCE (guc_shared_data->media_reset_count); +kunmap (page); + +return guc_media_reset_count; +} +static int i915_reset_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);
@@ -1411,6 +1431,8 @@ static int i915_reset_info(struct seq_file *m, void *unused)enum intel_engine_id id;seq_printf (m,"full gpu reset = %u\n" ,i915_reset_count (error)); +seq_printf (m,"GuC watchdog/media reset = %u\n" , +i915_watchdog_reset_count (dev_priv));for_each_engine (engine, dev_priv, id) { seq_printf(m, "%s = %u\n", engine->name,
drivers/gpu/drm/i915/intel_guc_fwif.h +18 -0
@@ -543,6 +543,24 @@ union guc_log_control {u32 value; } __packed; +/* GuC Shared Context Data Struct */ +struct guc_shared_ctx_data { +u32 addr_of_last_preempted_data_low; +u32 addr_of_last_preempted_data_high; +u32 addr_of_last_preempted_data_high_tmp; +u32 padding; +u32 is_mapped_to_proxy; +u32 proxy_ctx_id; +u32 engine_reset_ctx_id; +u32 media_reset_count; +u32 reserved[8 ]; +u32 uk_last_ctx_switch_reason; +u32 was_reset; +u32 lrca_gpu_addr; +u32 execlist_ctx; +u32 reserved1[32 ]; +} __packed; +/* This Action will be programmed in C180 - SOFT_SCRATCH_O_REG */ enum intel_guc_action {INTEL_GUC_ACTION_DEFAULT =0x0 ,
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Gen8+ engine-reset (rev13)
In reply to Michel Thierry== Series Details ==
== Series Details ==
Series: Gen8+ engine-reset (rev13)
URL : https://patchwork.freedesktop.org/series/21868/
State : success
== Summary ==
Series 21868v13 Gen8+ engine-reset
https://patchwork.freedesktop.org/api/1.0/series/21868/revisions/13/mbox/
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:469s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:485s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:584s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:553s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:494s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:498s fi-glk-2a total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:588s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:435s fi-hsw-4770r total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:16 time:420s fi-ilk-650 total:278 pass:227 dwarn:0 dfail:0 fail:0 skip:50 time:466s fi-ivb-3520m total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:18 time:498s fi-ivb-3770 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:18 time:514s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:474s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:569s fi-kbl-r total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 time:584s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:488s fi-skl-6700hq total:278 pass:228 dwarn:1 dfail:0 fail:27 skip:22 time:452s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:516s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:501s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:511s fi-snb-2520m total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:28 time:628s fi-snb-2600 total:278 pass:247 dwarn:0 dfail:0 fail:1 skip:29 time:403s
467eb330a8121f66d7a8aa7a37991ab24f11aedc drm-tip: 2017y-06m-15d-20h-00m-09s UTC integration manifest e4f78c7 drm/i915: Watchdog timeout: Export media reset count from GuC to debugfs f3f25d0 drm/i915: Watchdog timeout: Include threshold value in error state
3a8730e drm/i915: Watchdog timeout: DRM kernel interface to set the timeout
678d01b drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+
69362be drm/i915: Watchdog timeout: IRQ handler for gen8+
c3d23a4 drm/i915: Watchdog timeout: Pass GuC shared data structure during param load 67b9619 drm/i915/guc: Add support for reset engine using GuC commands
7dbc199 drm/i915/guc: Rename the function that resets the GuC
a24f86f drm/i915/guc: Provide register list to be saved/restored during engine reset c089e05 drm/i915/guc: fix mmio whitelist mmio_start offset and add reminder
206cc32 drm/i915/selftests: reset engine self tests
8697b3e drm/i915: Add engine reset count in get-reset-stats ioctl
95eb905 drm/i915: Enable Engine reset and recovery support
f8bcd30 drm/i915: Carry on with reset even if hw engine is not ready
7f5adfe drm/i915: Export per-engine reset count info to debugfs
975f351 drm/i915: Add engine reset count to error state
7019293 drm/i915: Add support for per engine reset recovery
23f6937 drm/i915: Include reset engine information in has_gpu_reset getparam
fce2787 drm/i915: Modify error handler for per engine hang recovery
fb6a802 drm/i915: Update i915.reset to handle engine resetsb0feb0ba drm/i915: Look for active requests earlier in the reset path
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4963/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx