提交 5b117056 编写于 作者: H Hsin-Yi Wang 提交者: Jani Nikula

drm/i915/selftests: Rename pm_ prefixed functions names

pm_resume and pm_suspend might be conflict with the ones defined in
include/linux/suspend.h. Rename all pm_* to igt_pm_* in selftests since
they are only used here.

v2 by Jani:
- Use igt_ prefix instead of i915_ to avoid colliding with existing
  i915_pm_* functions
- Rename all pm_ prefixed functions in the file
Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org>
Reported-by: Nkernel test robot <lkp@intel.com>
Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: NJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210420130853.10573-1-jani.nikula@intel.com
上级 a36a4749
...@@ -87,14 +87,14 @@ static void simulate_hibernate(struct drm_i915_private *i915) ...@@ -87,14 +87,14 @@ static void simulate_hibernate(struct drm_i915_private *i915)
intel_runtime_pm_put(&i915->runtime_pm, wakeref); intel_runtime_pm_put(&i915->runtime_pm, wakeref);
} }
static int pm_prepare(struct drm_i915_private *i915) static int igt_pm_prepare(struct drm_i915_private *i915)
{ {
i915_gem_suspend(i915); i915_gem_suspend(i915);
return 0; return 0;
} }
static void pm_suspend(struct drm_i915_private *i915) static void igt_pm_suspend(struct drm_i915_private *i915)
{ {
intel_wakeref_t wakeref; intel_wakeref_t wakeref;
...@@ -104,7 +104,7 @@ static void pm_suspend(struct drm_i915_private *i915) ...@@ -104,7 +104,7 @@ static void pm_suspend(struct drm_i915_private *i915)
} }
} }
static void pm_hibernate(struct drm_i915_private *i915) static void igt_pm_hibernate(struct drm_i915_private *i915)
{ {
intel_wakeref_t wakeref; intel_wakeref_t wakeref;
...@@ -116,7 +116,7 @@ static void pm_hibernate(struct drm_i915_private *i915) ...@@ -116,7 +116,7 @@ static void pm_hibernate(struct drm_i915_private *i915)
} }
} }
static void pm_resume(struct drm_i915_private *i915) static void igt_pm_resume(struct drm_i915_private *i915)
{ {
intel_wakeref_t wakeref; intel_wakeref_t wakeref;
...@@ -148,16 +148,16 @@ static int igt_gem_suspend(void *arg) ...@@ -148,16 +148,16 @@ static int igt_gem_suspend(void *arg)
if (err) if (err)
goto out; goto out;
err = pm_prepare(i915); err = igt_pm_prepare(i915);
if (err) if (err)
goto out; goto out;
pm_suspend(i915); igt_pm_suspend(i915);
/* Here be dragons! Note that with S3RST any S3 may become S4! */ /* Here be dragons! Note that with S3RST any S3 may become S4! */
simulate_hibernate(i915); simulate_hibernate(i915);
pm_resume(i915); igt_pm_resume(i915);
err = switch_to_context(ctx); err = switch_to_context(ctx);
out: out:
...@@ -183,16 +183,16 @@ static int igt_gem_hibernate(void *arg) ...@@ -183,16 +183,16 @@ static int igt_gem_hibernate(void *arg)
if (err) if (err)
goto out; goto out;
err = pm_prepare(i915); err = igt_pm_prepare(i915);
if (err) if (err)
goto out; goto out;
pm_hibernate(i915); igt_pm_hibernate(i915);
/* Here be dragons! */ /* Here be dragons! */
simulate_hibernate(i915); simulate_hibernate(i915);
pm_resume(i915); igt_pm_resume(i915);
err = switch_to_context(ctx); err = switch_to_context(ctx);
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册