gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume()
Subsystems (3)
PATCH 1/1 gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume()
convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().
Fixed one sparse warning by making hibmc_drm_interrupt static.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +8 -16
@@ -37,7 +37,7 @@ .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 =
@@ -74,30 +74,22 @@ static int __maybe_unused hibmc_pm_suspend(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_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); - } +int ret =0 ; -return 0 ; + ret =drm_mode_config_helper_suspend (drm_dev); + +return ret; }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; +int ret =0 ; -drm_atomic_helper_resume (drm_dev, priv->suspend_state); -drm_kms_helper_poll_enable (drm_dev); + ret =drm_mode_config_helper_resume (drm_dev); -return 0 ; +return ret; }static const struct dev_pm_ops hibmc_pm_ops = {
Signature · 1 line
1.9.1
Quoted 9 lines · Souptick Joarder
convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().Fixed one sparse warning by making
hibmc_drm_interruptstatic.Signed-off-by Souptick Joarder <[email protected]>Signed-off-by Ajit Negi <[email protected]>---
Any comment on this patch ?
Quoted 57 lines
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-)drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +8
-17@@ -37,7 +37,7 @@ .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 =@@ -74,30 +74,22 @@ static int __maybe_unused hibmc_pm_suspend(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_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); - } +int ret =0 ; -return 0 ; + ret =drm_mode_config_helper_suspend (drm_dev); + +return ret; }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; +int ret =0 ; -drm_atomic_helper_resume (drm_dev, priv->suspend_state); -drm_kms_helper_poll_enable (drm_dev); + ret =drm_mode_config_helper_resume (drm_dev); -return 0 ; +return ret; }static const struct dev_pm_ops hibmc_pm_ops = { --1.9.1
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Souptick Joarder
convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().
Quoted 8 lines
Quoted 6 lines
Fixed one sparse warning by making
hibmc_drm_interruptstatic.Signed-off-by Souptick Joarder <[email protected]>Signed-off-by Ajit Negi <[email protected]>---
Any comment on this patch ?
Any review comment for this patch ?
Quoted 58 lines
Quoted 58 lines
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-)drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +8
-17@@ -37,7 +37,7 @@ .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 =@@ -74,30 +74,22 @@ static int __maybe_unused hibmc_pm_suspend(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_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); - } +int ret =0 ; -return 0 ; + ret =drm_mode_config_helper_suspend (drm_dev); + +return ret; }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; +int ret =0 ; -drm_atomic_helper_resume (drm_dev, priv->suspend_state); -drm_kms_helper_poll_enable (drm_dev); + ret =drm_mode_config_helper_resume (drm_dev); -return 0 ; +return ret; }static const struct dev_pm_ops hibmc_pm_ops = { --1.9.1
xinliang
Reviewed-byQuoted 8 lines · Souptick Joarder
Quoted 7 lines · Souptick Joarder
Quoted 7 lines · Souptick Joarder
Quoted 6 lines
Quoted 6 lines
convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().Fixed one sparse warning by making
hibmc_drm_interruptstatic.
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Signed-off-by Souptick Joarder<[email protected]>Signed-off-by Ajit Negi<[email protected]>---
Any comment on this patch ?
Any review comment for this patch ?
Sorry for late reply. Looks good to me. Thanks.
Quoted 21 lines · xinliang
Quoted 18 lines · Souptick Joarder
Quoted 15 lines · Souptick Joarder
Quoted 15 lines
Quoted 9 lines · Souptick Joarder
Quoted 9 lines
convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().Fixed one sparse warning by making
hibmc_drm_interruptstatic.Signed-off-by Souptick Joarder<[email protected]>Signed-off-by Ajit Negi<[email protected]>---
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Any comment on this patch ?
Any review comment for this patch ?
Sorry for late reply. Looks good to me. Thanks.
Reviewed-by Xinliang Liu <[email protected]>
Xinliang,
I will do little more clean up by removing ret variable from suspend / resume function and post v2.