video: tegra: host: always update 3dfs status
Samuel Russell [Wed, 13 Mar 2013 21:09:02 +0000 (14:09 -0700)]
Always update 3dfs dev_status whether scaling is enabled or
disabled

Bug 1242049

Change-Id: Ifb2b9b3ee4134697aefbd99ff8234399770df0b4
Signed-off-by: Samuel Russell <samuelr@nvidia.com>
Reviewed-on: http://git-master/r/208953
(cherry picked from commit 4bfd0e76b36fdf3e88cedc5604af172695b5508b)
Reviewed-on: http://git-master/r/208981
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

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

index 06683aa..5b3ac8d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Tegra Graphics Host 3D clock scaling
  *
- * Copyright (c) 2013, NVIDIA Corporation.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -939,6 +939,10 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
        int stat;
        ktime_t now;
 
+       stat = df->profile->get_dev_status(df->dev.parent, &dev_stat);
+       if (stat < 0)
+               return stat;
+
        /* Ensure maximal clock when scaling is disabled */
        if (!podgov->enable) {
                *freq = df->max_freq;
@@ -973,10 +977,6 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
                return 0;
        }
 
-       stat = df->profile->get_dev_status(df->dev.parent, &dev_stat);
-       if (stat < 0)
-               return stat;
-
        /* Retrieve extended data */
        ext_stat = dev_stat.private_data;
        if (!ext_stat)