lkml.org 
[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm: rockchip: add shutdown function to poweroff VOP and HDMI TX
Date
When a MK808 TV-stick with RK3066 processor
is given a poweroff command, the monitor doesn't turn blank,
but freezes. The VOP and HDMI share the same power domain,
so that means that both there clocks were never turned off.
Fix the disable of the VOP and HDMI TX by adding an extra
shutdown function that will unbind both drivers.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 8d7a634c1..66a8e99a3 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -448,6 +448,13 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
return 0;
}

+static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
+{
+ component_master_del(&pdev->dev, &rockchip_drm_ops);
+
+ rockchip_drm_match_remove(&pdev->dev);
+}
+
static const struct of_device_id rockchip_drm_dt_ids[] = {
{ .compatible = "rockchip,display-subsystem", },
{ /* sentinel */ },
@@ -457,6 +464,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
static struct platform_driver rockchip_drm_platform_driver = {
.probe = rockchip_drm_platform_probe,
.remove = rockchip_drm_platform_remove,
+ .shutdown = rockchip_drm_platform_shutdown,
.driver = {
.name = "rockchip-drm",
.of_match_table = rockchip_drm_dt_ids,
--
2.11.0
\
 
 \ /
  Last update: 2019-03-08 19:39    [W:0.071 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site