From patchwork Wed Nov 26 18:10:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5387301 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC799C11AD for ; Wed, 26 Nov 2014 18:11:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21C1F201EF for ; Wed, 26 Nov 2014 18:11:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0D20C20107 for ; Wed, 26 Nov 2014 18:11:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 505236E676; Wed, 26 Nov 2014 10:11:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A8F76E666 for ; Wed, 26 Nov 2014 10:11:22 -0800 (PST) Received: by mail-qg0-f44.google.com with SMTP id z60so2477658qgd.3 for ; Wed, 26 Nov 2014 10:11:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5eozsMmvjFZMOo+eYh01wOQKO9xZii+sBzYtS9clRdc=; b=erJ8zOcePF69zAyRodgmEGETlmC4FIiUyY9Tn3s8L9rQF33xcfKHNPg9C/wlu6yut2 5+kkOQGgt+ftqPeCaVqgKjzermWIlkCYXTdpPdrydhJ7r2oemaftdL+5pJTo75m+u6ra Vz5lDIro1yst5aYp8KKkxBznLqP5sdjQuVbruZclh9bIR9HZ2hwPOvT64BB2ajZnP/eK AGwCjRX0K4VtBkKnyMrdV/43NEy5IsGG+IBsKE8dm6MYmLQ06edVPCO+24yHv/Lv8Kz0 HxxdGC9DIL2n7iMz2vaTRqAAsNAzoi+ssH9Ei1u+FfWaBoga2M3VQmOYd5kvvMPGcKjy KHpQ== X-Received: by 10.140.34.21 with SMTP id k21mr46468640qgk.21.1417025481675; Wed, 26 Nov 2014 10:11:21 -0800 (PST) Received: from localhost.localdomain ([191.8.93.69]) by mx.google.com with ESMTPSA id n8sm4483509qaz.40.2014.11.26.10.11.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 10:11:20 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 5/6] drm/exynos: call exynos_update_plane() directly on page flips Date: Wed, 26 Nov 2014 16:10:53 -0200 Message-Id: <1417025454-3916-6-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417025454-3916-1-git-send-email-gustavo@padovan.org> References: <1417025454-3916-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Avoid an extra call to exynos_drm_crtc_mode_set_commit() that only calls exynos_update_plane(). Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 4c8bd4d..185dabe 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;