]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Revert "video: tegra: host: gk20a: Do not suspend if active"
authorArto Merilainen <amerilainen@nvidia.com>
Mon, 25 Nov 2013 14:10:54 +0000 (16:10 +0200)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Wed, 29 Jan 2014 11:29:12 +0000 (03:29 -0800)
This reverts commit 63078e87a62b265111622e58e66d9e67a2e1519b. The
original patch was added to protect kernel from applications that
injected jobs just after pm had suspended the device. This lead
the bookkeeping to get mixed as some callbacks were not called
correctly before the device was suspended.

We have now revisited the suspend sequences and identified that
we actually used to use some callbacks in a wrong way and the
original patch was simply a workaround to hide the issue. Now
that the issues are fixed, we can safely remove the hack.

Bug 1426717

Change-Id: I42d884bc21baad1a37001c354ef1a80e2eba140c
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/358575
(cherry picked from commit 12d0c2928fb62b4ba649dcd88b6fa0b057f1182c)
Reviewed-on: http://git-master/r/335100
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/gk20a/gk20a.c
drivers/video/tegra/host/gk20a/gk20a.h

index 8fdea120020fc8dc4515e8a61c7c77f0dc130490..5b1b6133e762a7b1455931865988c14c5b56f6f9 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/spinlock.h>
 #include <linux/tegra-powergate.h>
 
-#include <linux/suspend.h>
 #include <linux/sched.h>
 #include <linux/input-cfboost.h>
 
@@ -982,18 +981,6 @@ static struct thermal_cooling_device_ops tegra_gpu_cooling_ops = {
        .set_cur_state = tegra_gpu_set_cur_state,
 };
 
-static int gk20a_suspend_notifier(struct notifier_block *notifier,
-                                 unsigned long pm_event, void *unused)
-{
-       struct gk20a *g = container_of(notifier, struct gk20a,
-                                      system_suspend_notifier);
-
-       if (pm_event == PM_USERSPACE_FROZEN)
-               return g->power_on ? NOTIFY_BAD : NOTIFY_OK;
-
-       return NOTIFY_DONE;
-}
-
 static int gk20a_create_device(
        struct platform_device *pdev, int devno, const char *cdev_name,
        struct cdev *cdev, struct device **out,
@@ -1154,12 +1141,6 @@ static int gk20a_probe(struct platform_device *dev)
                return err;
        }
 
-       if (platform->can_powergate) {
-               gk20a->system_suspend_notifier.notifier_call =
-                       gk20a_suspend_notifier;
-               register_pm_notifier(&gk20a->system_suspend_notifier);
-       }
-
        err = nvhost_as_init_device(dev);
        if (err) {
                nvhost_dbg_fn("failed to init client address space"
index c92072ea957b3e0f4981aab334fab8acbd1463c5..96e20d6ddbcde8cd4bdc0555effe6ceae745f011 100644 (file)
@@ -106,7 +106,6 @@ struct gk20a {
 
        void (*remove_support)(struct platform_device *);
 
-       struct notifier_block system_suspend_notifier;
        u64 pg_ingating_time_us;
        u64 pg_ungating_time_us;
        u32 pg_gating_cnt;