From patchwork Mon Jul 6 14:20:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6725071 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EDAEF9F319 for ; Mon, 6 Jul 2015 14:21:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C0B620723 for ; Mon, 6 Jul 2015 14:21:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15F5520591 for ; Mon, 6 Jul 2015 14:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168AbbGFOVm (ORCPT ); Mon, 6 Jul 2015 10:21:42 -0400 Received: from mail-qk0-f173.google.com ([209.85.220.173]:33817 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbbGFOVm (ORCPT ); Mon, 6 Jul 2015 10:21:42 -0400 Received: by qkeo142 with SMTP id o142so117995104qke.1 for ; Mon, 06 Jul 2015 07:21:41 -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=Pfh7WxqlDdobN2e+qJ8L9G8haCuEjGkz9/vdmTqQsaE=; b=CemAU64BTmlCmEW9V4Xqp4Zzov9pgYCKQQAf8mKHnrzoPONiO+GXUGEVFEG6VB6pAp uyp5ygu0WiLR8iMz+688+K72UHKS5OnHB9PzLrStQfAR1uBsdnbd4TaxB4RkrslHiTGZ Laq9BNNed9mlkXmr8igBh/QOj7y+/xxfNiCponcaV2aOw23DFomrvmc0Y6fudb0rl24s si0jUsJTFl87Eu0OmJuqCYJx/YAlB3lrD5jsG4KdwPDRur6F9jNXkFxcb35nGo6ygJF8 PpkjfQUJqvE6zpL2IwwbwHVz/ZG3kuqz0BfQZ1m945TmbBVmgFMYB8KtLuiJU9VFHkiE 2+sg== X-Received: by 10.140.49.11 with SMTP id p11mr72330694qga.60.1436192501580; Mon, 06 Jul 2015 07:21:41 -0700 (PDT) Received: from jade.localdomain ([191.255.48.48]) by mx.google.com with ESMTPSA id f207sm1707424qhc.41.2015.07.06.07.21.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 07:21:40 -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 v2 22/23] drm/exynos: fold encoder setup into exynos_drm_load() Date: Mon, 6 Jul 2015 11:20:23 -0300 Message-Id: <1436192424-18194-23-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436192424-18194-1-git-send-email-gustavo@padovan.org> References: <1436192424-18194-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.6 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 3542f2c..f3fcc2a 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) @@ -70,7 +72,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);