]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: gk20a: Do not defer ELPG init
authorArto Merilainen <amerilainen@nvidia.com>
Tue, 18 Feb 2014 08:58:55 +0000 (10:58 +0200)
committerBharat Nihalani <bnihalani@nvidia.com>
Tue, 18 Feb 2014 13:03:04 +0000 (05:03 -0800)
Currently the second phase of PMU initialisation runs asynchronously
with other code. This optimises the boot-up time, however, it may
cause unexpected race in PMU code as some functions are called while
the ELPG is still being initialised.

This patch modifies the ELPG initialisation to happen synchronously
as part of power on sequence.

Bug 1456985
Bug 1460116
Bug 1458353

Change-Id: Ic979b3e054a17c0bc6979da2cf03d98f8d416c26
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/368702
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/video/tegra/host/gk20a/gk20a.c

index 7bbba4d1eb9f32377c9744663ef7f7fcfd0eff21..b3d6bf77515bbf0704b730ae343a68591a1d6aef 100644 (file)
@@ -948,6 +948,12 @@ int nvhost_gk20a_finalize_poweron(struct platform_device *dev)
                goto done;
        }
 
+       err = gk20a_init_pmu_setup_hw2(g);
+       if (err) {
+               nvhost_err(&dev->dev, "failed to init gk20a pmu_hw2");
+               goto done;
+       }
+
        err = gk20a_init_therm_support(g);
        if (err) {
                nvhost_err(&dev->dev, "failed to init gk20a therm");
@@ -963,9 +969,6 @@ int nvhost_gk20a_finalize_poweron(struct platform_device *dev)
        gk20a_channel_resume(g);
        set_user_nice(current, nice_value);
 
-       if (support_gk20a_pmu())
-               schedule_work(&(g->pmu.pg_init));
-
 done:
        return err;
 }