]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: check DC suspend state
authorPankaj Dabade <pdabade@nvidia.com>
Fri, 14 Feb 2014 06:04:23 +0000 (11:34 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Fri, 21 Feb 2014 15:45:14 +0000 (07:45 -0800)
Check DC suspended state before updating window.
DC suspend function will disable dc but will only change
suspend status to true, while the enable status will
remain true. DC will be enabled by dc resume function.

bug 1452204

Change-Id: I55d44c8e84fd7025459dca1f9cec5a462aa1c842
Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/363764
(cherry picked from commit 9bb217d8c2c7c55cc54c6a2281429ba169f7ddb6)
Reviewed-on: http://git-master/r/372681
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
drivers/video/tegra/fb.c

index 7244af1c52823dc9f2962a6724c3adac7035a131..36e79dd18203b65bd1cb0532f0042f3c460f4e05 100644 (file)
@@ -6,7 +6,7 @@
  *         Colin Cross <ccross@android.com>
  *         Travis Geiselbrecht <travis@palm.com>
  *
- * Copyright (c) 2010-2013, NVIDIA CORPORATION, All rights reserved.
+ * Copyright (c) 2010-2014, NVIDIA CORPORATION, All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -306,8 +306,10 @@ static int tegra_fb_blank(int blank, struct fb_info *info)
                        tegra_fb->win->dc->win_blank_saved_flag = 0;
                }
                tegra_dc_enable(tegra_fb->win->dc);
-               tegra_dc_update_windows(&tegra_fb->win, 1);
-               tegra_dc_sync_windows(&tegra_fb->win, 1);
+               if (!tegra_fb->win->dc->suspended) {
+                       tegra_dc_update_windows(&tegra_fb->win, 1);
+                       tegra_dc_sync_windows(&tegra_fb->win, 1);
+               }
                return 0;
 
        case FB_BLANK_NORMAL:
@@ -375,8 +377,10 @@ static int tegra_fb_pan_display(struct fb_var_screeninfo *var,
                tegra_fb->win->flags |= TEGRA_WIN_FLAG_FB;
                tegra_fb->win->virt_addr = info->screen_base;
 
-               tegra_dc_update_windows(&tegra_fb->win, 1);
-               tegra_dc_sync_windows(&tegra_fb->win, 1);
+               if (!tegra_fb->win->dc->suspended) {
+                       tegra_dc_update_windows(&tegra_fb->win, 1);
+                       tegra_dc_sync_windows(&tegra_fb->win, 1);
+               }
        }
 
        return 0;