From patchwork Mon Mar 11 13:36:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 153 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9791F3F087 for ; Mon, 11 Mar 2019 14:37:27 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id b12sf5872723pgj.7 for ; Mon, 11 Mar 2019 06:37:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1552311446; cv=pass; d=google.com; s=arc-20160816; b=M+ZQCgEBsugrx6RQWxWGV0zQEKp/qQEIJeQ2AdEObwJibAcqm+qU4xaEEcdjlVHza/ 6mGdHI1S0S8s4gosI7/5Rw+ci/B7s0y4RBAenaeHtSPHEroxq7tC5Sy2Dev7xSbLhiNw ije61QRbxZ2NvoS2F7qumQUc0ewDQik8eI5EThDwwZkb8TvBsQX7Sxw57b/TdZriGOhL SMK8Q5alR9ndRB9oG0z7B+R/xRy/OKe6fr8k/ONEbiUvUeezy6lmcPkdNP59nZZ/8r8z dBz2Gq+6PsrBvTYaP8ggPrpQSgRFFZVMiQNYx9UAxcDC5mKs9egMxYY3JAozyqHeEAM8 8GrA== 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=otq8NwEVgNm8vAMtgM1FqEJXzlkQrRxrBbsIDnnG74Y=; b=o1rdWyWYjIidHdbGH/aHTh5QMNG0PNP/eAxiGnZbTUaMby0wCRP5TC9RHXMhvVQzUi 9Ta0mltZuS8leZwXB6PzFid0W763GwlZMu1mgihva6yuEsIW4CbZospPigXJQM05ItPS ijqA9OSNRkwqih5Oc0NHrYGRnIjDvVHWKWYvmKETZ3O5j99wV0eXxVfv1xZqY3yIDLXk SbK7Gop15Km7623fIrQM0cIo2jSRaTE79xmPX1TVjzF3tJ0OOJbFAUUUJ2GveEip4DrE WIpPhUh14j8x3L6bhKVna/fm0/YDvYhu2pAPCAd7bk8NQWYvcbp582UYdVdausAzjcwn ekAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lyfEr09b; 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=otq8NwEVgNm8vAMtgM1FqEJXzlkQrRxrBbsIDnnG74Y=; b=YoD0tCbqdCQGidlkfkePnPSRp8mOdKBUL2e2aV3jgHRE+ccT4w84std9xQf0B3zKJ3 bubNuTTYlz+bqOVmnXMbfIiRbMVYTmJqOmwLaCJ7rmcdZ57alcxM/cwSxYY0K0XiE0LJ 4FKd2DXIDTuQ2TUUOAJUT+JvxjsAD3PZ01BFc= 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=otq8NwEVgNm8vAMtgM1FqEJXzlkQrRxrBbsIDnnG74Y=; b=BgYEpI9+osNjskYlH8Y/xO4eves44WHIlVL0cLOqGQKUnjxViZxflQzJPoPX6Tjqzj Mg2D2XqGhYEUXZ8acc5HINXQw3Y51DeIcbkdSCSYdZe1rg9p2A0pHcavS6BvdoNJ8Gnn b7EVeG3Gkvwxhvl2Phwy5oc9pF1F9OlYsYlS2zy6aIKkSUDzFveIYhOn7YcwnyBlP8Jr jH0kxdQZtiChstmB+7TZIbvYsuIMiz0C9FMl+QctmpVLCW4okf1rH1WTQECaNcj56ZuK 8dwzE8DR8Ajc7yB8TKI8T348th3Er74lbJ2MFYGY/vqdh1eqnMMd68NT018eoY5tLUTk 7knA== X-Gm-Message-State: APjAAAVc1YxaVF/SYRio6xKUEzdIJ/wyg5jpFS3T0RD+mgjzqTHypUOa +IXWwReac/LefFzruJ7KKIRysYyM X-Google-Smtp-Source: APXvYqxCoD5kBlIjNwcsCP+HADjZqGlVwA+UpOUy/l1K3Zg2ao69Z77nEPqv/FhcoGqxYI1GJgCx3Q== X-Received: by 2002:a62:1d0e:: with SMTP id d14mr12206916pfd.98.1552311446422; Mon, 11 Mar 2019 06:37:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:282b:: with SMTP id e40ls8834590plb.6.gmail; Mon, 11 Mar 2019 06:37:26 -0700 (PDT) X-Received: by 2002:a17:902:205:: with SMTP id 5mr30046623plc.336.1552311446098; Mon, 11 Mar 2019 06:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552311446; cv=none; d=google.com; s=arc-20160816; b=pF0BvN0w6q1S21B34n0fNZ1lQlbqmAEwVDNT709B0tQKSirEbyqUwjENwN9Ze5QjtW sZvZnmdSsFjzzU+r2yVdORy57bmewwuwOy7NxJAXqYuMs8fWShZH2gXHOrcpHCsQoTFO iXA6h/NdbpJ+mO9iSOyM6NKEsi6fmONtf6+scuvYK+3rAS68ZcYKHLR/tBH31gkKCd7m +ag+VC3ekojUwYKbY7aqJQSMj/2pRWrQXd1tHfX6xXS3pGMyq5AjYIaW3YFj4Fkx36wm wrWdObvarDRbIaEK3ZwRd5T9eLAn42keuL9PT3aeTb930ShUP62iPUfJRy0OtrS3LRBo LntA== 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=6wckgVcjU0hTcLberbqeJXR3An8TYASrxW/s4B8OxZU=; b=wtLHY9gfMExCNiJtqzk2WZnDvB5phX8gpKK2Wj6ODJ4LYYMcF6i3hEMSKqfgMXd9zj UVW2g7c79kfjc/q7W8HcMucwEU0wXJarHGnz5YMJM7o4rMsICnUBa8SjicYTBLlznsC/ Rw6936gdRNXdHtn+CeMEq6bvqrJZT+B0kPYob40ySC18RII35uC35pyhZOf8UShXhw2G 8LUJUl6SUJub5IlXxJBPoh7fZBJtWiKcu/KVc4FhE+HtnOSUCLvvvfCjYw/kn5FvutsP FpsCc0QAcEvEqtUqgsjb8b6wTSIJjfX86U7z6t+lbHPdxMTJu0LwldKafFe2gmi5aE4n NYpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lyfEr09b; 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 l98sor8357319plb.17.2019.03.11.06.37.26 for (Google Transport Security); Mon, 11 Mar 2019 06:37:26 -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:a17:902:ba84:: with SMTP id k4mr34530252pls.103.1552311445782; Mon, 11 Mar 2019 06:37:25 -0700 (PDT) Received: from localhost.localdomain ([183.82.224.199]) by smtp.gmail.com with ESMTPSA id s79sm9960397pfa.61.2019.03.11.06.37.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 06:37:25 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v8 03/15] drm/sun4i: tcon: Export get tcon0 routine Date: Mon, 11 Mar 2019 19:06:25 +0530 Message-Id: <20190311133637.18334-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190311133637.18334-1-jagan@amarulasolutions.com> References: <20190311133637.18334-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=lyfEr09b; 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 339f9b1f5745..6cf9661807aa 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 b5214d71610f..a52696db14a5 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -274,6 +274,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,