Commit 810ddc3a authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: rename suspend_kms and resume_kms

The old names were dragged over from radeon.  The new ones
better match the naming conventions used in the driver.

No functional change.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7b4d3e29
...@@ -2434,8 +2434,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, ...@@ -2434,8 +2434,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
struct drm_file *file_priv); struct drm_file *file_priv);
void amdgpu_driver_preclose_kms(struct drm_device *dev, void amdgpu_driver_preclose_kms(struct drm_device *dev,
struct drm_file *file_priv); struct drm_file *file_priv);
int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon); int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon);
int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon); int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon);
u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe); u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe); int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe); void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
......
...@@ -1027,7 +1027,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero ...@@ -1027,7 +1027,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
/* don't suspend or resume card normally */ /* don't suspend or resume card normally */
dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
amdgpu_resume_kms(dev, true, true); amdgpu_device_resume(dev, true, true);
dev->pdev->d3_delay = d3_delay; dev->pdev->d3_delay = d3_delay;
...@@ -1037,7 +1037,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero ...@@ -1037,7 +1037,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
printk(KERN_INFO "amdgpu: switched off\n"); printk(KERN_INFO "amdgpu: switched off\n");
drm_kms_helper_poll_disable(dev); drm_kms_helper_poll_disable(dev);
dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
amdgpu_suspend_kms(dev, true, true); amdgpu_device_suspend(dev, true, true);
dev->switch_power_state = DRM_SWITCH_POWER_OFF; dev->switch_power_state = DRM_SWITCH_POWER_OFF;
} }
} }
...@@ -1774,7 +1774,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev) ...@@ -1774,7 +1774,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
* Suspend & resume. * Suspend & resume.
*/ */
/** /**
* amdgpu_suspend_kms - initiate device suspend * amdgpu_device_suspend - initiate device suspend
* *
* @pdev: drm dev pointer * @pdev: drm dev pointer
* @state: suspend state * @state: suspend state
...@@ -1783,7 +1783,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev) ...@@ -1783,7 +1783,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
* Returns 0 for success or an error on failure. * Returns 0 for success or an error on failure.
* Called at driver suspend. * Called at driver suspend.
*/ */
int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
{ {
struct amdgpu_device *adev; struct amdgpu_device *adev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
...@@ -1862,7 +1862,7 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) ...@@ -1862,7 +1862,7 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon)
} }
/** /**
* amdgpu_resume_kms - initiate device resume * amdgpu_device_resume - initiate device resume
* *
* @pdev: drm dev pointer * @pdev: drm dev pointer
* *
...@@ -1870,7 +1870,7 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) ...@@ -1870,7 +1870,7 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon)
* Returns 0 for success or an error on failure. * Returns 0 for success or an error on failure.
* Called at driver resume. * Called at driver resume.
*/ */
int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon) int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
{ {
struct drm_connector *connector; struct drm_connector *connector;
struct amdgpu_device *adev = dev->dev_private; struct amdgpu_device *adev = dev->dev_private;
......
...@@ -397,28 +397,28 @@ static int amdgpu_pmops_suspend(struct device *dev) ...@@ -397,28 +397,28 @@ static int amdgpu_pmops_suspend(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
return amdgpu_suspend_kms(drm_dev, true, true); return amdgpu_device_suspend(drm_dev, true, true);
} }
static int amdgpu_pmops_resume(struct device *dev) static int amdgpu_pmops_resume(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
return amdgpu_resume_kms(drm_dev, true, true); return amdgpu_device_resume(drm_dev, true, true);
} }
static int amdgpu_pmops_freeze(struct device *dev) static int amdgpu_pmops_freeze(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
return amdgpu_suspend_kms(drm_dev, false, true); return amdgpu_device_suspend(drm_dev, false, true);
} }
static int amdgpu_pmops_thaw(struct device *dev) static int amdgpu_pmops_thaw(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
return amdgpu_resume_kms(drm_dev, false, true); return amdgpu_device_resume(drm_dev, false, true);
} }
static int amdgpu_pmops_runtime_suspend(struct device *dev) static int amdgpu_pmops_runtime_suspend(struct device *dev)
...@@ -436,7 +436,7 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev) ...@@ -436,7 +436,7 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
drm_kms_helper_poll_disable(drm_dev); drm_kms_helper_poll_disable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF); vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
ret = amdgpu_suspend_kms(drm_dev, false, false); ret = amdgpu_device_suspend(drm_dev, false, false);
pci_save_state(pdev); pci_save_state(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_ignore_hotplug(pdev); pci_ignore_hotplug(pdev);
...@@ -469,7 +469,7 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) ...@@ -469,7 +469,7 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
return ret; return ret;
pci_set_master(pdev); pci_set_master(pdev);
ret = amdgpu_resume_kms(drm_dev, false, false); ret = amdgpu_device_resume(drm_dev, false, false);
drm_kms_helper_poll_enable(drm_dev); drm_kms_helper_poll_enable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON); vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON);
drm_dev->switch_power_state = DRM_SWITCH_POWER_ON; drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
......
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