summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/msm/sde/sde_connector.c19
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,