.llseek = no_llseek,
};
-irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
+static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
{
struct drm_device *dev = (struct drm_device *)arg;
struct hibmc_drm_private *priv =
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
- struct hibmc_drm_private *priv = drm_dev->dev_private;
-
- drm_kms_helper_poll_disable(drm_dev);
- priv->suspend_state = drm_atomic_helper_suspend(drm_dev);
- if (IS_ERR(priv->suspend_state)) {
- DRM_ERROR("drm_atomic_helper_suspend failed: %ld\n",
- PTR_ERR(priv->suspend_state));
- drm_kms_helper_poll_enable(drm_dev);
- return PTR_ERR(priv->suspend_state);
- }
- return 0;
+ return drm_mode_config_helper_suspend(drm_dev);
}
static int __maybe_unused hibmc_pm_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
- struct hibmc_drm_private *priv = drm_dev->dev_private;
- drm_atomic_helper_resume(drm_dev, priv->suspend_state);
- drm_kms_helper_poll_enable(drm_dev);
-
- return 0;
+ return drm_mode_config_helper_resume(drm_dev);
}
static const struct dev_pm_ops hibmc_pm_ops = {