video: tegra: host: Init scale3d worker always
Terje Bergstrom [Fri, 30 Mar 2012 09:44:40 +0000 (12:44 +0300)]
Initialize scale3d worker even though scale3d would be disabled.

Bug 954879

Change-Id: Iaf3a12740d1d377d949cdfbf7e11fa00568e72fe
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/93488
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/video/tegra/host/gr3d/scale3d.c

index 8a267a1..5922b55 100644 (file)
@@ -540,6 +540,9 @@ void nvhost_scale3d_init(struct nvhost_device *d)
                long correction;
                mutex_init(&scale3d.lock);
 
+               INIT_WORK(&scale3d.work, scale3d_clocks_handler);
+               INIT_DELAYED_WORK(&scale3d.idle_timer, scale3d_idle_handler);
+
                scale3d.clk_3d = d->clk[0];
                if (tegra_get_chipid() == TEGRA_CHIPID_TEGRA3) {
                        scale3d.clk_3d2 = d->clk[1];
@@ -629,9 +632,6 @@ void nvhost_scale3d_init(struct nvhost_device *d)
                                POW2(scale3d.max_rate_3d - scale3d.emc_xmid);
                scale3d.emc_dip_offset -= correction;
 
-               INIT_WORK(&scale3d.work, scale3d_clocks_handler);
-               INIT_DELAYED_WORK(&scale3d.idle_timer, scale3d_idle_handler);
-
                /* set scaling parameter defaults */
                scale3d.enable = 1;
                scale3d.period = scale3d.p_period = 100000;