drm/i915: WARN if the core runtime PM get helpers fail
Subsystems (2)
PATCH 1/1 drm/i915: WARN if the core runtime PM get helpers fail
We don't expect the core runtime PM get helpers to return any error, so add a WARN for this. Also print the return value for all the callsites to help debugging.
--- drivers/gpu/drm/i915/intel_runtime_pm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_runtime_pm.c +8 -3
@@ -2845,8 +2845,9 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv) {struct pci_dev *pdev = dev_priv->drm.pdev;struct device *kdev = &pdev->dev; +int ret =pm_runtime_get_sync (kdev); -pm_runtime_get_sync (kdev); +WARN_ONCE (ret <0 ,"pm_runtime_get_sync() failed: %d\n" , ret);atomic_inc (&dev_priv->pm.wakeref_count);assert_rpm_wakelock_held (dev_priv);
@@ -2876,7 +2877,8 @@ bool intel_runtime_pm_get_if_in_use(struct drm_i915_private *dev_priv)* function, since the power state is undefined. This applies * atm to the late/early system suspend/resume handlers. */ -WARN_ON_ONCE (ret <0 ); +WARN_ONCE (ret <0 , +"pm_runtime_get_if_in_use() failed: %d\n" , ret);if (ret <=0 )return false; }
@@ -2960,8 +2962,11 @@ void intel_runtime_pm_enable(struct drm_i915_private *dev_priv)* platforms without RPM support. */ if (!HAS_RUNTIME_PM (dev_priv)) { +int ret; +pm_runtime_dont_use_autosuspend (kdev); -pm_runtime_get_sync (kdev); + ret =pm_runtime_get_sync (kdev); +WARN (ret <0 ,"pm_runtime_get_sync() failed: %d\n" , ret); }else {pm_runtime_use_autosuspend (kdev); }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: WARN if the core runtime PM get helpers fail
== Series Details ==
== Series Details ==
Series: drm/i915: WARN if the core runtime PM get helpers fail
URL : https://patchwork.freedesktop.org/series/21997/
State : success
== Summary ==
Series 21997v1 drm/i915: WARN if the core runtime PM get helpers fail
https://patchwork.freedesktop.org/api/1.0/series/21997/revisions/1/mbox/
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 460s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time: 453s fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 582s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 545s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 575s fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 510s fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 509s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 442s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 432s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 443s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 518s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 515s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 485s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 598s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 475s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 603s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 485s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 527s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time: 457s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 549s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 417s
2b51c2073441cc5b3b18c7e0e8716cbf3736e873 drm-tip: 2017y-03m-28d-08h-54m-35s UTC integration manifest cb53f2d drm/i915: WARN if the core runtime PM get helpers fail
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4323/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✓ Fi.CI.BAT: success for drm/i915: WARN if the core runtime PM get helpers fail
Quoted 10 lines · Patchwork
== Series Details ==
Series: drm/i915: WARN if the core runtime PM get helpers fail
URL : https://patchwork.freedesktop.org/series/21997/
State : success== Summary ==
Series 21997v1 drm/i915: WARN if the core runtime PM get helpers fail
https://patchwork.freedesktop.org/api/1.0/series/21997/revisions/1/mbox/
Thanks for the review, I pushed the patch with the tweak.
--Imre
Quoted 23 lines
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 460s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time: 453s fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 582s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 545s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 575s fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 510s fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 509s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 442s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 432s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 443s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 518s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 515s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 485s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 598s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 475s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 603s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 485s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 527s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time: 457s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 549s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 417s
Quoted 6 lines
2b51c2073441cc5b3b18c7e0e8716cbf3736e873drm-tip: 2017y-03m-28d-08h-54m-35s UTC integration manifest cb53f2d drm/i915: WARN if the core runtime PM get helpers fail== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4323/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 14 lines · Imre Deak
We don't expect the core runtime PM get helpers to return any error, so add a WARN for this. Also print the return value for all the callsites to help debugging.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/intel_runtime_pm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_runtime_pm.c +0
-0
drivers/gpu/drm/i915/intel_runtime_pm.c void intel_runtime_pm_get(struct drm_i915_private *dev_priv) · line 2848
Quoted 4 lines
drivers/gpu/drm/i915/intel_runtime_pm.c +1
-0@@ -2845,8 +2845,9 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv) {struct pci_dev *pdev = dev_priv->drm.pdev;struct device *kdev = &pdev->dev; +int ret =pm_runtime_get_sync (kdev);
Only don't hide this in the locals block. This is the most important step of the function, it should be clearly visible.
drivers/gpu/drm/i915/intel_runtime_pm.c void intel_runtime_pm_get(struct drm_i915_private *dev_priv) · line 2850
Quoted 2 lines
drivers/gpu/drm/i915/intel_runtime_pm.c +1
-1-pm_runtime_get_sync (kdev); +WARN_ONCE (ret <0 ,"pm_runtime_get_sync() failed: %d\n" , ret);
Ok, no error propagation, WARN makes sense. With the tweak above,
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Chris Wilson
Quoted 9 lines · Imre Deak
We don't expect the core runtime PM get helpers to return any error, so add a WARN for this. Also print the return value for all the callsites to help debugging.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/intel_runtime_pm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Quoted 12 lines
drivers/gpu/drm/i915/intel_runtime_pm.c void intel_runtime_pm_get(struct drm_i915_private *dev_priv) · line 2848
Quoted 9 lines
drivers/gpu/drm/i915/intel_runtime_pm.c +1
-0@@ -2845,8 +2845,9 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv) {struct pci_dev *pdev = dev_priv->drm.pdev;struct device *kdev = &pdev->dev; +int ret =pm_runtime_get_sync (kdev);Only don't hide this in the locals block. This is the most important step of the function, it should be clearly visible.
Ok, will change this.
Quoted 10 lines
drivers/gpu/drm/i915/intel_runtime_pm.c void intel_runtime_pm_get(struct drm_i915_private *dev_priv) · line 2850
Quoted 3 lines
drivers/gpu/drm/i915/intel_runtime_pm.c +1
-1-pm_runtime_get_sync (kdev); +WARN_ONCE (ret <0 ,"pm_runtime_get_sync() failed: %d\n" , ret);Ok, no error propagation, WARN makes sense. With the tweak above,
Reviewed-by Chris Wilson <[email protected]>-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx