From patchwork Mon Aug 3 19:09:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6932841 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8759FC05AD for ; Mon, 3 Aug 2015 19:10:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE4F520634 for ; Mon, 3 Aug 2015 19:10:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D54F20632 for ; Mon, 3 Aug 2015 19:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754896AbbHCTKa (ORCPT ); Mon, 3 Aug 2015 15:10:30 -0400 Received: from mail-yk0-f178.google.com ([209.85.160.178]:34293 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754870AbbHCTKa (ORCPT ); Mon, 3 Aug 2015 15:10:30 -0400 Received: by ykax123 with SMTP id x123so119069077yka.1 for ; Mon, 03 Aug 2015 12:10:29 -0700 (PDT) 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=vNW8Q6letKhG7FMWWUZ2LGHHjW/XqvLtOj2Dvh0U1OU=; b=g3gZ/y/pQXColUjArNh+MFlk7F4PxKZlAB7VVn1My8rt1MpKrJlxiqn8l/bIlZjyf8 iOe0NtKqybnQ/w2UZj5toU3Lcq8ChNxLJFACDK3BoKG9pjAltxJ4zU5OBVW6KFCiD2Dq FO6rsH5U8OBUa8wAnBKWrZW5BWtLviu7c/FUlQUFL9mww3xSexmmjl8rMCLKXQQ6I1dX RUYEXGhhU/SQ7CNEt+eMXRfcRmMXIVh4jFd3/iOj9Peji8Q6hvjvWKL/aYe/CY6ysWqp hQ3XEhcnu7nqHlr9Kdt4UlY9/rbY3fKLz7ZLr/9wKpPpHKu7nc0xAmzxE7vGR0Zk9jIk ikOQ== X-Received: by 10.129.30.214 with SMTP id e205mr22158232ywe.157.1438629029584; Mon, 03 Aug 2015 12:10:29 -0700 (PDT) Received: from jade.localdomain ([187.64.235.140]) by smtp.gmail.com with ESMTPSA id i130sm15006226ywb.21.2015.08.03.12.10.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 12:10:29 -0700 (PDT) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com, jy0922.shim@samsung.com, tjakobi@math.uni-bielefeld.de, Gustavo Padovan Subject: [PATCH 10/11] drm/exynos: fold encoder setup into exynos_drm_load() Date: Mon, 3 Aug 2015 16:09:57 -0300 Message-Id: <1438628998-3435-11-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1438628998-3435-1-git-send-email-gustavo@padovan.org> References: <1438628998-3435-1-git-send-email-gustavo@padovan.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 As we are removing the exynos encoder move the encoder setup operation directly inside the exynos_drm_load() Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 12 ++++++++++-- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 13 ------------- drivers/gpu/drm/exynos/exynos_drm_encoder.h | 1 - 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index f1d6966..105f10e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -41,7 +41,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) { struct exynos_drm_private *private; - int ret; + struct drm_encoder *encoder; + unsigned int clone_mask; + int cnt, ret; private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL); if (!private) @@ -67,7 +69,13 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) exynos_drm_mode_config_init(dev); /* setup possible_clones. */ - exynos_drm_encoder_setup(dev); + cnt = 0; + clone_mask = 0; + list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) + clone_mask |= (1 << (cnt++)); + + list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) + encoder->possible_clones = clone_mask; platform_set_drvdata(dev->platformdev, dev); diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 4ed360b..d45a5c5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -78,19 +78,6 @@ static struct drm_encoder_funcs exynos_encoder_funcs = { .destroy = drm_encoder_cleanup, }; -void exynos_drm_encoder_setup(struct drm_device *dev) -{ - struct drm_encoder *encoder; - unsigned int clone_mask = 0; - int cnt = 0; - - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) - clone_mask |= (1 << (cnt++)); - - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) - encoder->possible_clones = clone_mask; -} - int exynos_drm_encoder_create(struct drm_device *dev, struct exynos_drm_encoder *exynos_encoder, enum exynos_drm_output_type type) diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.h b/drivers/gpu/drm/exynos/exynos_drm_encoder.h index e998b82..6610dee 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.h +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.h @@ -16,7 +16,6 @@ #include "exynos_drm_drv.h" -void exynos_drm_encoder_setup(struct drm_device *dev); int exynos_drm_encoder_create(struct drm_device *dev, struct exynos_drm_encoder *encoder, enum exynos_drm_output_type type);