From patchwork Mon Nov 24 18:21:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5368851 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 B9361C11AC for ; Mon, 24 Nov 2014 18:21:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A20720211 for ; Mon, 24 Nov 2014 18:21:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2379F20272 for ; Mon, 24 Nov 2014 18:21:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A3756E6C9; Mon, 24 Nov 2014 10:21:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by gabe.freedesktop.org (Postfix) with ESMTP id B48486E2FC for ; Mon, 24 Nov 2014 10:21:20 -0800 (PST) Received: by mail-qa0-f47.google.com with SMTP id s7so6703447qap.6 for ; Mon, 24 Nov 2014 10:21:20 -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=ZDlbbT9GAYea/ecx77t58PI1jo11EHi431iVOupk4qKHEvJ746M7N7hJSn+A/4mz9H 1yM2TTHT3cnpgqb0Onk+rKBk9JZT7UK8dFXCnXMcWt9E1UH9MISazArjfARbjxudxz2t RxP7veSC6ZpbuCLoC/b3HxjWACMYawn0sSaVG6BjEGf+O/oAjb3xdVtkKTN9kFezMdmJ q5+3NnVlf1assCjlDTMb3YxVcmmfdV3UMGfV+a6XPAV+Vkxq/zkn9M71GrCJSsGwh6A/ m4TcJDpCCe3+qqkzQBcYogcmMfHkLVixBlBF1AvNr9qXQusJi/jbxmriNd+huCKgLL/T +MFQ== X-Received: by 10.229.240.138 with SMTP id la10mr30539029qcb.13.1416853280213; Mon, 24 Nov 2014 10:21:20 -0800 (PST) Received: from localhost.localdomain ([187.34.44.229]) by mx.google.com with ESMTPSA id g12sm1403650qay.44.2014.11.24.10.21.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 10:21:19 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/4] drm/exynos: remove exynos_drm_crtc_plane_* wrappers Date: Mon, 24 Nov 2014 16:21:05 -0200 Message-Id: <1416853266-10584-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1416853266-10584-1-git-send-email-gustavo@padovan.org> References: <1416853266-10584-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; } }