From eaa458b165c96f742b08bbf84dd88d081aebce68 Mon Sep 17 00:00:00 2001 From: Chandan Uddaraju Date: Fri, 17 Apr 2020 15:45:13 -0700 Subject: [PATCH] disp: msm: move MDSS resource voting to probe sync_state driver disables any resources that don't have any votes after driver probe is completed. Move MDSS resource votes to probe so that any resources that are needed for continuous splash are intact until the bind of all the components is complete. Change-Id: I0056bf1ec56bcd6a1b620a81143d4b49d7ea2921 Signed-off-by: Chandan Uddaraju --- msm/msm_drv.c | 11 ++++++++++- msm/sde/sde_kms.c | 10 +--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/msm/msm_drv.c b/msm/msm_drv.c index 80793e2f018b..5fd2a119ac0a 100644 --- a/msm/msm_drv.c +++ b/msm/msm_drv.c @@ -704,7 +704,6 @@ static struct msm_kms *_msm_drm_component_init_helper( return kms; } priv->kms = kms; - pm_runtime_enable(dev); /** * Since kms->funcs->hw_init(kms) might call @@ -762,6 +761,14 @@ static int msm_drm_device_init(struct platform_device *pdev, goto dbg_init_fail; } + pm_runtime_enable(dev); + + ret = pm_runtime_get_sync(dev); + if (ret < 0) { + dev_err(dev, "resource enable failed: %d\n", ret); + goto pm_runtime_error; + } + for (i = 0; i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++) sde_power_data_bus_set_quota(&priv->phandle, i, SDE_POWER_HANDLE_CONT_SPLASH_BUS_AB_QUOTA, @@ -769,6 +776,8 @@ static int msm_drm_device_init(struct platform_device *pdev, return ret; +pm_runtime_error: + sde_dbg_destroy(); dbg_init_fail: sde_power_resource_deinit(pdev, &priv->phandle); power_init_fail: diff --git a/msm/sde/sde_kms.c b/msm/sde/sde_kms.c index 106b0e67ea3e..57d04859746a 100644 --- a/msm/sde/sde_kms.c +++ b/msm/sde/sde_kms.c @@ -3491,15 +3491,9 @@ static int sde_kms_hw_init(struct msm_kms *kms) if (rc) SDE_DEBUG("sde splash data fetch failed: %d\n", rc); - rc = pm_runtime_get_sync(sde_kms->dev->dev); - if (rc < 0) { - SDE_ERROR("resource enable failed: %d\n", rc); - goto error; - } - rc = _sde_kms_hw_init_blocks(sde_kms, dev, priv); if (rc) - goto hw_init_err; + goto error; dev->mode_config.min_width = sde_kms->catalog->min_display_width; dev->mode_config.min_height = sde_kms->catalog->min_display_height; @@ -3546,8 +3540,6 @@ static int sde_kms_hw_init(struct msm_kms *kms) return 0; -hw_init_err: - pm_runtime_put_sync(sde_kms->dev->dev); error: _sde_kms_hw_destroy(sde_kms, platformdev); end: