diff options
| author | Vivek Kumar <vivekuma@codeaurora.org> | 2018-07-03 20:23:57 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-07-16 21:41:39 -0700 |
| commit | 9177f292073bcb9520fbb990b0cec65beab4b32f (patch) | |
| tree | bbe3fec211cfe6dce7cd44e01d1f577f8e78b74e | |
| parent | 385635a167a7f7b8d7e8501e782e173244b7cdf3 (diff) | |
drm: msm: Hot plug cpu1 once early domain is finished
Early domain services run on cpu1 in LK, so hotplug
cpu1 once early domain services are finished.
Change-Id: I23b57b8b7460c5740083b27af72251b2fad78ed4
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_connector.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_connector.c b/drivers/gpu/drm/msm/sde/sde_connector.c index 1bc3d0a926eb..a986f5db2c41 100644 --- a/drivers/gpu/drm/msm/sde/sde_connector.c +++ b/drivers/gpu/drm/msm/sde/sde_connector.c @@ -17,6 +17,8 @@ #include "sde_connector.h" #include "sde_backlight.h" #include "sde_splash.h" +#include <linux/workqueue.h> +#include <linux/atomic.h> #define SDE_DEBUG_CONN(c, fmt, ...) SDE_DEBUG("conn%d " fmt,\ (c) ? (c)->base.base.id : -1, ##__VA_ARGS__) @@ -51,6 +53,8 @@ static const struct drm_prop_enum_list hpd_clock_state[] = { {SDE_MODE_HPD_OFF, "OFF"}, }; +static struct work_struct cpu_up_work; + int sde_connector_get_info(struct drm_connector *connector, struct msm_display_info *info) { @@ -568,11 +572,18 @@ void sde_connector_prepare_fence(struct drm_connector *connector) sde_fence_prepare(&to_sde_connector(connector)->retire_fence); } +static void wake_up_cpu(struct work_struct *work) +{ + if (!cpu_up(1)) + pr_info("cpu1 is online\n"); +} + void sde_connector_complete_commit(struct drm_connector *connector) { struct drm_device *dev; struct msm_drm_private *priv; struct sde_connector *c_conn; + static atomic_t cpu_up_scheduled = ATOMIC_INIT(0); if (!connector) { SDE_ERROR("invalid connector\n"); @@ -587,7 +598,8 @@ void sde_connector_complete_commit(struct drm_connector *connector) /* * After LK totally exits, LK's early splash resource - * should be released. + * should be released, cpu1 is hot-plugged in case LK's + * early domain has reserved it. */ if (sde_splash_get_lk_complete_status(priv->kms)) { c_conn = to_sde_connector(connector); @@ -595,8 +607,11 @@ void sde_connector_complete_commit(struct drm_connector *connector) sde_splash_free_resource(priv->kms, &priv->phandle, c_conn->connector_type, c_conn->display); + if (atomic_add_unless(&cpu_up_scheduled, 1, 1)) { + INIT_WORK(&cpu_up_work, wake_up_cpu); + schedule_work(&cpu_up_work); + } } - } static int sde_connector_dpms(struct drm_connector *connector, |
