]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: cleanup cursor suspend code
authorNaveen Kumar S <nkumars@nvidia.com>
Tue, 5 Jan 2016 11:56:30 +0000 (17:26 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 8 Jan 2016 23:02:06 +0000 (15:02 -0800)
DC_DISP_DISP_WIN_OPTIONS was being read but not updated
with ~CURSOR_ENABLE. Removed redundant code and used
existing function set_cursor_enable() which writes back
to DC_DISP_DISP_WIN_OPTIONS to suspend cursor.

bug 200146453

Change-Id: Ie1f9d73e899aa65e58576d743d720a077ce8d1c8
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/929065
(cherry picked from commit 87f4831a3563bcb4146f0ac83d0fe6d981748317)
Reviewed-on: http://git-master/r/930302
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
drivers/video/tegra/dc/cursor.c

index 0c2277d035a1936ffc5592e2130434751fb2f6f2..5c7507313be45d4c1b399b7986bfe944c0b33295 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * drivers/video/tegra/dc/cursor.c
  *
- * Copyright (c) 2011-2014, NVIDIA CORPORATION, All rights reserved.
+ * Copyright (c) 2011-2016, NVIDIA CORPORATION, All rights reserved.
  *
  * Author:
  *  Robert Morell <rmorell@nvidia.com>
@@ -361,14 +361,11 @@ int tegra_dc_cursor_clip(struct tegra_dc *dc, unsigned clip)
 /* disable the cursor on suspend. but leave the state unmodified */
 int tegra_dc_cursor_suspend(struct tegra_dc *dc)
 {
-       u32 val;
-
        if (!dc->enabled)
                return 0;
        mutex_lock(&dc->lock);
        tegra_dc_get(dc);
-       val = tegra_dc_readl(dc, DC_DISP_DISP_WIN_OPTIONS);
-       val &= ~CURSOR_ENABLE;
+       set_cursor_enable(dc, false);
        tegra_dc_cursor_do_update(dc, true);
        dc->cursor.dirty = true;
        tegra_dc_put(dc);