aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_plane.c33
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_plane.h1
2 files changed, 6 insertions, 28 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
index 358cff67e5ce..2dfb847d0ce0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
@@ -145,32 +145,6 @@ void exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
145 exynos_crtc->ops->win_mode_set(exynos_crtc, exynos_plane); 145 exynos_crtc->ops->win_mode_set(exynos_crtc, exynos_plane);
146} 146}
147 147
148void exynos_plane_dpms(struct drm_plane *plane, int mode)
149{
150 struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
151 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(plane->crtc);
152
153 if (mode == DRM_MODE_DPMS_ON) {
154 if (exynos_plane->enabled)
155 return;
156
157 if (exynos_crtc->ops->win_enable)
158 exynos_crtc->ops->win_enable(exynos_crtc,
159 exynos_plane->zpos);
160
161 exynos_plane->enabled = true;
162 } else {
163 if (!exynos_plane->enabled)
164 return;
165
166 if (exynos_crtc->ops->win_disable)
167 exynos_crtc->ops->win_disable(exynos_crtc,
168 exynos_plane->zpos);
169
170 exynos_plane->enabled = false;
171 }
172}
173
174int 148int
175exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, 149exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
176 struct drm_framebuffer *fb, int crtc_x, int crtc_y, 150 struct drm_framebuffer *fb, int crtc_x, int crtc_y,
@@ -199,7 +173,12 @@ exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
199 173
200static int exynos_disable_plane(struct drm_plane *plane) 174static int exynos_disable_plane(struct drm_plane *plane)
201{ 175{
202 exynos_plane_dpms(plane, DRM_MODE_DPMS_OFF); 176 struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
177 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(plane->crtc);
178
179 if (exynos_crtc->ops->win_disable)
180 exynos_crtc->ops->win_disable(exynos_crtc,
181 exynos_plane->zpos);
203 182
204 return 0; 183 return 0;
205} 184}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.h b/drivers/gpu/drm/exynos/exynos_drm_plane.h
index 59d40755095b..9d3c374e7b3e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.h
@@ -20,7 +20,6 @@ int exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
20 unsigned int crtc_w, unsigned int crtc_h, 20 unsigned int crtc_w, unsigned int crtc_h,
21 uint32_t src_x, uint32_t src_y, 21 uint32_t src_x, uint32_t src_y,
22 uint32_t src_w, uint32_t src_h); 22 uint32_t src_w, uint32_t src_h);
23void exynos_plane_dpms(struct drm_plane *plane, int mode);
24struct drm_plane *exynos_plane_init(struct drm_device *dev, 23struct drm_plane *exynos_plane_init(struct drm_device *dev,
25 unsigned long possible_crtcs, 24 unsigned long possible_crtcs,
26 enum drm_plane_type type); 25 enum drm_plane_type type);