summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
authorRaghavendra VK <rvk@nvidia.com>2012-08-27 11:00:12 -0700
committerVarun Colbert <vcolbert@nvidia.com>2012-09-10 14:29:21 -0700
commit30b0fef255afc76c510b8ccb6f3a517cdb82f9c8 (patch)
treea3ed70bf52e42e9d340bf4b67e7087a91156089d /drivers/video/tegra/dc/dc.c
parent75bdd482816eba85414a71b86535fa87db336aa3 (diff)
tegra: dc: Fix div by zero in frame time computation.
- Set frame duration to 0 in NULL modeset. bug 1039104 Reviewed-on: http://git-master/r/127603 (cherry picked from commit 604cda21d79ed168e9863f0122eb0c23fa1a901b) Change-Id: I0be1b96529e40a374e4507ecd3da990677d4cbd4 Signed-off-by: Raghavendra VK <rvk@nvidia.com> Reviewed-on: http://git-master/r/130943 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 434a8b9..d01df2f 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1097,11 +1097,13 @@ static void tegra_dc_continuous_irq(struct tegra_dc *dc, unsigned long status)
/* XXX: Not sure if we limit look ahead to 1 frame */
bool tegra_dc_is_within_n_vsync(struct tegra_dc *dc, s64 ts)
{
+ BUG_ON(!dc->frametime_ns);
return ((ts - dc->frame_end_timestamp) < dc->frametime_ns);
}
bool tegra_dc_does_vsync_separate(struct tegra_dc *dc, s64 new_ts, s64 old_ts)
{
+ BUG_ON(!dc->frametime_ns);
return (((new_ts - old_ts) > dc->frametime_ns)
|| (div_s64((new_ts - dc->frame_end_timestamp), dc->frametime_ns)
!= div_s64((old_ts - dc->frame_end_timestamp),