From c1e96e86172d5c91fdd6e952713f43f774e7eeca Mon Sep 17 00:00:00 2001 From: Naveen Kumar S Date: Tue, 5 Jan 2016 17:26:30 +0530 Subject: [PATCH] video: tegra: dc: cleanup cursor suspend code 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 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 --- drivers/video/tegra/dc/cursor.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/video/tegra/dc/cursor.c b/drivers/video/tegra/dc/cursor.c index 0c2277d035a..5c7507313be 100644 --- a/drivers/video/tegra/dc/cursor.c +++ b/drivers/video/tegra/dc/cursor.c @@ -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 @@ -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); -- 2.39.2