From patchwork Wed Nov 26 18:10:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5387261 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 A8B4EC11AD for ; Wed, 26 Nov 2014 18:11:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA39220160 for ; Wed, 26 Nov 2014 18:11:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D931D201EF for ; Wed, 26 Nov 2014 18:11:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DD016E67C; Wed, 26 Nov 2014 10:11:16 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f174.google.com (mail-qc0-f174.google.com [209.85.216.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AF8E6E676 for ; Wed, 26 Nov 2014 10:11:15 -0800 (PST) Received: by mail-qc0-f174.google.com with SMTP id c9so2468946qcz.33 for ; Wed, 26 Nov 2014 10:11:14 -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=rWAUcmt2z4qHmLGAxRBFiLpUtUyCspaMH3DB0XpyspI=; b=VkYeoayumoKmO5SYwN6qAM4sslAdvYtKgk9d2peSR7fwVrir1Im6ITmlgsHx/6RiPn xizzINBE+TDoui1CS/YnTFw+FJS31fDbsa+6QTxsF2iW6cZAd+lPqvIKjN3vis6Yzn0M Td7IWxp8ZUTTqxuJlVXpnZ59F/94jjDb+BQK4lLawKlxAYH4E4zI9uTu6hyvKZGGDnyq EsLLzZ7vaaNTnDxG3pWzDxFzkory0h119/MfD6J0lxB1zG3nt5+osyiEHNu4h0hH3TKP IKE8tuqY8suFwsx1s6yYxeKrGTL2SCTrO+NyzTr3KDnBAHDQdx3RQB4L/8Uhpa1k4Asy qt0w== X-Received: by 10.140.81.6 with SMTP id e6mr12298950qgd.90.1417025474701; Wed, 26 Nov 2014 10:11:14 -0800 (PST) Received: from localhost.localdomain ([191.8.93.69]) by mx.google.com with ESMTPSA id n8sm4483509qaz.40.2014.11.26.10.11.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 10:11:13 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/6] drm/exynos: remove exynos_plane_commit() wrapper Date: Wed, 26 Nov 2014 16:10:51 -0200 Message-Id: <1417025454-3916-4-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 It's doing nothing but calling exynos_crtc->ops->win_commit(), so let's call this directly to avoid extra layers of abstraction. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 +++- drivers/gpu/drm/exynos/exynos_drm_plane.c | 15 +++++---------- drivers/gpu/drm/exynos/exynos_drm_plane.h | 1 - 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index e946b5f5..a43e25d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -59,10 +59,12 @@ static void exynos_drm_crtc_commit(struct drm_crtc *crtc) { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); struct exynos_drm_manager *manager = exynos_crtc->manager; + struct exynos_drm_plane *exynos_plane = to_exynos_plane(crtc->primary); exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON); - exynos_plane_commit(crtc->primary); + if (manager->ops->win_commit) + manager->ops->win_commit(manager, exynos_plane->zpos); if (manager->ops->commit) manager->ops->commit(manager); diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index 4fe3c2b..aa9cc9a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -139,15 +139,6 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc, return 0; } -void exynos_plane_commit(struct drm_plane *plane) -{ - struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); - struct exynos_drm_manager *manager = to_exynos_crtc(plane->crtc)->manager; - - if (manager->ops->win_commit) - manager->ops->win_commit(manager, exynos_plane->zpos); -} - void exynos_plane_dpms(struct drm_plane *plane, int mode) { struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); @@ -181,6 +172,9 @@ exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) { + + struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; + struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); int ret; ret = exynos_plane_mode_set(plane, crtc, fb, crtc_x, crtc_y, @@ -189,7 +183,8 @@ exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, if (ret < 0) return ret; - exynos_plane_commit(plane); + if (manager->ops->win_commit) + manager->ops->win_commit(manager, exynos_plane->zpos); return 0; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.h b/drivers/gpu/drm/exynos/exynos_drm_plane.h index 0d1986b..3c23989 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.h +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.h @@ -14,7 +14,6 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc, unsigned int crtc_w, unsigned int crtc_h, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h); -void exynos_plane_commit(struct drm_plane *plane); void exynos_plane_dpms(struct drm_plane *plane, int mode); struct drm_plane *exynos_plane_init(struct drm_device *dev, unsigned long possible_crtcs,