From patchwork Thu Dec 18 13:58:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5513571 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 68723BEEA8 for ; Thu, 18 Dec 2014 13:59:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CACE20A14 for ; Thu, 18 Dec 2014 13:59:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5D833209E1 for ; Thu, 18 Dec 2014 13:59:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6E40720F5; Thu, 18 Dec 2014 05:59:19 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f44.google.com (mail-qa0-f44.google.com [209.85.216.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CEDF720F5 for ; Thu, 18 Dec 2014 05:59:19 -0800 (PST) Received: by mail-qa0-f44.google.com with SMTP id bm13so805511qab.17 for ; Thu, 18 Dec 2014 05:59:19 -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=DTiXSq8ewWS0sF9oLZzWOnPdO6zu9V1Xb+4Z/VyjstU=; b=DNRT04eXl5TeB3x6in2BZFqHqTWsNyHiwSTUJ2IpafVqY2hGV0u5s9tOf+PnSxLBPl bAVjxbtHtRb6MeIjB6HTBQWYynhfEeGYoOREasB8y00uOninurFO+j5HzWZ+rM3QqfJZ 1+IPQELOkHQKDskoyNSpzJ0zNJGPpomOWbZ+fTn/DnUWubTiT5/O24C9JNg1RhkWn9mZ HNZ7FqsfjAN72heDulHkkm1o8a+zxbjmye/7WyowffcCO2JUQz6pT5LwQ1gQ6pHZfQdS 29+PHKfhcI4KsFIZwWtTcVZyZgwWykiYTuukL3qmD25MCmiXd5RdbL0RKqc46Gg7MRnp z/nA== X-Received: by 10.140.43.52 with SMTP id d49mr3590896qga.94.1418911158962; Thu, 18 Dec 2014 05:59:18 -0800 (PST) Received: from localhost.localdomain ([191.8.90.215]) by mx.google.com with ESMTPSA id c63sm6802505qgf.47.2014.12.18.05.59.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Dec 2014 05:59:18 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 04/29] drm/exynos: remove exynos_drm_crtc_plane_* wrappers Date: Thu, 18 Dec 2014 11:58:30 -0200 Message-Id: <1418911135-5207-5-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1418911135-5207-1-git-send-email-gustavo@padovan.org> References: <1418911135-5207-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 This functions were doing nothing but calling a manager op function, so remove them and call the manager directly. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 33 ------------------------------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 19 ++++++++++++++---- 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index e74b6fe..13c7ba5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -410,39 +410,6 @@ void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe) spin_unlock_irqrestore(&dev->event_lock, flags); } -void exynos_drm_crtc_plane_mode_set(struct drm_crtc *crtc, - struct exynos_drm_overlay *overlay) -{ - struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; - - if (manager->ops->win_mode_set) - manager->ops->win_mode_set(manager, overlay); -} - -void exynos_drm_crtc_plane_commit(struct drm_crtc *crtc, int zpos) -{ - struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; - - if (manager->ops->win_commit) - manager->ops->win_commit(manager, zpos); -} - -void exynos_drm_crtc_plane_enable(struct drm_crtc *crtc, int zpos) -{ - struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; - - if (manager->ops->win_enable) - manager->ops->win_enable(manager, zpos); -} - -void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos) -{ - struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; - - if (manager->ops->win_disable) - manager->ops->win_disable(manager, zpos); -} - void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb) { struct exynos_drm_manager *manager; diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index c7045a66..7d76861 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -76,6 +76,7 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc, uint32_t src_w, uint32_t src_h) { struct exynos_plane *exynos_plane = to_exynos_plane(plane); + struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; struct exynos_drm_overlay *overlay = &exynos_plane->overlay; unsigned int actual_w; unsigned int actual_h; @@ -141,7 +142,8 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc, plane->crtc = crtc; - exynos_drm_crtc_plane_mode_set(crtc, overlay); + if (manager->ops->win_mode_set) + manager->ops->win_mode_set(manager, overlay); return 0; } @@ -150,26 +152,35 @@ void exynos_plane_commit(struct drm_plane *plane) { struct exynos_plane *exynos_plane = to_exynos_plane(plane); struct exynos_drm_overlay *overlay = &exynos_plane->overlay; + struct exynos_drm_manager *manager = to_exynos_crtc(plane->crtc)->manager; - exynos_drm_crtc_plane_commit(plane->crtc, overlay->zpos); + if (manager->ops->win_commit) + manager->ops->win_commit(manager, overlay->zpos); } void exynos_plane_dpms(struct drm_plane *plane, int mode) { struct exynos_plane *exynos_plane = to_exynos_plane(plane); struct exynos_drm_overlay *overlay = &exynos_plane->overlay; + struct exynos_drm_manager *manager; if (mode == DRM_MODE_DPMS_ON) { if (exynos_plane->enabled) return; - exynos_drm_crtc_plane_enable(plane->crtc, overlay->zpos); + manager = to_exynos_crtc(plane->crtc)->manager; + if (manager->ops->win_enable) + manager->ops->win_enable(manager, overlay->zpos); + exynos_plane->enabled = true; } else { if (!exynos_plane->enabled) return; - exynos_drm_crtc_plane_disable(plane->crtc, overlay->zpos); + manager = to_exynos_crtc(plane->crtc)->manager; + if (manager->ops->win_disable) + manager->ops->win_disable(manager, overlay->zpos); + exynos_plane->enabled = false; } }