From: abhinavk@codeaurora.org
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Jonathan Marek <jonathan@marek.ca>,
Stephen Boyd <sboyd@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
freedreno@lists.freedesktop.org
Subject: Re: [Freedreno] [PATCH] drm/msm/dsi: drop gdsc regulator handling
Date: Thu, 01 Jul 2021 09:43:24 -0700 [thread overview]
Message-ID: <b1181efb3e55ca7fb52cbd1bd661a985@codeaurora.org> (raw)
In-Reply-To: <20210701000015.3347713-1-dmitry.baryshkov@linaro.org>
On 2021-06-30 17:00, Dmitry Baryshkov wrote:
> None of supported devies uses "gdsc" regulator for DSI. GDSC support is
> now implemented as a power domain. Drop old code and config handling
> gdsc regulator requesting and enabling.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
> drivers/gpu/drm/msm/dsi/dsi_cfg.c | 12 ++++--------
> drivers/gpu/drm/msm/dsi/dsi_host.c | 22 +++-------------------
> 2 files changed, 7 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c
> b/drivers/gpu/drm/msm/dsi/dsi_cfg.c
> index f3f1c03c7db9..32c37d7c2109 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c
> @@ -32,9 +32,8 @@ static const char * const dsi_6g_bus_clk_names[] = {
> static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = {
> .io_offset = DSI_6G_REG_SHIFT,
> .reg_cfg = {
> - .num = 4,
> + .num = 3,
> .regs = {
> - {"gdsc", -1, -1},
> {"vdd", 150000, 100}, /* 3.0 V */
> {"vdda", 100000, 100}, /* 1.2 V */
> {"vddio", 100000, 100}, /* 1.8 V */
> @@ -53,9 +52,8 @@ static const char * const dsi_8916_bus_clk_names[] =
> {
> static const struct msm_dsi_config msm8916_dsi_cfg = {
> .io_offset = DSI_6G_REG_SHIFT,
> .reg_cfg = {
> - .num = 3,
> + .num = 2,
> .regs = {
> - {"gdsc", -1, -1},
> {"vdda", 100000, 100}, /* 1.2 V */
> {"vddio", 100000, 100}, /* 1.8 V */
> },
> @@ -73,9 +71,8 @@ static const char * const dsi_8976_bus_clk_names[] =
> {
> static const struct msm_dsi_config msm8976_dsi_cfg = {
> .io_offset = DSI_6G_REG_SHIFT,
> .reg_cfg = {
> - .num = 3,
> + .num = 2,
> .regs = {
> - {"gdsc", -1, -1},
> {"vdda", 100000, 100}, /* 1.2 V */
> {"vddio", 100000, 100}, /* 1.8 V */
> },
> @@ -89,9 +86,8 @@ static const struct msm_dsi_config msm8976_dsi_cfg =
> {
> static const struct msm_dsi_config msm8994_dsi_cfg = {
> .io_offset = DSI_6G_REG_SHIFT,
> .reg_cfg = {
> - .num = 7,
> + .num = 6,
> .regs = {
> - {"gdsc", -1, -1},
> {"vdda", 100000, 100}, /* 1.25 V */
> {"vddio", 100000, 100}, /* 1.8 V */
> {"vcca", 10000, 100}, /* 1.0 V */
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
> b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index ed504fe5074f..66c425d4159c 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -203,35 +203,22 @@ static const struct msm_dsi_cfg_handler
> *dsi_get_config(
> {
> const struct msm_dsi_cfg_handler *cfg_hnd = NULL;
> struct device *dev = &msm_host->pdev->dev;
> - struct regulator *gdsc_reg;
> struct clk *ahb_clk;
> int ret;
> u32 major = 0, minor = 0;
>
> - gdsc_reg = regulator_get(dev, "gdsc");
> - if (IS_ERR(gdsc_reg)) {
> - pr_err("%s: cannot get gdsc\n", __func__);
> - goto exit;
> - }
> -
> ahb_clk = msm_clk_get(msm_host->pdev, "iface");
> if (IS_ERR(ahb_clk)) {
> pr_err("%s: cannot get interface clock\n", __func__);
> - goto put_gdsc;
> + goto exit;
> }
>
> pm_runtime_get_sync(dev);
>
> - ret = regulator_enable(gdsc_reg);
> - if (ret) {
> - pr_err("%s: unable to enable gdsc\n", __func__);
> - goto put_gdsc;
> - }
> -
> ret = clk_prepare_enable(ahb_clk);
> if (ret) {
> pr_err("%s: unable to enable ahb_clk\n", __func__);
> - goto disable_gdsc;
> + goto runtime_put;
> }
>
> ret = dsi_get_version(msm_host->ctrl_base, &major, &minor);
> @@ -246,11 +233,8 @@ static const struct msm_dsi_cfg_handler
> *dsi_get_config(
>
> disable_clks:
> clk_disable_unprepare(ahb_clk);
> -disable_gdsc:
> - regulator_disable(gdsc_reg);
> +runtime_put:
> pm_runtime_put_sync(dev);
> -put_gdsc:
> - regulator_put(gdsc_reg);
> exit:
> return cfg_hnd;
> }
next prev parent reply other threads:[~2021-07-01 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 0:00 [PATCH] drm/msm/dsi: drop gdsc regulator handling Dmitry Baryshkov
2021-07-01 16:43 ` abhinavk [this message]
2021-07-01 20:59 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1181efb3e55ca7fb52cbd1bd661a985@codeaurora.org \
--to=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sboyd@kernel.org \
--cc=sean@poorly.run \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).