Commit c4d96f16 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Inki Dae

drm/exynos: remove unnecessary calls to disable_plane()

The planes are already disabled by the drm_atomic_helper_commit() code
so we don't need to disable the in these two places.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Tested-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 63498e30
...@@ -40,8 +40,6 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc) ...@@ -40,8 +40,6 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
static void exynos_drm_crtc_disable(struct drm_crtc *crtc) static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
{ {
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
struct drm_plane *plane;
int ret;
if (!exynos_crtc->enabled) if (!exynos_crtc->enabled)
return; return;
...@@ -57,15 +55,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc) ...@@ -57,15 +55,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
exynos_crtc->ops->dpms(exynos_crtc, DRM_MODE_DPMS_OFF); exynos_crtc->ops->dpms(exynos_crtc, DRM_MODE_DPMS_OFF);
exynos_crtc->enabled = false; exynos_crtc->enabled = false;
drm_for_each_legacy_plane(plane, &crtc->dev->mode_config.plane_list) {
if (plane->crtc != crtc)
continue;
ret = plane->funcs->disable_plane(plane);
if (ret)
DRM_ERROR("Failed to disable plane %d\n", ret);
}
} }
static bool static bool
......
...@@ -81,17 +81,9 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder) ...@@ -81,17 +81,9 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
{ {
struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder); struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
struct exynos_drm_display *display = exynos_encoder->display; struct exynos_drm_display *display = exynos_encoder->display;
struct drm_plane *plane;
struct drm_device *dev = encoder->dev;
if (display->ops->dpms) if (display->ops->dpms)
display->ops->dpms(display, DRM_MODE_DPMS_OFF); display->ops->dpms(display, DRM_MODE_DPMS_OFF);
/* all planes connected to this encoder should be also disabled. */
drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
if (plane->crtc && (plane->crtc == encoder->crtc))
plane->funcs->disable_plane(plane);
}
} }
static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs = { static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment