diff options
author | Sean Paul <seanpaul@chromium.org> | 2014-01-30 16:19:17 -0500 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-03-24 00:36:33 +0900 |
commit | a9c4cd21390652c5eb473417bb962d20e372da03 (patch) | |
tree | 065a335e9a6f00011141ce8114e68c887f557bee /drivers/gpu/drm/exynos/exynos_drm_crtc.c | |
parent | 75626853a7a00633f24def1039df5aa55d051091 (diff) | |
download | linux-stable-a9c4cd21390652c5eb473417bb962d20e372da03.tar.gz linux-stable-a9c4cd21390652c5eb473417bb962d20e372da03.tar.bz2 linux-stable-a9c4cd21390652c5eb473417bb962d20e372da03.zip |
drm/exynos: Disable unused crtc planes from crtc
This patch moves the code which disables unused crtc planes from the
encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in
exynos, the only valid crtc change the pre-existing code could catch is
disconnecting an active crtc from the encoder. Thus it is functionally
equivalent to just disable all planes attached to a crtc when the crtc
is disabled.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_crtc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 5067bf45476c..7678ad08178e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -176,10 +176,19 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, static void exynos_drm_crtc_disable(struct drm_crtc *crtc) { - struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + struct drm_plane *plane; + int ret; - exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_OFF); exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); + + list_for_each_entry(plane, &crtc->dev->mode_config.plane_list, head) { + if (plane->crtc != crtc) + continue; + + ret = plane->funcs->disable_plane(plane); + if (ret) + DRM_ERROR("Failed to disable plane %d\n", ret); + } } static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { |