Thread (31 messages) 31 messages, 4 authors, 2021-01-28
STALE1948d
Revisions (2)
  1. v2 [diff vs current]
  2. v3 current

[PATCH v3, 09/15] drm/mediatek: Add pm runtime support for gamma

From: Yongqiang Niu <hidden>
Date: 2021-01-11 07:45:27
Also in: dri-devel, linux-arm-kernel, linux-mediatek, lkml
Subsystem: drm drivers, drm drivers for mediatek, the rest · Maintainers: David Airlie, Simona Vetter, Chun-Kuang Hu, Philipp Zabel, Linus Torvalds

gamma power domain need controled in the device.

Signed-off-by: Yongqiang Niu <redacted>
Signed-off-by: Yidi Lin <redacted>
---
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
index 3c1ea07..da93079 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
@@ -10,6 +10,7 @@
 #include <linux/of_device.h>
 #include <linux/of_irq.h>
 #include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
 #include <linux/soc/mediatek/mtk-cmdq.h>
 
 #include "mtk_drm_crtc.h"
@@ -156,6 +157,8 @@ static int mtk_disp_gamma_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 
+	pm_runtime_enable(dev);
+
 	ret = component_add(dev, &mtk_disp_gamma_component_ops);
 	if (ret)
 		dev_err(dev, "Failed to add component: %d\n", ret);
@@ -165,6 +168,8 @@ static int mtk_disp_gamma_probe(struct platform_device *pdev)
 
 static int mtk_disp_gamma_remove(struct platform_device *pdev)
 {
+	pm_runtime_disable(&pdev->dev);
+
 	component_del(&pdev->dev, &mtk_disp_gamma_component_ops);
 
 	return 0;
-- 
1.8.1.1.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help