From patchwork Mon May 20 09:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 422 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A31BC3F36B for ; Mon, 20 May 2019 11:07:41 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id 94sf8790550plc.19 for ; Mon, 20 May 2019 02:07:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1558343260; cv=pass; d=google.com; s=arc-20160816; b=L/DPPyE/QsA5IRXarbpWrP1RP3H0qFvGBN+JwrRlJUkYOerB0090n22gO4haB6+uBI D+wyAoIhl5lb6BE30fwbo2BHmR5uzWPLyXFrGyhtSklowHMIITKR7awxskpfzD6n5pA9 erjrYOij44stUJYOe8d4ZmQY2UkLUH72k3kZF3KRNt6SG/9xhwT+0/wORUSL8hjRXtFP JwUQMd2g8tzGtR1Ii+oxLIsUM9ixcWO+4joEHPlIuAyNZQV/gncS+gOvEk1mIYw4MV2h TtMAYZBLc6syCdkAgmHokKvDBSQPpbuOXqMvWB74j3dBZQvRucUZU+Vm3W/xliq2e0dn KxGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6Cbnc+Gas+mxw4wb0a55B5CSmcehztrL4TzLftyw0cA=; b=uLr6tBMzQ9tdz6nXAjtUC2jtJivzcrcDBlOF4cQvvxofqMMifeNHwHJcohpehSFnUh ggSeSCnJDcE/EyexEikOmhQggWnV/E8D2Hxa5wYO+mbEpVWW9u6Snqozc9BOiQaLwEy0 MVJ42BQkkSE3wfTAx+eOcEWK0WyFgM5b0g5SNVrEv/xgbHLT/lspSaRuk/o1aKzksTmr vRxiW1KD9cK35eta1d8KJF+7hAO0NG/ti95gWDFFrT9TfhUCPceLyEfPEV43tnVVdFVj h61RyiTN6c3giBcFRNRLEs2WaGmSR5dTU/z4IHYREa8Y3G8l4oJitGsZ5MxuHVKzTnMk KdYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DZf0IHTg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=6Cbnc+Gas+mxw4wb0a55B5CSmcehztrL4TzLftyw0cA=; b=EOwAWRDwqMIYBlki4Jua5ermzjZfyV63mkEskJUzOJCzAC/tukdPGVYczLUzSH6Xah LEIezU7DtXgS8S9MRD4kSUGpMS7HOMhaWfQZ5vRMMOb+hDJ9fJU/IgnXky0SjFYdc+x1 W8jFYfvn6cRyX4WC3dav5yP2RQaAmjc2HTDTQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=6Cbnc+Gas+mxw4wb0a55B5CSmcehztrL4TzLftyw0cA=; b=fgYn/gprstwbbuxzECMwwvsQj/RmOoR/0IW8UVKiHNNL1gyVjCbBJG/vTWE9UV1Ghe KpMzVfLCjQJYauxWebmfE2MT5lXbOVcu/fpNWZhN/WOWLy1iICinyTQXN1A63EUCGr+P wSiKwygCUyfF7wjPx52xRmzA5R5PjPnz+KsmBge5bkKJjTGDXD/oAdO0Ay7M+DVqNMpI 07XHPdRyn4XWSaLqan+XFJweuqph9X7pWQYX4Av9KUsl2vDRDGu9VYv1kx2VALc/MWl4 +87ss3ZMGRM7WymajrU+lfxiem5rj392Gs+4VHYWHVCFCls6UivqyK5A+DphJKmVLe2K V+1A== X-Gm-Message-State: APjAAAX+KbFsVObgKmPxEAQ8Bo7/olOWAG269UsHV/I93bd+fytcnD7W LBOMqFCl2AZiCWjB8mjfVmtDDbh1 X-Google-Smtp-Source: APXvYqx60ii2IKqEVwQW1P6Mo8TrgbZ0IHnn+LZ/FiKvwlyRonjag4kgHLH8qU5K4tFq1b1+DVF77w== X-Received: by 2002:a63:2d0:: with SMTP id 199mr17002274pgc.188.1558343260504; Mon, 20 May 2019 02:07:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:474c:: with SMTP id u73ls5087183pfa.4.gmail; Mon, 20 May 2019 02:07:40 -0700 (PDT) X-Received: by 2002:a62:65c1:: with SMTP id z184mr59993196pfb.130.1558343260122; Mon, 20 May 2019 02:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558343260; cv=none; d=google.com; s=arc-20160816; b=b0y9wSO35AUvkA3ZSDhr8aFj7xB3WmEZMHFhBQ/3jFWUQhJ7AMetZk8zg4FiHhdPWr xhjnDubULYoQTijrJCORgjPiKcDh2vdPs9CXFR4NRsLXR2DqYIPNdWhaBoELhEK4KfyW Uq5RencPJ+bqzPF+tagfRoU3r1hxU6LCfQ5olHEQa9pKu9SEd/8gJZiXu20WLbNm14JS zmR6+nUb95TbZHu714789HFf3QaX39xUyNgDKBe5ZJM3jgDG5gPjL7k52Y0MiF2ndD0E Fsq4CGi27eD/fsAwMVQQsPPOYgsfdi5w587Jzypep+bNbiufbkuZmO/26dnCSFYklZWG mIWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=v9fCm6pJfwNnZtBLiOWDCiXX9M7MmpxMOv/deygL7hU=; b=qpkP9lFWS1miLpQWmpSOzofGFIMo28elEwteBhkunGtCweV5mMz/3F4uYIiAvRufzT wUSVMvZq/oxuAmx1yOu3bH5dQfJsibiG62a49Ymx5XTaMWGe1DiMaHvFHKzfD949FC4X fSGAxBvIXUnebCkeBy6aSYCinqj0gAeVmfaRHil03Kof6p4s+l6JdYBHe9bTcyIV1BLp xT6z5aVpO06gvjCvK3CocXcSP4GkIqFGWDMBxuIgTcmm5NhyBZa7YJ+ES5V3zYePpkvW ddwX26n/kHeYT1e86DEjfYoqeb8WAqTghBi6Bm+aIyBoLxow9HC2VDbX/1zOLyLsMC9I LfXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DZf0IHTg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a37sor789989pga.23.2019.05.20.02.07.40 for (Google Transport Security); Mon, 20 May 2019 02:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:ee0b:: with SMTP id e11mr21644801pgi.453.1558343259840; Mon, 20 May 2019 02:07:39 -0700 (PDT) Received: from localhost.localdomain ([183.82.227.193]) by smtp.gmail.com with ESMTPSA id d15sm51671614pfm.186.2019.05.20.02.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 02:07:39 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: bshah@mykolab.com, Vasily Khoruzhick , powerpan@qq.com, michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v10 05/11] drm/sun4i: tcon: Export get tcon0 routine Date: Mon, 20 May 2019 14:33:12 +0530 Message-Id: <20190520090318.27570-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190520090318.27570-1-jagan@amarulasolutions.com> References: <20190520090318.27570-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DZf0IHTg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Sometimes tcon attributes like tcon divider, clock rate etc are needed in interface drivers like DSI. So for such cases interface driver must probe the respective tcon and get the attributes. Since tcon0 probe is already available, via sun4i_get_tcon0 function, export the same instead of probing tcon explicitly. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 8f93121fead4..9e9d08ee8387 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -221,7 +221,7 @@ EXPORT_SYMBOL(sun4i_tcon_enable_vblank); * are located in TCON0. This helper returns a pointer to TCON0's * sun4i_tcon structure, or NULL if not found. */ -static struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) +struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) { struct sun4i_drv *drv = drm->dev_private; struct sun4i_tcon *tcon; @@ -235,6 +235,7 @@ static struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) return NULL; } +EXPORT_SYMBOL(sun4i_get_tcon0); static void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel, const struct drm_encoder *encoder) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h index 84cfb1952ff7..88e971d5f937 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -272,6 +272,7 @@ struct sun4i_tcon { struct drm_bridge *sun4i_tcon_find_bridge(struct device_node *node); struct drm_panel *sun4i_tcon_find_panel(struct device_node *node); +struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm); void sun4i_tcon_enable_vblank(struct sun4i_tcon *tcon, bool enable); void sun4i_tcon_mode_set(struct sun4i_tcon *tcon, const struct drm_encoder *encoder,