Skip to content

Commit

Permalink
drm/i915/selftests: Avoid warning if runtime pm is disabled
Browse files Browse the repository at this point in the history
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 <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180706205947.11209-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jul 6, 2018
1 parent 3a32497 commit 07e070e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/selftests/mock_gem_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 07e070e

Please sign in to comment.