[v9,04/21] drm/i915: Include reset engine information in has_gpu_reset getparam

Submitted by Michel Thierry on June 15, 2017, 8:18 p.m.

Details

Message ID 20170615201828.23144-5-michel.thierry@intel.com
State New
Headers show
Series "Gen8+ engine-reset" ( rev: 13 ) in Intel GFX

Browsing this patch as part of:
"Gen8+ engine-reset" rev 13 in Intel GFX
<< prev patch [4/21] next patch >>

Commit Message

Michel Thierry June 15, 2017, 8:18 p.m.
So users (tests) can detect which type of reset (engine vs global) is
active.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 5035375aa67e..e4c4bc41c378 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -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);