From patchwork Fri Nov 16 16:39:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 48 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 03F1C2E53B4 for ; Fri, 16 Nov 2018 17:40:17 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id 202sf15224279pgb.6 for ; Fri, 16 Nov 2018 08:40:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542386415; cv=pass; d=google.com; s=arc-20160816; b=ck/B+Km+6Ks04GnoQ0lvUA/GTfLwtNtjjfGsNpbH1EN7ORzN/GZA2aQ+32f/vsTKyY hihVfcJGrDPSVgg4fsiKRwVPhB/NPiY/dwD3dl0SnsrD1R9kvnaQ5uSmMF/Q96pD3lcg GOfRkFsuwkHYLmh+UCKkDOM2kSAekfClHfgX/hKNwWpPO42WCL15WT/I7wYeYLxp2fDM v3vRhVbLox6TRwhXDfyo84iJcEfbMIrJCp0MHfOKZkZps1Ts1x600zLqCGSDBA7AtoOL qf38UNe62zLrC6ImzJj6QZ0sYlF38vjcNb1Np0HE1ivh9oMokFpILp7JgWkIHSmjI50i PAlg== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gDd9dwA7Hm3WuIogwPjaX9WwN0ho9g9ngVvPoG/csZ0=; b=xWd7MlU8neOw4bmlRIFkKcmBMLj5LFLOARaGKeC8MZz8f7mnkLQ89DLfUG9rRrwy/P cM/lE6451Bqa1H0ouKWsvWlaODACMG9pI7NoJSiEcmwy5ibsSEzd5eeX+802wc7mmNn7 HLSkQEwOZaP6XWJaunGTTtYoCIblRy8L866udZUj1U0BXu/1d4vfdZLkq8uAbRWPpune 3F2HMRaRL9K3yk1cVSONf80hGY+Of+9uw3an1kbxNj492kvivEHk4YpX2QxMzABsHmNF G3VdEpswDVevbQy3CmxwHLyiEjd+yjKllNcJmqVeQEKPTXTPqDDbn0oDQIMtGG7AAxHv YfkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gQD9oYMw; 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:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=gDd9dwA7Hm3WuIogwPjaX9WwN0ho9g9ngVvPoG/csZ0=; b=gvv5EKIuMUmy6RTTLJMn6gR+9leVTnz9FSj/IPzao1Z392GdI7tnk5aQMVy1YwrTxw TWl0wuYwx7ao49wiklVWvLPJXD7CfgLR+U9Q9AQ8muGDBFjoTyEANjNwKCze/csbAHq+ i3KHbo7CyxXQ6jiG6JfU5WnOwAFg7iCSX0tHI= 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:content-transfer-encoding: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=gDd9dwA7Hm3WuIogwPjaX9WwN0ho9g9ngVvPoG/csZ0=; b=dWfurt/igTUCm1i1we8XcPdTCbKGxBXJF+Zi6invvjP7GZw19aoTH14kUodQJ43wYW qazrtFVAJE2JiEv1LJ5p3MvjcNAFEZ/cGMdwvE/wGLGD059Wf7SCq1Y33eO3utGsMxuw wuZGz1OV92jvUKpDJyuZntM+6lBe0dUuTO1xSVLIS8ErMyhXMtheEP4iBuFUs84X2Csb R6xDb+1Tp/Q8qvERkJ/qT5Sr+EChWa0bAAP4/qpNGa1cJP9UPWrJsf7Kc+PtNpck9CTW bX6c98BvP3BwTKNvQa0qamp1aRC3Z/Rlp9eFQ8emRxneKqQ120WV/yqkk61m8kWb+Q/j yCTg== X-Gm-Message-State: AGRZ1gI2ejQ3jh17hlcPQiybGCBbZgCOSIBFww4nlfOhThBTn9lOB/dK LMDcP91W9y0S6+1Va+q/TXd/aw82 X-Google-Smtp-Source: AJdET5eAsT3vpGGs6px14Xf5nN2kan7Q4EjypKzMbLG63+hR1fde8PSJjMlipV810KI33/TFOijjxw== X-Received: by 2002:a63:4c22:: with SMTP id z34mr2630838pga.111.1542386415720; Fri, 16 Nov 2018 08:40:15 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:41c7:: with SMTP id b7ls6124350pgq.11.gmail; Fri, 16 Nov 2018 08:40:15 -0800 (PST) X-Received: by 2002:a65:4946:: with SMTP id q6mr10299905pgs.201.1542386415400; Fri, 16 Nov 2018 08:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542386415; cv=none; d=google.com; s=arc-20160816; b=canV0LxYOD1zxuHxp8lUV+jNB5/5vZ5Jl1W4MwPG17x5GgZVHNhr5PRLimZdW9A8hv VDsT2RgR6aq41E+tfvkoziJLYIvmHu6+qTFMUaihhwfi1fhgkVYoXGyXTOL3IkXO+G1K xrxYfzVMRUrFvfwcH4WF6vyBIXlRhs3HITiurbYnVkMKf9v6GeKeiXmdIAs7zi3SykmA 2xgI+Jyad1fy4Da4qG2Mywfzak7DOvH/d88Cl+rXVjiW3sEiMPGz7TIK5oZPnFfsASyj GKfALiR5O/3MeTSMszQG2TxHVaAm16UxmVT8EEF87g4eE/dEj/keBH/2PsQPUz9BNBhN I5HQ== 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=gDd9dwA7Hm3WuIogwPjaX9WwN0ho9g9ngVvPoG/csZ0=; b=OMOIMdl2zoPIxdad7pO/Oi62erScpiXVtMsRaRvtstFKTOrON/vFi81/So2ajHME58 GD1Dizy7eSYt77As2MkpIOxKguUXbvY3v2Bw2ppxc9zbohZItfGemy3UEdKl3U3/v790 WGL+Y6rua0uYwGmVozOX7tPZLJS08GeQvxFS9m24nTcPKmga+FaBkgu4OA9pj3+qOp7Z nASRM9EX+GMALAJ3Dd3tB9U6H1/4mrMnvEjRCurZgRrHbs3mOIBagst5aG2Jx8M1fHzs kTCEpTUaC3r09txo65x4scjmLoj0lfJqa8aOGZCr5LXnbLyXItZqDW84Df2CudOger3K KdDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gQD9oYMw; 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 d39-v6sor37419329pla.28.2018.11.16.08.40.15 for (Google Transport Security); Fri, 16 Nov 2018 08:40:15 -0800 (PST) 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:a17:902:d03:: with SMTP id 3-v6mr9444498plu.66.1542386415050; Fri, 16 Nov 2018 08:40:15 -0800 (PST) Received: from localhost.localdomain ([115.97.190.86]) by smtp.gmail.com with ESMTPSA id p5-v6sm34622213pfb.109.2018.11.16.08.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 08:40:14 -0800 (PST) From: Jagan Teki To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Rob Herring , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Thierry Reding , Mark Rutland , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michael Trimarchi , TL Lim , linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Cc: Jagan Teki Subject: [PATCH v2 05/12] drm/sun4i: tcon: Export get tcon0 routine Date: Fri, 16 Nov 2018 22:09:09 +0530 Message-Id: <20181116163916.29621-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181116163916.29621-1-jagan@amarulasolutions.com> References: <20181116163916.29621-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=gQD9oYMw; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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. Instead of probing tcon explictly, better export the existing sun5i_get_tcon0 so-that the relevant interface can reuse. Signed-off-by: Jagan Teki --- 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 c78cd35a1294..6e85a33c6828 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); 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 3d492c8be1fc..195deb9db57a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -273,6 +273,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,