Commit cde4bd87 authored by Jani Nikula's avatar Jani Nikula

drm/i915/display: rename intel_display_driver_suspend/resume functions

Follow the usual naming conventions. Switch to i915 arguments and naming
while at it.
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cdd4228337678609967ed176dcfc9690de5d490b.1681465222.git.jani.nikula@intel.com
parent 3183b9eb
...@@ -471,27 +471,26 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) ...@@ -471,27 +471,26 @@ void intel_display_driver_unregister(struct drm_i915_private *i915)
* turn all crtc's off, but do not adjust state * turn all crtc's off, but do not adjust state
* This has to be paired with a call to intel_modeset_setup_hw_state. * This has to be paired with a call to intel_modeset_setup_hw_state.
*/ */
int intel_display_suspend(struct drm_device *dev) int intel_display_driver_suspend(struct drm_i915_private *i915)
{ {
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_atomic_state *state; struct drm_atomic_state *state;
int ret; int ret;
if (!HAS_DISPLAY(dev_priv)) if (!HAS_DISPLAY(i915))
return 0; return 0;
state = drm_atomic_helper_suspend(dev); state = drm_atomic_helper_suspend(&i915->drm);
ret = PTR_ERR_OR_ZERO(state); ret = PTR_ERR_OR_ZERO(state);
if (ret) if (ret)
drm_err(&dev_priv->drm, "Suspending crtc's failed with %i\n", drm_err(&i915->drm, "Suspending crtc's failed with %i\n",
ret); ret);
else else
dev_priv->display.restore.modeset_state = state; i915->display.restore.modeset_state = state;
return ret; return ret;
} }
int int
__intel_display_resume(struct drm_i915_private *i915, __intel_display_driver_resume(struct drm_i915_private *i915,
struct drm_atomic_state *state, struct drm_atomic_state *state,
struct drm_modeset_acquire_ctx *ctx) struct drm_modeset_acquire_ctx *ctx)
{ {
...@@ -530,9 +529,8 @@ __intel_display_resume(struct drm_i915_private *i915, ...@@ -530,9 +529,8 @@ __intel_display_resume(struct drm_i915_private *i915,
return ret; return ret;
} }
void intel_display_resume(struct drm_device *dev) void intel_display_driver_resume(struct drm_i915_private *i915)
{ {
struct drm_i915_private *i915 = to_i915(dev);
struct drm_atomic_state *state = i915->display.restore.modeset_state; struct drm_atomic_state *state = i915->display.restore.modeset_state;
struct drm_modeset_acquire_ctx ctx; struct drm_modeset_acquire_ctx ctx;
int ret; int ret;
...@@ -547,7 +545,7 @@ void intel_display_resume(struct drm_device *dev) ...@@ -547,7 +545,7 @@ void intel_display_resume(struct drm_device *dev)
drm_modeset_acquire_init(&ctx, 0); drm_modeset_acquire_init(&ctx, 0);
while (1) { while (1) {
ret = drm_modeset_lock_all_ctx(dev, &ctx); ret = drm_modeset_lock_all_ctx(&i915->drm, &ctx);
if (ret != -EDEADLK) if (ret != -EDEADLK)
break; break;
...@@ -555,7 +553,7 @@ void intel_display_resume(struct drm_device *dev) ...@@ -555,7 +553,7 @@ void intel_display_resume(struct drm_device *dev)
} }
if (!ret) if (!ret)
ret = __intel_display_resume(i915, state, &ctx); ret = __intel_display_driver_resume(i915, state, &ctx);
skl_watermark_ipc_update(i915); skl_watermark_ipc_update(i915);
drm_modeset_drop_locks(&ctx); drm_modeset_drop_locks(&ctx);
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <linux/types.h> #include <linux/types.h>
struct drm_atomic_state; struct drm_atomic_state;
struct drm_device;
struct drm_i915_private; struct drm_i915_private;
struct drm_modeset_acquire_ctx; struct drm_modeset_acquire_ctx;
struct pci_dev; struct pci_dev;
...@@ -24,11 +23,11 @@ void intel_display_driver_remove(struct drm_i915_private *i915); ...@@ -24,11 +23,11 @@ void intel_display_driver_remove(struct drm_i915_private *i915);
void intel_display_driver_remove_noirq(struct drm_i915_private *i915); void intel_display_driver_remove_noirq(struct drm_i915_private *i915);
void intel_display_driver_remove_nogem(struct drm_i915_private *i915); void intel_display_driver_remove_nogem(struct drm_i915_private *i915);
void intel_display_driver_unregister(struct drm_i915_private *i915); void intel_display_driver_unregister(struct drm_i915_private *i915);
int intel_display_suspend(struct drm_device *dev); int intel_display_driver_suspend(struct drm_i915_private *i915);
void intel_display_resume(struct drm_device *dev); void intel_display_driver_resume(struct drm_i915_private *i915);
/* interface for intel_display_reset.c */ /* interface for intel_display_reset.c */
int __intel_display_resume(struct drm_i915_private *i915, int __intel_display_driver_resume(struct drm_i915_private *i915,
struct drm_atomic_state *state, struct drm_atomic_state *state,
struct drm_modeset_acquire_ctx *ctx); struct drm_modeset_acquire_ctx *ctx);
......
...@@ -117,7 +117,7 @@ void intel_display_reset_finish(struct drm_i915_private *i915) ...@@ -117,7 +117,7 @@ void intel_display_reset_finish(struct drm_i915_private *i915)
intel_clock_gating_init(i915); intel_clock_gating_init(i915);
intel_hpd_init(i915); intel_hpd_init(i915);
ret = __intel_display_resume(i915, state, ctx); ret = __intel_display_driver_resume(i915, state, ctx);
if (ret) if (ret)
drm_err(&i915->drm, drm_err(&i915->drm,
"Restoring old state failed with %i\n", ret); "Restoring old state failed with %i\n", ret);
......
...@@ -1043,7 +1043,7 @@ static int i915_drm_prepare(struct drm_device *dev) ...@@ -1043,7 +1043,7 @@ static int i915_drm_prepare(struct drm_device *dev)
intel_pxp_suspend_prepare(i915->pxp); intel_pxp_suspend_prepare(i915->pxp);
/* /*
* NB intel_display_suspend() may issue new requests after we've * NB intel_display_driver_suspend() may issue new requests after we've
* ostensibly marked the GPU as ready-to-sleep here. We need to * ostensibly marked the GPU as ready-to-sleep here. We need to
* split out that work and pull it forward so that after point, * split out that work and pull it forward so that after point,
* the GPU is not woken again. * the GPU is not woken again.
...@@ -1067,7 +1067,7 @@ static int i915_drm_suspend(struct drm_device *dev) ...@@ -1067,7 +1067,7 @@ static int i915_drm_suspend(struct drm_device *dev)
pci_save_state(pdev); pci_save_state(pdev);
intel_display_suspend(dev); intel_display_driver_suspend(dev_priv);
intel_dp_mst_suspend(dev_priv); intel_dp_mst_suspend(dev_priv);
...@@ -1241,7 +1241,7 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -1241,7 +1241,7 @@ static int i915_drm_resume(struct drm_device *dev)
/* MST sideband requires HPD interrupts enabled */ /* MST sideband requires HPD interrupts enabled */
intel_dp_mst_resume(dev_priv); intel_dp_mst_resume(dev_priv);
intel_display_resume(dev); intel_display_driver_resume(dev_priv);
intel_hpd_poll_disable(dev_priv); intel_hpd_poll_disable(dev_priv);
if (HAS_DISPLAY(dev_priv)) if (HAS_DISPLAY(dev_priv))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment