Skip to content

Commit d9ea625

Browse files
Joonyoung Shimdaeinki
Joonyoung Shim
authored andcommitted
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 <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent f27829a commit d9ea625

File tree

2 files changed

+6
-28
lines changed

2 files changed

+6
-28
lines changed

drivers/gpu/drm/exynos/exynos_drm_plane.c

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -145,32 +145,6 @@ void exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
145145
exynos_crtc->ops->win_mode_set(exynos_crtc, exynos_plane);
146146
}
147147

148-
void 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-
174148
int
175149
exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
176150
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,
199173

200174
static int exynos_disable_plane(struct drm_plane *plane)
201175
{
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);
203182

204183
return 0;
205184
}

drivers/gpu/drm/exynos/exynos_drm_plane.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ int exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
2020
unsigned int crtc_w, unsigned int crtc_h,
2121
uint32_t src_x, uint32_t src_y,
2222
uint32_t src_w, uint32_t src_h);
23-
void exynos_plane_dpms(struct drm_plane *plane, int mode);
2423
struct drm_plane *exynos_plane_init(struct drm_device *dev,
2524
unsigned long possible_crtcs,
2625
enum drm_plane_type type);

0 commit comments

Comments
 (0)