diff options
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_drv.c')
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 764d0c83710c..0afb53b1f4e9 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/component.h> | 15 | #include <linux/component.h> |
16 | #include <linux/console.h> | ||
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
17 | #include <linux/of_graph.h> | 18 | #include <linux/of_graph.h> |
18 | #include <linux/of_reserved_mem.h> | 19 | #include <linux/of_reserved_mem.h> |
@@ -354,7 +355,7 @@ err_unload: | |||
354 | err_free: | 355 | err_free: |
355 | drm_mode_config_cleanup(drm); | 356 | drm_mode_config_cleanup(drm); |
356 | dev_set_drvdata(dev, NULL); | 357 | dev_set_drvdata(dev, NULL); |
357 | drm_dev_unref(drm); | 358 | drm_dev_put(drm); |
358 | 359 | ||
359 | return ret; | 360 | return ret; |
360 | } | 361 | } |
@@ -379,7 +380,7 @@ static void hdlcd_drm_unbind(struct device *dev) | |||
379 | pm_runtime_disable(drm->dev); | 380 | pm_runtime_disable(drm->dev); |
380 | of_reserved_mem_device_release(drm->dev); | 381 | of_reserved_mem_device_release(drm->dev); |
381 | drm_mode_config_cleanup(drm); | 382 | drm_mode_config_cleanup(drm); |
382 | drm_dev_unref(drm); | 383 | drm_dev_put(drm); |
383 | drm->dev_private = NULL; | 384 | drm->dev_private = NULL; |
384 | dev_set_drvdata(dev, NULL); | 385 | dev_set_drvdata(dev, NULL); |
385 | } | 386 | } |
@@ -432,9 +433,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev) | |||
432 | return 0; | 433 | return 0; |
433 | 434 | ||
434 | drm_kms_helper_poll_disable(drm); | 435 | drm_kms_helper_poll_disable(drm); |
436 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1); | ||
435 | 437 | ||
436 | hdlcd->state = drm_atomic_helper_suspend(drm); | 438 | hdlcd->state = drm_atomic_helper_suspend(drm); |
437 | if (IS_ERR(hdlcd->state)) { | 439 | if (IS_ERR(hdlcd->state)) { |
440 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); | ||
438 | drm_kms_helper_poll_enable(drm); | 441 | drm_kms_helper_poll_enable(drm); |
439 | return PTR_ERR(hdlcd->state); | 442 | return PTR_ERR(hdlcd->state); |
440 | } | 443 | } |
@@ -451,8 +454,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev) | |||
451 | return 0; | 454 | return 0; |
452 | 455 | ||
453 | drm_atomic_helper_resume(drm, hdlcd->state); | 456 | drm_atomic_helper_resume(drm, hdlcd->state); |
457 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); | ||
454 | drm_kms_helper_poll_enable(drm); | 458 | drm_kms_helper_poll_enable(drm); |
455 | pm_runtime_set_active(dev); | ||
456 | 459 | ||
457 | return 0; | 460 | return 0; |
458 | } | 461 | } |