diff options
author | Raghavendra VK <rvk@nvidia.com> | 2012-08-27 11:00:12 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 01:25:58 -0700 |
commit | c5bfaff39dee6a5e3b7f50128e315fdea4e278f6 (patch) | |
tree | 9e06046eaa5334d96ef8b10c3755cf480298f316 /drivers/video/tegra/dc/mode.c | |
parent | 7205115e3241507b1c1d9e7fb58af589ac788def (diff) |
tegra: dc: Fix div by zero in frame time computation.
- Set frame duration to 0 in NULL modeset.
bug 1039104
Change-Id: I2b7d5a8a7c1748d8d582505946014e002326cbee
Signed-off-by: Raghavendra VK <rvk@nvidia.com>
Reviewed-on: http://git-master/r/127603
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Rebase-Id: R46793c4eae68c60a976767ef7b5f8b4ebe5194a7
Diffstat (limited to 'drivers/video/tegra/dc/mode.c')
-rw-r--r-- | drivers/video/tegra/dc/mode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/mode.c b/drivers/video/tegra/dc/mode.c index 6a17e3e7e518..963ced66be4c 100644 --- a/drivers/video/tegra/dc/mode.c +++ b/drivers/video/tegra/dc/mode.c @@ -144,7 +144,8 @@ static s64 calc_frametime_ns(const struct tegra_dc_mode *m) m->h_sync_width; v_total = m->v_active + m->v_front_porch + m->v_back_porch + m->v_sync_width; - return (s64)(div_s64(((s64)h_total * v_total * 1000000000ULL), m->pclk)); + return (!m->pclk) ? 0 : (s64)(div_s64(((s64)h_total * v_total * + 1000000000ULL), m->pclk)); } /* return in 1000ths of a Hertz */ |