From: Gustavo Padovan Date: Tue, 25 Nov 2014 18:18:34 +0000 (-0200) Subject: drm/exynos: call exynos_update_plane() directly on page flips X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b9c45050348ba2dc2d74b2755bf2cb629a42a8f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/exynos: call exynos_update_plane() directly on page flips Avoid an extra call to exynos_drm_crtc_mode_set_commit() that only calls exynos_update_plane(). Signed-off-by: Gustavo Padovan Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 4c8bd4d1e861..185dabe4e2b7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -176,6 +176,7 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, struct exynos_drm_private *dev_priv = dev->dev_private; struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); struct drm_framebuffer *old_fb = crtc->primary->fb; + unsigned int crtc_w, crtc_h; int ret = -EINVAL; /* when the page flip is requested, crtc's dpms should be on */ @@ -207,8 +208,11 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, spin_unlock_irq(&dev->event_lock); crtc->primary->fb = fb; - ret = exynos_drm_crtc_mode_set_commit(crtc, crtc->x, crtc->y, - NULL); + crtc_w = fb->width - crtc->x; + crtc_h = fb->height - crtc->y; + ret = exynos_update_plane(crtc->primary, crtc, fb, 0, 0, + crtc_w, crtc_h, crtc->x, crtc->y, + crtc_w, crtc_h); if (ret) { crtc->primary->fb = old_fb;