Skip to content

Commit

Permalink
linuxkpi: Add support for suspend_noirq callback in `struct dev_pm_…
Browse files Browse the repository at this point in the history
…ops`

[Why]
This callback is being used by the amdgpu DRM driver in Linux 5.18.

[How]
The callback is called after `suspend_late()`.

Reviewed by:	emaste, manu
Approved by:	emaste, manu
Differential Revision:	https://reviews.freebsd.org/D43029
  • Loading branch information
dumbbell committed Dec 13, 2023
1 parent b30637c commit 59cbead
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys/compat/linuxkpi/common/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ struct dev_pm_ops {
int (*poweroff_late)(struct device *dev);
int (*restore)(struct device *dev);
int (*restore_early)(struct device *dev);
int (*suspend_noirq)(struct device *dev);
int (*runtime_suspend)(struct device *dev);
int (*runtime_resume)(struct device *dev);
int (*runtime_idle)(struct device *dev);
Expand Down
2 changes: 2 additions & 0 deletions sys/compat/linuxkpi/common/src/linux_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ linux_pci_suspend(device_t dev)
error = -pmops->suspend(&pdev->dev);
if (error == 0 && pmops->suspend_late != NULL)
error = -pmops->suspend_late(&pdev->dev);
if (error == 0 && pmops->suspend_noirq != NULL)
error = -pmops->suspend_noirq(&pdev->dev);
}
return (error);
}
Expand Down

0 comments on commit 59cbead

Please sign in to comment.