]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
dc: tegra: add check before calling cmu_aligned
authorArun Swain <arswain@nvidia.com>
Mon, 1 Jun 2015 17:47:21 +0000 (10:47 -0700)
committerMitch Luban <mluban@nvidia.com>
Sat, 27 Jun 2015 00:44:36 +0000 (17:44 -0700)
Check whether dc is enabled or not before
calling _tegra_dc_update_cmu_aligned.
"_tegra_dc_update_cmu_aligned" function.

When not checked, this ends up in a stack_dump
since NvCPLSvc service tries to set new cmu
values via frame_intr configuration even before
dc is enabled.

Bug 200072922
Bug 200100527

Change-Id: Ib39eaf6465fad7306c8870bec0ec57659931f8a2
Reviewed-on: http://git-master/r/750931
(cherry picked from commit 6f0845923071fb46b588391c2c721e56f7f25edd)
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/756575
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
drivers/video/tegra/dc/dc.c

index 42095430f4aba295cd6aa00daf88017f78a4d7ec..1cef28568c42995e3b9940e5d1b2d2352e87d2a1 100644 (file)
@@ -2127,6 +2127,10 @@ int tegra_dc_update_cmu_aligned(struct tegra_dc *dc, struct tegra_dc_cmu *cmu)
        int ret;
 
        mutex_lock(&dc->lock);
+       if (!dc->enabled) {
+               mutex_unlock(&dc->lock);
+               return 0;
+       }
        ret = _tegra_dc_update_cmu_aligned(dc, cmu, false);
        mutex_unlock(&dc->lock);