diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2012-06-27 14:27:05 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-07-27 11:13:53 +0900 |
commit | 4070d212eb54ec9f204646d95c17d95ad812a008 (patch) | |
tree | 26a65fbb910803715e0c984400c9fb8e2d43964d /drivers/gpu/drm/exynos/exynos_drm_encoder.c | |
parent | b5d2eb3bd691c0b6869a2013e719a61c595d73a6 (diff) | |
download | linux-4070d212eb54ec9f204646d95c17d95ad812a008.tar.bz2 |
drm/exynos: update overlay via plane from crtc
There is no any reason to update overlay at crtc directly because the
crtc uses plane. Move its code to plane and call proper functions of
plane from crtc.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_encoder.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_encoder.c | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 33f3c41869d7..c25bd4812594 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -323,30 +323,6 @@ void exynos_drm_disable_vblank(struct drm_encoder *encoder, void *data) manager_ops->disable_vblank(manager->dev); } -void exynos_drm_encoder_crtc_plane_commit(struct drm_encoder *encoder, - void *data) -{ - struct exynos_drm_manager *manager = - to_exynos_encoder(encoder)->manager; - struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; - int zpos = DEFAULT_ZPOS; - - if (data) - zpos = *(int *)data; - - if (overlay_ops && overlay_ops->commit) - overlay_ops->commit(manager->dev, zpos); -} - -void exynos_drm_encoder_crtc_commit(struct drm_encoder *encoder, void *data) -{ - int zpos = DEFAULT_ZPOS; - - DRM_DEBUG_KMS("%s\n", __FILE__); - - exynos_drm_encoder_crtc_plane_commit(encoder, &zpos); -} - void exynos_drm_encoder_dpms_from_crtc(struct drm_encoder *encoder, void *data) { struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder); @@ -393,44 +369,62 @@ void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data) } } -void exynos_drm_encoder_crtc_mode_set(struct drm_encoder *encoder, void *data) +void exynos_drm_encoder_crtc_pipe(struct drm_encoder *encoder, void *data) +{ + struct exynos_drm_manager *manager = + to_exynos_encoder(encoder)->manager; + int pipe = *(int *)data; + + DRM_DEBUG_KMS("%s\n", __FILE__); + + /* + * when crtc is detached from encoder, this pipe is used + * to select manager operation + */ + manager->pipe = pipe; +} + +void exynos_drm_encoder_plane_mode_set(struct drm_encoder *encoder, void *data) { struct exynos_drm_manager *manager = to_exynos_encoder(encoder)->manager; struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; struct exynos_drm_overlay *overlay = data; + DRM_DEBUG_KMS("%s\n", __FILE__); + if (overlay_ops && overlay_ops->mode_set) overlay_ops->mode_set(manager->dev, overlay); } -void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data) +void exynos_drm_encoder_plane_commit(struct drm_encoder *encoder, void *data) { struct exynos_drm_manager *manager = to_exynos_encoder(encoder)->manager; struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; int zpos = DEFAULT_ZPOS; - DRM_DEBUG_KMS("\n"); + DRM_DEBUG_KMS("%s\n", __FILE__); if (data) zpos = *(int *)data; - if (overlay_ops && overlay_ops->disable) - overlay_ops->disable(manager->dev, zpos); + if (overlay_ops && overlay_ops->commit) + overlay_ops->commit(manager->dev, zpos); } -void exynos_drm_encoder_crtc_pipe(struct drm_encoder *encoder, void *data) +void exynos_drm_encoder_plane_disable(struct drm_encoder *encoder, void *data) { struct exynos_drm_manager *manager = to_exynos_encoder(encoder)->manager; - int pipe = *(int *)data; + struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; + int zpos = DEFAULT_ZPOS; DRM_DEBUG_KMS("%s\n", __FILE__); - /* - * when crtc is detached from encoder, this pipe is used - * to select manager operation - */ - manager->pipe = pipe; + if (data) + zpos = *(int *)data; + + if (overlay_ops && overlay_ops->disable) + overlay_ops->disable(manager->dev, zpos); } |