OSDN Git Service

drm: msm: update cpu1 hotplug by using cpu_device node
authorVivek Kumar <vivekuma@codeaurora.org>
Tue, 11 Sep 2018 09:15:55 +0000 (14:45 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Thu, 27 Sep 2018 18:22:56 +0000 (11:22 -0700)
update cpu1 hotplug by using its device structure
online callback. This is to ensure, sysfs entry for
cpu1 reflects the online status correctly.

Change-Id: Idc77a1074ca030ca826eb1a817b1ab7795e8548c
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
drivers/gpu/drm/msm/sde/sde_connector.c

index a986f5d..5f6b939 100644 (file)
@@ -19,6 +19,8 @@
 #include "sde_splash.h"
 #include <linux/workqueue.h>
 #include <linux/atomic.h>
+#include <linux/cpu.h>
+#include <linux/device.h>
 
 #define SDE_DEBUG_CONN(c, fmt, ...) SDE_DEBUG("conn%d " fmt,\
                (c) ? (c)->base.base.id : -1, ##__VA_ARGS__)
@@ -574,7 +576,14 @@ void sde_connector_prepare_fence(struct drm_connector *connector)
 
 static void wake_up_cpu(struct work_struct *work)
 {
-       if (!cpu_up(1))
+       struct device *cpu_dev = NULL;
+
+       cpu_dev = get_cpu_device(1);
+       if (!cpu_dev) {
+               pr_err("Could not get cpu1 device\n");
+               return;
+       }
+       if (!device_online(cpu_dev))
                pr_info("cpu1 is online\n");
 }