[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <625c83a9df80e4ee3df88e920aa7636cc037fbac.1597833138.git.mchehab+huawei@kernel.org>
Date: Wed, 19 Aug 2020 13:46:02 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linuxarm@...wei.com, mauro.chehab@...wei.com,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Manivannan Sadhasivam <mani@...nel.org>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Xiubin Zhang <zhangxiubin1@...wei.com>,
Liuyao An <anliuyao@...wei.com>,
Liwei Cai <cailiwei@...ilicon.com>,
Chen Feng <puck.chen@...ilicon.com>,
Wanchun Zheng <zhengwanchun@...ilicon.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 34/49] staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator
This is needed for the DRM to work. Ok, right now, this is
enabled on default fastboot logic, but, as soon as we enable
the proper SPMI driver, such code is needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h | 4 +---
drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c | 6 +++---
drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 8 --------
drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h | 4 +---
4 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h b/drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h
index 9c1b62831733..0c6b6eb9dcab 100644
--- a/drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h
+++ b/drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h
@@ -41,9 +41,7 @@
#define FB_ACCEL_PLATFORM_TYPE_ASIC 0x20000000 //ASIC
/* vcc name */
-#define REGULATOR_PDP_NAME "regulator_dsssubsys"
-#define REGULATOR_MMBUF "regulator_mmbuf"
-#define REGULATOR_MEDIA_NAME "regulator_media_subsys"
+#define REGULATOR_PDP_NAME "ldo3"
/*******************************************************************************
**
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c
index a15c335da026..3b8ff0bdd359 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c
@@ -967,13 +967,13 @@ int dpe_regulator_enable(struct dss_hw_ctx *ctx)
{
int ret = 0;
- DRM_INFO("+. \n");
+ DRM_INFO("enabling DPE regulator\n");
if (NULL == ctx) {
DRM_ERROR("NULL ptr.\n");
return -EINVAL;
}
- //ret = regulator_enable(ctx->dpe_regulator);
+ ret = regulator_enable(ctx->dpe_regulator);
if (ret) {
DRM_ERROR(" dpe regulator_enable failed, error=%d!\n", ret);
return -EINVAL;
@@ -998,7 +998,7 @@ int dpe_regulator_disable(struct dss_hw_ctx *ctx)
dpe_set_common_clk_rate_on_pll0(ctx);
#endif
- //ret = regulator_disable(ctx->dpe_regulator);
+ ret = regulator_disable(ctx->dpe_regulator);
if (ret != 0) {
DRM_ERROR("dpe regulator_disable failed, error=%d!\n", ret);
return -EINVAL;
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
index 0844bf372ca8..fe5b371734fe 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
@@ -873,20 +873,12 @@ static int dss_dts_parse(struct platform_device *pdev, struct dss_hw_ctx *ctx)
DRM_INFO("dss irq = %d. \n", ctx->irq);
-#ifndef DSS_POWER_UP_ON_UEFI
#if defined (CONFIG_DRM_HISI_KIRIN970)
ctx->dpe_regulator = devm_regulator_get(dev, REGULATOR_PDP_NAME);
if (!ctx->dpe_regulator) {
DRM_ERROR("failed to get dpe_regulator resource! ret=%d.\n", ret);
return -ENXIO;
}
-
- ctx->mediacrg_regulator = devm_regulator_get(dev, REGULATOR_MEDIA_NAME);
- if (!ctx->mediacrg_regulator) {
- DRM_ERROR("failed to get mediacrg_regulator resource! ret=%d.\n", ret);
- return -ENXIO;
- }
-#endif
#endif
ctx->dss_mmbuf_clk = devm_clk_get(dev, "clk_dss_axi_mm");
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h b/drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h
index 0f69af49a355..83e79a4350c1 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h
@@ -38,9 +38,7 @@
#define DEV_NAME_LCD_BKL "lcd_backlight0"
/* vcc name */
-#define REGULATOR_PDP_NAME "regulator_dsssubsys"
-#define REGULATOR_MMBUF "regulator_mmbuf"
-#define REGULATOR_MEDIA_NAME "regulator_media_subsys"
+#define REGULATOR_PDP_NAME "ldo3"
/* irq name */
--
2.26.2
Powered by blists - more mailing lists