diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-04-14 12:42:01 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-04-17 11:18:00 +0300 |
commit | cde4bd87863124fb6feee35b7f73552f5e75ea61 (patch) | |
tree | d861bd939c3e5e3f8db4d11cc44da6b727a026e7 /drivers/gpu/drm | |
parent | 3183b9ebad7d3f1d711f152222577116ca08b299 (diff) | |
download | linux-stable-cde4bd87863124fb6feee35b7f73552f5e75ea61.tar.gz linux-stable-cde4bd87863124fb6feee35b7f73552f5e75ea61.tar.bz2 linux-stable-cde4bd87863124fb6feee35b7f73552f5e75ea61.zip |
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: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cdd4228337678609967ed176dcfc9690de5d490b.1681465222.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_driver.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_driver.h | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_reset.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_driver.c | 6 |
4 files changed, 20 insertions, 23 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index eb03b0a87d5a..d20a279fdf51 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -471,29 +471,28 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) * turn all crtc's off, but do not adjust 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; int ret; - if (!HAS_DISPLAY(dev_priv)) + if (!HAS_DISPLAY(i915)) return 0; - state = drm_atomic_helper_suspend(dev); + state = drm_atomic_helper_suspend(&i915->drm); ret = PTR_ERR_OR_ZERO(state); 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); else - dev_priv->display.restore.modeset_state = state; + i915->display.restore.modeset_state = state; return ret; } int -__intel_display_resume(struct drm_i915_private *i915, - struct drm_atomic_state *state, - struct drm_modeset_acquire_ctx *ctx) +__intel_display_driver_resume(struct drm_i915_private *i915, + struct drm_atomic_state *state, + struct drm_modeset_acquire_ctx *ctx) { struct drm_crtc_state *crtc_state; struct drm_crtc *crtc; @@ -530,9 +529,8 @@ __intel_display_resume(struct drm_i915_private *i915, 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_modeset_acquire_ctx ctx; int ret; @@ -547,7 +545,7 @@ void intel_display_resume(struct drm_device *dev) drm_modeset_acquire_init(&ctx, 0); while (1) { - ret = drm_modeset_lock_all_ctx(dev, &ctx); + ret = drm_modeset_lock_all_ctx(&i915->drm, &ctx); if (ret != -EDEADLK) break; @@ -555,7 +553,7 @@ void intel_display_resume(struct drm_device *dev) } if (!ret) - ret = __intel_display_resume(i915, state, &ctx); + ret = __intel_display_driver_resume(i915, state, &ctx); skl_watermark_ipc_update(i915); drm_modeset_drop_locks(&ctx); diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 7b5ff4309dec..84e7977f265a 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -9,7 +9,6 @@ #include <linux/types.h> struct drm_atomic_state; -struct drm_device; struct drm_i915_private; struct drm_modeset_acquire_ctx; struct pci_dev; @@ -24,13 +23,13 @@ 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_nogem(struct drm_i915_private *i915); void intel_display_driver_unregister(struct drm_i915_private *i915); -int intel_display_suspend(struct drm_device *dev); -void intel_display_resume(struct drm_device *dev); +int intel_display_driver_suspend(struct drm_i915_private *i915); +void intel_display_driver_resume(struct drm_i915_private *i915); /* interface for intel_display_reset.c */ -int __intel_display_resume(struct drm_i915_private *i915, - struct drm_atomic_state *state, - struct drm_modeset_acquire_ctx *ctx); +int __intel_display_driver_resume(struct drm_i915_private *i915, + struct drm_atomic_state *state, + struct drm_modeset_acquire_ctx *ctx); #endif /* __INTEL_DISPLAY_DRIVER_H__ */ diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.c b/drivers/gpu/drm/i915/display/intel_display_reset.c index 166aa0cab1fc..17178d5d7788 100644 --- a/drivers/gpu/drm/i915/display/intel_display_reset.c +++ b/drivers/gpu/drm/i915/display/intel_display_reset.c @@ -117,7 +117,7 @@ void intel_display_reset_finish(struct drm_i915_private *i915) intel_clock_gating_init(i915); intel_hpd_init(i915); - ret = __intel_display_resume(i915, state, ctx); + ret = __intel_display_driver_resume(i915, state, ctx); if (ret) drm_err(&i915->drm, "Restoring old state failed with %i\n", ret); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index d38ce3885c4d..d36e4b019cce 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1043,7 +1043,7 @@ static int i915_drm_prepare(struct drm_device *dev) 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 * split out that work and pull it forward so that after point, * the GPU is not woken again. @@ -1067,7 +1067,7 @@ static int i915_drm_suspend(struct drm_device *dev) pci_save_state(pdev); - intel_display_suspend(dev); + intel_display_driver_suspend(dev_priv); intel_dp_mst_suspend(dev_priv); @@ -1241,7 +1241,7 @@ static int i915_drm_resume(struct drm_device *dev) /* MST sideband requires HPD interrupts enabled */ intel_dp_mst_resume(dev_priv); - intel_display_resume(dev); + intel_display_driver_resume(dev_priv); intel_hpd_poll_disable(dev_priv); if (HAS_DISPLAY(dev_priv)) |