drm/i915: Cancel hangcheck before GPU is suspended
Subsystems (2)
Joonas Lahtinen
maintainerPATCH 1/1 drm/i915: Cancel hangcheck before GPU is suspended
In order to avoid accessing GPU registers while GPU is suspended cancel the hangcheck work before calling intel_suspend_complete which actually puts the GPU to suspend. Otherwise hangcheck might do MMIO reads to a suspended GPU.
Placement before intel_guc_suspend is imitated from i915_drm_suspend which cancels the work at i915_gem_suspend, to keep the functions similar.
On VLV systems, namely BYT, this was causing an error during runtime suspend cycle:
[drm:vlv_check_no_gt_access [i915]] *ERROR* GT register access while GT waking disabled
Testcase: igt/pm_rpm/basic-rte
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93121
--- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +2 -1
@@ -1462,6 +1462,8 @@ static int intel_runtime_suspend(struct device *device)i915_gem_release_all_mmaps (dev_priv);mutex_unlock (&dev->struct_mutex); +cancel_delayed_work_sync (&dev_priv->gpu_error.hangcheck_work); +intel_guc_suspend (dev);intel_suspend_gt_powersave (dev);
@@ -1475,7 +1477,6 @@ static int intel_runtime_suspend(struct device *device)return ret; } -cancel_delayed_work_sync (&dev_priv->gpu_error.hangcheck_work);intel_uncore_forcewake_reset (dev, false); dev_priv->pm.suspended = true;
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · Joonas Lahtinen
In order to avoid accessing GPU registers while GPU is suspended cancel
the hangcheck work before callingintel_suspend_completewhich actually
puts the GPU to suspend. Otherwise hangcheck might do MMIO reads to a suspended GPU.Placement before
intel_guc_suspendis imitated fromi915_drm_suspendwhich cancels the work ati915_gem_suspend, to keep the functions similar.On VLV systems, namely BYT, this was causing an error during runtime suspend cycle:
[drm:vlv_check_no_gt_access [i915]] *ERROR* GT register access while GT waking disabled
Quoted 6 lines
Testcase: igt/pm_rpm/basic-rte
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93121Signed-off-by Joonas Lahtinen <[email protected]>Cc Imre Deak <[email protected]>Cc Chris Wilson <[email protected]>
Yep, looks good to me:
Quoted 27 lines
---
drivers/gpu/drm/i915/i915_drv.c | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -1462,6 +1462,8 @@ static int intel_runtime_suspend(struct device *device) i915_gem_release_all_mmaps(dev_priv); mutex_unlock(&dev->struct_mutex);drivers/gpu/drm/i915/i915_drv.c +1
-0+ cancel_delayed_work_sync(&dev_priv-Quoted 1 line
gpu_error.hangcheck_work);
+
intel_guc_suspend(dev);
intel_suspend_gt_powersave(dev);drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -1475,7 +1477,6 @@ static int intel_runtime_suspend(struct device *device) return ret; }drivers/gpu/drm/i915/i915_drv.c +0
-1- cancel_delayed_work_sync(&dev_priv-Quoted 1 line
gpu_error.hangcheck_work);
Quoted 3 lines
intel_uncore_forcewake_reset(dev, false);
dev_priv->pm.suspended= true;
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson
Reviewed-byQuoted 21 lines · Imre Deak
Quoted 20 lines · Joonas Lahtinen
In order to avoid accessing GPU registers while GPU is suspended cancel
the hangcheck work before callingintel_suspend_completewhich actually
puts the GPU to suspend. Otherwise hangcheck might do MMIO reads to a suspended GPU.Placement before
intel_guc_suspendis imitated fromi915_drm_suspendwhich cancels the work ati915_gem_suspend, to keep the functions similar.On VLV systems, namely BYT, this was causing an error during runtime suspend cycle:
[drm:vlv_check_no_gt_access [i915]] *ERROR* GT register access while GT waking disabled
Testcase: igt/pm_rpm/basic-rte
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93121
Quoted 6 lines
Quoted 3 lines
Signed-off-by Joonas Lahtinen <[email protected]>Cc Imre Deak <[email protected]>Cc Chris Wilson <[email protected]>Yep, looks good to me:
Reviewed-by Imre Deak <[email protected]>
Well Imre also shotdown the simple tryget plan, so the only thing I can say is that I'd rather move the cancel_sync(hangcheck) out of the intel_runtime_suspend() into the mark_idle to match it's counterpart in mark_busy.
Patch in the post, so for now
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Imre Deak
AppliedQuoted 40 lines · Chris Wilson
Quoted 25 lines · Imre Deak
Quoted 24 lines · Joonas Lahtinen
In order to avoid accessing GPU registers while GPU is suspended cancel
the hangcheck work before callingintel_suspend_completewhich actually
puts the GPU to suspend. Otherwise hangcheck might do MMIO reads to a
suspended GPU.Placement before
intel_guc_suspendis imitated fromi915_drm_suspend
which cancels the work ati915_gem_suspend, to keep the functions similar.On VLV systems, namely BYT, this was causing an error during runtime
suspend cycle:[drm:vlv_check_no_gt_access [i915]] *ERROR* GT register access while
GT waking disabledTestcase: igt/pm_rpm/basic-rte
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93121Quoted 6 lines
Quoted 3 lines
Signed-off-by Joonas Lahtinen <[email protected]>Cc Imre Deak <[email protected]>Cc Chris Wilson <[email protected]>Yep, looks good to me:
Reviewed-by Imre Deak <[email protected]>Well Imre also shotdown the simple tryget plan, so the only thing I can
say is that I'd rather move thecancel_sync(hangcheck)out of theintel_runtime_suspend()into themark_idleto match it's counterpart inmark_busy.
Quoted 2 lines
Patch in the post, so for now
Reviewed-by Chris Wilson <[email protected]>
Pushed to dinq, thanks for the patch and review.
Quoted 2 lines
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx