video: tegra: host: don't init actmon workers always
Shridhar Rasal [Wed, 9 Dec 2015 10:51:20 +0000 (15:51 +0530)]
- This enables actmon workers only when work actmon interrupt
 configured. Enabling actmon workers polling based scaling doesn't
 make sense.

Bug 200155744

Change-Id: I0a9f65daa92d5b95292240587527a1d17d9f095e
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/921278
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

drivers/video/tegra/host/host1x/host1x_actmon_t124.c

index ee3ec5f..de67cc0 100644 (file)
@@ -198,13 +198,17 @@ static int host1x_actmon_init(struct host1x_actmon *actmon)
        val |= actmon_ctrl_actmon_enable_f(1);
        actmon_writel(actmon, val, actmon_ctrl_r());
 
-       /* setup watermark workers */
-       actmon->below_wmark_worker.actmon = actmon;
-       actmon->below_wmark_worker.type = ACTMON_INTR_BELOW_WMARK;
-       INIT_WORK(&actmon->below_wmark_worker.work, host1x_actmon_event_fn);
-       actmon->above_wmark_worker.actmon = actmon;
-       actmon->above_wmark_worker.type = ACTMON_INTR_ABOVE_WMARK;
-       INIT_WORK(&actmon->above_wmark_worker.work, host1x_actmon_event_fn);
+       if (engine_pdata->actmon_irq) {
+               /* setup watermark workers */
+               actmon->below_wmark_worker.actmon = actmon;
+               actmon->below_wmark_worker.type = ACTMON_INTR_BELOW_WMARK;
+               INIT_WORK(&actmon->below_wmark_worker.work,
+                               host1x_actmon_event_fn);
+               actmon->above_wmark_worker.actmon = actmon;
+               actmon->above_wmark_worker.type = ACTMON_INTR_ABOVE_WMARK;
+               INIT_WORK(&actmon->above_wmark_worker.work,
+                               host1x_actmon_event_fn);
+       }
 
        nvhost_intr_enable_host_irq(&nvhost_get_host(host_pdev)->intr,
                                    engine_pdata->actmon_irq,