diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-21 19:35:54 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-01-27 12:14:43 +0300 |
commit | 36904adf217ab0755cc2ef3fa186e01fd07a2aca (patch) | |
tree | 1ffd1ca7a1ff78b5c4922a6a18b175fc6e52e501 /drivers/gpu/drm/tegra/dc.c | |
parent | 62b9e06321a254c3039966cff831487498e831a5 (diff) | |
download | linux-36904adf217ab0755cc2ef3fa186e01fd07a2aca.tar.xz |
drm/tegra: Stop CRTC at CRTC disable time
Previously output drivers would all stop the display controller in their
disable path. However with the transition to atomic modesetting the
display controller needs to be kept running until all planes have been
disabled so that software can properly determine (using VBLANK counts)
when it is safe to remove the framebuffers associated with the planes.
Moving this code into the display controller's disable path also gets
rid of the duplication of this into all output drivers.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.c')
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index dab7ea261e74..915bbdc350ac 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -940,6 +940,7 @@ static void tegra_crtc_disable(struct drm_crtc *crtc) struct tegra_dc *dc = to_tegra_dc(crtc); struct drm_device *drm = crtc->dev; struct drm_plane *plane; + u32 value; drm_for_each_legacy_plane(plane, &drm->mode_config.plane_list) { if (plane->crtc == crtc) { @@ -953,6 +954,11 @@ static void tegra_crtc_disable(struct drm_crtc *crtc) } } + /* stop the display controller */ + value = tegra_dc_readl(dc, DC_CMD_DISPLAY_COMMAND); + value &= ~DISP_CTRL_MODE_MASK; + tegra_dc_writel(dc, value, DC_CMD_DISPLAY_COMMAND); + drm_crtc_vblank_off(crtc); tegra_dc_commit(dc); } |