diff options
author | Mike J. Chen <mjchen@google.com> | 2013-12-03 14:51:09 -0800 |
---|---|---|
committer | Jon Mayo <jmayo@nvidia.com> | 2014-03-17 11:24:08 -0700 |
commit | f167709778f7057a3b981690656c3d0d239e43ba (patch) | |
tree | 1101a4e284a85bc2d8d3778b897f46e1f362e428 /drivers/video/tegra/dc/mode.c | |
parent | 8fdb56c5d010c1c57c90c91a39faeda1297c0418 (diff) |
video: tegra: dc: assert mode_dirty correctly
If the new mode is same as old mode, don't mark the mode as
dirty. This is to handle the case during boot where bootloader
has already set a mode so we don't want the kernel to reset it.
If the mode is dirty, tegra_dc_program_mode() will be called,
which changes clocks and can cause a HPD drop and a visual glitch.
Bug 1401958
Bug 1425201
Change-Id: I380d41dff17eebc61ca20f2c0c7be97bb398fb69
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Xia Yang <xiay@nvidia.com>
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/355338
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/video/tegra/dc/mode.c')
-rw-r--r-- | drivers/video/tegra/dc/mode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/mode.c b/drivers/video/tegra/dc/mode.c index 22c4fb6cf8d3..27520287639d 100644 --- a/drivers/video/tegra/dc/mode.c +++ b/drivers/video/tegra/dc/mode.c @@ -372,6 +372,11 @@ EXPORT_SYMBOL(tegra_dc_get_panel_sync_rate); static int _tegra_dc_set_mode(struct tegra_dc *dc, const struct tegra_dc_mode *mode) { + if (memcmp(&dc->mode, mode, sizeof(dc->mode)) == 0) { + /* mode is unchanged, just return */ + return 0; + } + memcpy(&dc->mode, mode, sizeof(dc->mode)); dc->mode_dirty = true; |