projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a32497
)
drm/i915/selftests: Avoid warning if runtime pm is disabled
author
Chris Wilson
<
[email protected]
>
Fri, 6 Jul 2018 20:59:47 +0000
(21:59 +0100)
committer
Chris Wilson
<
[email protected]
>
Fri, 6 Jul 2018 22:33:34 +0000
(23:33 +0100)
Inside the mock GEM device, we try to grab the runtime pm for the fake
device to prevent it from ever suspending. However, if CONFIG_PM is not
set, trying to obtain the wakref returns an error which we WARN about.
Suppress the expected warning.
Signed-off-by: Chris Wilson <
[email protected]
>
Reviewed-by: Rodrigo Vivi <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/selftests/mock_gem_device.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index c97075c5ccafa3e23614cd98fb94e8a3d14560ca..43ed8b28aeaa0ce86c6162814b5b9f30ce981b70 100644
(file)
--- a/
drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/
drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@
-157,7
+157,8
@@
struct drm_i915_private *mock_gem_device(void)
dev_pm_domain_set(&pdev->dev, &pm_domain);
pm_runtime_enable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
- WARN_ON(pm_runtime_get_sync(&pdev->dev));
+ if (pm_runtime_enabled(&pdev->dev))
+ WARN_ON(pm_runtime_get_sync(&pdev->dev));
i915 = (struct drm_i915_private *)(pdev + 1);
pci_set_drvdata(pdev, i915);