aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c17
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_plane.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_plane.h5
3 files changed, 8 insertions, 16 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index a43e25d57a02..4c8bd4d1e861 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -117,12 +117,9 @@ static int exynos_drm_crtc_mode_set_commit(struct drm_crtc *crtc, int x, int y,
117 struct drm_framebuffer *old_fb) 117 struct drm_framebuffer *old_fb)
118{ 118{
119 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); 119 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
120 struct exynos_drm_manager *manager = exynos_crtc->manager;
121 struct exynos_drm_plane *exynos_plane = to_exynos_plane(crtc->primary);
122 struct drm_framebuffer *fb = crtc->primary->fb; 120 struct drm_framebuffer *fb = crtc->primary->fb;
123 unsigned int crtc_w; 121 unsigned int crtc_w;
124 unsigned int crtc_h; 122 unsigned int crtc_h;
125 int ret;
126 123
127 /* when framebuffer changing is requested, crtc's dpms should be on */ 124 /* when framebuffer changing is requested, crtc's dpms should be on */
128 if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) { 125 if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
@@ -133,18 +130,8 @@ static int exynos_drm_crtc_mode_set_commit(struct drm_crtc *crtc, int x, int y,
133 crtc_w = fb->width - x; 130 crtc_w = fb->width - x;
134 crtc_h = fb->height - y; 131 crtc_h = fb->height - y;
135 132
136 ret = exynos_plane_mode_set(crtc->primary, crtc, fb, 0, 0, 133 return exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
137 crtc_w, crtc_h, x, y, crtc_w, crtc_h); 134 crtc_w, crtc_h, x, y, crtc_w, crtc_h);
138 if (ret)
139 return ret;
140
141 if (manager->ops->win_commit)
142 manager->ops->win_commit(manager, exynos_plane->zpos);
143
144 if (manager->ops->commit)
145 manager->ops->commit(manager);
146
147 return 0;
148} 135}
149 136
150static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, 137static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
index aa9cc9a0a033..dadd30631c18 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
@@ -165,7 +165,7 @@ void exynos_plane_dpms(struct drm_plane *plane, int mode)
165 } 165 }
166} 166}
167 167
168static int 168int
169exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, 169exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
170 struct drm_framebuffer *fb, int crtc_x, int crtc_y, 170 struct drm_framebuffer *fb, int crtc_x, int crtc_y,
171 unsigned int crtc_w, unsigned int crtc_h, 171 unsigned int crtc_w, unsigned int crtc_h,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.h b/drivers/gpu/drm/exynos/exynos_drm_plane.h
index 3c239891926e..d25c079a3f44 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.h
@@ -14,6 +14,11 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
14 unsigned int crtc_w, unsigned int crtc_h, 14 unsigned int crtc_w, unsigned int crtc_h,
15 uint32_t src_x, uint32_t src_y, 15 uint32_t src_x, uint32_t src_y,
16 uint32_t src_w, uint32_t src_h); 16 uint32_t src_w, uint32_t src_h);
17int exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
18 struct drm_framebuffer *fb, int crtc_x, int crtc_y,
19 unsigned int crtc_w, unsigned int crtc_h,
20 uint32_t src_x, uint32_t src_y,
21 uint32_t src_w, uint32_t src_h);
17void exynos_plane_dpms(struct drm_plane *plane, int mode); 22void exynos_plane_dpms(struct drm_plane *plane, int mode);
18struct drm_plane *exynos_plane_init(struct drm_device *dev, 23struct drm_plane *exynos_plane_init(struct drm_device *dev,
19 unsigned long possible_crtcs, 24 unsigned long possible_crtcs,