summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_encoder.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 57de0bdc5a3b..7b89fd520e45 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -32,17 +32,6 @@ struct exynos_drm_encoder {
struct exynos_drm_display *display;
};
-static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
-{
- struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
- struct exynos_drm_display *display = exynos_encoder->display;
-
- DRM_DEBUG_KMS("encoder dpms: %d\n", mode);
-
- if (display->ops->dpms)
- display->ops->dpms(display, mode);
-}
-
static bool
exynos_drm_encoder_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
@@ -76,12 +65,7 @@ static void exynos_drm_encoder_mode_set(struct drm_encoder *encoder,
display->ops->mode_set(display, adjusted_mode);
}
-static void exynos_drm_encoder_prepare(struct drm_encoder *encoder)
-{
- /* drm framework doesn't check NULL. */
-}
-
-static void exynos_drm_encoder_commit(struct drm_encoder *encoder)
+static void exynos_drm_encoder_enable(struct drm_encoder *encoder)
{
struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
struct exynos_drm_display *display = exynos_encoder->display;
@@ -95,24 +79,17 @@ static void exynos_drm_encoder_commit(struct drm_encoder *encoder)
static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
{
- struct drm_plane *plane;
- struct drm_device *dev = encoder->dev;
-
- exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
+ struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
+ struct exynos_drm_display *display = exynos_encoder->display;
- /* 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);
- }
+ if (display->ops->dpms)
+ display->ops->dpms(display, DRM_MODE_DPMS_OFF);
}
static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs = {
- .dpms = exynos_drm_encoder_dpms,
.mode_fixup = exynos_drm_encoder_mode_fixup,
.mode_set = exynos_drm_encoder_mode_set,
- .prepare = exynos_drm_encoder_prepare,
- .commit = exynos_drm_encoder_commit,
+ .enable = exynos_drm_encoder_enable,
.disable = exynos_drm_encoder_disable,
};