From patchwork Wed Nov 26 21:09:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5387961 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4A3B89F462 for ; Wed, 26 Nov 2014 21:09:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77A7B201FE for ; Wed, 26 Nov 2014 21:09:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2F0422016C for ; Wed, 26 Nov 2014 21:09:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 670A46E0FF; Wed, 26 Nov 2014 13:09:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E56D6E0FF for ; Wed, 26 Nov 2014 13:09:21 -0800 (PST) Received: by mail-qc0-f180.google.com with SMTP id i8so2740560qcq.11 for ; Wed, 26 Nov 2014 13:09: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=pv2B6Y8hClyO2kY/whWCI5dtkt3S87Y4VmbrikHiJnM=; b=Ga6c55v/AV5QnvJ/N6NcE2koSelfDd8oqdsVqy5iE3YNCLKX3Wm8Piu0URvl/qa96Q j7or9CxnkocEN7rksUXlpNqNEua64pmqxG98Fz7m4iIOjhaFOWMppImUT9nHWbaMko7w SpjFdxbuszlUOW1t+Kq7PHwmg5FsRKW1XI3E5E1ndJoGBK4flVQZHyOZEt0lWY4oEgJF k+ZLgCaAAeemy2p+r0Ik1vOaCpIycRKXCE/vr31mnfhc/nGW81xCS3uOKjkvtlK/m2zy 1lx+3xHVBdb7ublHy4W+eRIxrVEtKdac0VV6cANqwB+7kKVn0BjBeMk1upl1oxYfCT3f ALMg== X-Received: by 10.140.43.133 with SMTP id e5mr48823667qga.10.1417036160944; Wed, 26 Nov 2014 13:09:20 -0800 (PST) Received: from localhost.localdomain ([191.8.93.69]) by mx.google.com with ESMTPSA id n5sm4910678qat.13.2014.11.26.13.09.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 13:09:20 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/6] drm/exynos: add pipe param to exynos_drm_crtc_create() Date: Wed, 26 Nov 2014 19:09:01 -0200 Message-Id: <1417036145-11017-3-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417036145-11017-1-git-send-email-gustavo@padovan.org> References: <1417036145-11017-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 Get the pipe value from a parameter instead of getting it from manager->pipe. We are removing manager->pipe. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 2 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 1cdf705..68aae38 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -299,7 +299,7 @@ static void exynos_drm_crtc_attach_mode_property(struct drm_crtc *crtc) drm_object_attach_property(&crtc->base, prop, 0); } -int exynos_drm_crtc_create(struct exynos_drm_manager *manager) +int exynos_drm_crtc_create(struct exynos_drm_manager *manager, int pipe) { struct exynos_drm_crtc *exynos_crtc; struct drm_plane *plane; @@ -316,8 +316,8 @@ int exynos_drm_crtc_create(struct exynos_drm_manager *manager) exynos_crtc->dpms = DRM_MODE_DPMS_OFF; exynos_crtc->manager = manager; - exynos_crtc->pipe = manager->pipe; - plane = exynos_plane_init(manager->drm_dev, 1 << manager->pipe, + exynos_crtc->pipe = pipe; + plane = exynos_plane_init(manager->drm_dev, 1 << pipe, DRM_PLANE_TYPE_PRIMARY); if (IS_ERR(plane)) { ret = PTR_ERR(plane); @@ -327,7 +327,7 @@ int exynos_drm_crtc_create(struct exynos_drm_manager *manager) manager->crtc = &exynos_crtc->base; crtc = &exynos_crtc->base; - private->crtc[manager->pipe] = crtc; + private->crtc[pipe] = crtc; ret = drm_crtc_init_with_planes(manager->drm_dev, crtc, plane, NULL, &exynos_crtc_funcs); diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h index dbd4227..f1bee84 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h @@ -17,7 +17,7 @@ #include "exynos_drm_drv.h" -int exynos_drm_crtc_create(struct exynos_drm_manager *manager); +int exynos_drm_crtc_create(struct exynos_drm_manager *manager, int pipe); int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe); void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe); void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe); diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0c9def9..1f83a75 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -1102,7 +1102,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) struct drm_device *drm_dev = data; fimd_mgr_initialize(&ctx->manager, drm_dev); - exynos_drm_crtc_create(&ctx->manager); + exynos_drm_crtc_create(&ctx->manager, ctx->pipe); if (ctx->display) exynos_drm_create_enc_conn(drm_dev, ctx->display); diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 7f9ce73..e78764f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -558,7 +558,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) vidi_mgr_initialize(&ctx->manager, drm_dev); - ret = exynos_drm_crtc_create(&ctx->manager); + ret = exynos_drm_crtc_create(&ctx->manager, ctx->pipe); if (ret) { DRM_ERROR("failed to create crtc.\n"); return ret; diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index b64674a..9d7dcfc 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1256,7 +1256,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) if (ret) return ret; - ret = exynos_drm_crtc_create(&ctx->manager); + ret = exynos_drm_crtc_create(&ctx->manager, ctx->pipe); if (ret) { mixer_mgr_remove(&ctx->manager); return ret;