video: tegra: host: Check governor on suspend
Arto Merilainen [Tue, 4 Jun 2013 08:21:37 +0000 (11:21 +0300)]
nvhost_scale3d_suspend() assumed that if it was called and devfreq was
in place, also the governor matched with the current one. However, this
is a wrong assumption as the function is defined in pdata.

Change-Id: I660180bc317c42582d01d72ea97545252e5fa1e0
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/235913
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

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

index 0811486..f177565 100644 (file)
@@ -218,8 +218,10 @@ void nvhost_scale3d_suspend(struct platform_device *dev)
                return;
 
        mutex_lock(&df->lock);
+
        podgov = df->data;
-       if (!(podgov && podgov->enable)) {
+       if (!(df->governor == &nvhost_podgov &&
+             podgov && podgov->enable)) {
                mutex_unlock(&df->lock);
                return;
        }