aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2015-02-05 02:11:37 -0500
committerInki Dae <inki.dae@samsung.com>2015-02-09 09:56:35 -0500
commitd9ea62566dbda7afb63c790057f3243f51abf771 (patch)
tree6d0676a3b93b4e0b7ccd9849abd9c48993a43168
parentf27829a184ed3bf44b952fa299f399513bdb0a18 (diff)
drm/exynos: remove exynos_plane_dpms
The exynos_plane_dpms function handles enabled flag of exynos plane and calls internal hw driver callback function for hw overlay on/off. But it causes state disharmory problem currently and is will be obstacle to apply atomic operation later to keep non-standard per-plane dpms state like enabled flag. Let's remove enabled flag, it just stop to recall internal callback function but hw drivers can handle it properly. And call internal callback function directly then we can remove unnecessary exynos_plane_dpms function Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-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);