diff options
author | Animesh Kishore <ankishore@nvidia.com> | 2013-02-26 07:07:06 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:04:02 -0400 |
commit | 0505b1130620e2bab5d0d2326193210c60f0d1ca (patch) | |
tree | 0771e93731beb2145bbbee7e2af7ef8ce393645e /drivers/video/tegra/dc/dsi.c | |
parent | b1593f058bd87c9d4471c0016a57f539b7558c71 (diff) |
video: tegra: dsi: Remove spurious warnings
Change-Id: I40b55d66258f06c1eb19dddc2815153b4f8346ec
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/204178
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 5f8418aa7..1f2ac513d 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -1566,13 +1566,13 @@ static void tegra_dsi_soft_reset(struct tegra_dc_dsi_data *dsi) | |||
1566 | u32 val; | 1566 | u32 val; |
1567 | u32 frame_period = DIV_ROUND_UP(S_TO_MS(1), dsi->info.refresh_rate); | 1567 | u32 frame_period = DIV_ROUND_UP(S_TO_MS(1), dsi->info.refresh_rate); |
1568 | struct tegra_dc_mode mode = dsi->dc->mode; | 1568 | struct tegra_dc_mode mode = dsi->dc->mode; |
1569 | u32 line_period = DIV_ROUND_UP( | 1569 | u32 tot_lines = mode.v_sync_width + mode.v_back_porch + |
1570 | MS_TO_US(frame_period), | 1570 | mode.v_active + mode.v_front_porch; |
1571 | mode.v_sync_width + mode.v_back_porch + | 1571 | u32 line_period = DIV_ROUND_UP(MS_TO_US(frame_period), tot_lines); |
1572 | mode.v_active + mode.v_front_porch); | ||
1573 | u32 timeout_cnt = 0; | 1572 | u32 timeout_cnt = 0; |
1574 | 1573 | ||
1575 | #define DSI_IDLE_TIMEOUT 1000 | 1574 | /* wait for 1 frame duration + few extra cycles for dsi to go idle */ |
1575 | #define DSI_IDLE_TIMEOUT (tot_lines + 5) | ||
1576 | 1576 | ||
1577 | val = tegra_dsi_readl(dsi, DSI_STATUS); | 1577 | val = tegra_dsi_readl(dsi, DSI_STATUS); |
1578 | while (!(val & DSI_STATUS_IDLE(0x1))) { | 1578 | while (!(val & DSI_STATUS_IDLE(0x1))) { |
@@ -1629,6 +1629,9 @@ static void tegra_dsi_stop_dc_stream(struct tegra_dc *dc, | |||
1629 | dsi->status.dc_stream = DSI_DC_STREAM_DISABLE; | 1629 | dsi->status.dc_stream = DSI_DC_STREAM_DISABLE; |
1630 | } | 1630 | } |
1631 | 1631 | ||
1632 | /* wait for frame end interrupt or (timeout_n_frames * 1 frame duration) | ||
1633 | * whichever happens to occur first | ||
1634 | */ | ||
1632 | static int tegra_dsi_wait_frame_end(struct tegra_dc *dc, | 1635 | static int tegra_dsi_wait_frame_end(struct tegra_dc *dc, |
1633 | struct tegra_dc_dsi_data *dsi, | 1636 | struct tegra_dc_dsi_data *dsi, |
1634 | u32 timeout_n_frames) | 1637 | u32 timeout_n_frames) |
@@ -1648,6 +1651,7 @@ static int tegra_dsi_wait_frame_end(struct tegra_dc *dc, | |||
1648 | 1651 | ||
1649 | reinit_completion(&dc->frame_end_complete); | 1652 | reinit_completion(&dc->frame_end_complete); |
1650 | 1653 | ||
1654 | tegra_dc_flush_interrupt(dc, FRAME_END_INT); | ||
1651 | /* unmask frame end interrupt */ | 1655 | /* unmask frame end interrupt */ |
1652 | val = tegra_dc_unmask_interrupt(dc, FRAME_END_INT); | 1656 | val = tegra_dc_unmask_interrupt(dc, FRAME_END_INT); |
1653 | 1657 | ||
@@ -1668,18 +1672,12 @@ static void tegra_dsi_stop_dc_stream_at_frame_end(struct tegra_dc *dc, | |||
1668 | struct tegra_dc_dsi_data *dsi, | 1672 | struct tegra_dc_dsi_data *dsi, |
1669 | u32 timeout_n_frames) | 1673 | u32 timeout_n_frames) |
1670 | { | 1674 | { |
1671 | long timeout; | ||
1672 | |||
1673 | tegra_dsi_stop_dc_stream(dc, dsi); | 1675 | tegra_dsi_stop_dc_stream(dc, dsi); |
1674 | 1676 | ||
1675 | timeout = tegra_dsi_wait_frame_end(dc, dsi, timeout_n_frames); | 1677 | tegra_dsi_wait_frame_end(dc, dsi, timeout_n_frames); |
1676 | 1678 | ||
1677 | tegra_dsi_soft_reset(dsi); | 1679 | tegra_dsi_soft_reset(dsi); |
1678 | 1680 | ||
1679 | if (timeout == 0) | ||
1680 | dev_warn(&dc->ndev->dev, | ||
1681 | "DC doesn't stop at end of frame.\n"); | ||
1682 | |||
1683 | tegra_dsi_reset_underflow_overflow(dsi); | 1681 | tegra_dsi_reset_underflow_overflow(dsi); |
1684 | } | 1682 | } |
1685 | 1683 | ||