mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Douglas Anderson <dianders@chromium.org>,
	Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: dri-devel@lists.freedesktop.org,
	"Mark Brown" <broonie@kernel.org>,
	linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@somainline.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"David Airlie" <airlied@linux.ie>,
	"Jonathan Marek" <jonathan@marek.ca>,
	"José Expósito" <jose.exposito89@gmail.com>,
	"Konrad Dybcio" <konrad.dybcio@somainline.org>,
	"Loic Poulain" <loic.poulain@linaro.org>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Rajeev Nandan" <quic_rajeevny@quicinc.com>,
	"Sean Paul" <sean@poorly.run>,
	"Sireesh Kodali" <sireeshkodali1@gmail.com>,
	"Stephen Boyd" <swboyd@chromium.org>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Vladimir Lypak" <vladimir.lypak@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/6] drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const()
Date: Wed, 3 Aug 2022 10:18:57 +0300	[thread overview]
Message-ID: <228e5e34-6467-a75b-129d-2b37b32acf13@linaro.org> (raw)
In-Reply-To: <20220802153434.v3.5.I55a9e65cb1c22221316629e98768ff473f47a067@changeid>

On 03/08/2022 01:37, Douglas Anderson wrote:
> As of the commit 1de452a0edda ("regulator: core: Allow drivers to
> define their init data as const") we no longer need to do copying of
> regulator bulk data from initdata to something dynamic. Let's take
> advantage of that.
> 
> In addition to saving some code, this also moves us to using
> ARRAY_SIZE() to specify how many regulators we have which is less
> error prone.
> 
> This gets rid of some layers of wrappers which makes it obvious that
> we can get rid of an extra error print.
> devm_regulator_bulk_get_const() prints errors for you so you don't
> need an extra layer of printing.
> 
> In all cases here I have preserved the old settings without any
> investigation about whether the loads being set are sensible. In the
> cases of some of the PHYs if several PHYs in the same file used
> exactly the same settings I had them point to the same data structure.
> 
> NOTE: Though I haven't done the math, this is likely an overall
> savings in terms of "static const" data. We previously always
> allocated space for 8 supplies. Each of these supplies took up 36
> bytes of data (32 for name, 4 for an int).
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Ah, so to array conversion is already done. That's great.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


> ---
> 
> Changes in v3:
> - Do all the PHYs too.

It would have been easier if DSI and DSI PHY were split to separate patches.

> - Get rid of error print after devm_regulator_bulk_get_const().
> - Just directly call the bulk commands; get rid of the wrapper.
> - Update commit message to point at the git hash of the regulator change.
> 
> Changes in v2:
> - ("Take advantage of devm_regulator_bulk_get_const") new for v2.
> 
>   drivers/gpu/drm/msm/dsi/dsi.h                 |  12 --
>   drivers/gpu/drm/msm/dsi/dsi_cfg.c             | 172 +++++++++---------
>   drivers/gpu/drm/msm/dsi/dsi_cfg.h             |   3 +-
>   drivers/gpu/drm/msm/dsi/dsi_host.c            |  42 ++---
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy.c         |  37 +---
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy.h         |   5 +-
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c    |  20 +-
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c    |  32 ++--
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c    |  14 +-
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c    |  28 +--
>   .../gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c   |  12 +-
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c     |  32 ++--
>   12 files changed, 167 insertions(+), 242 deletions(-)

-- 
With best wishes
Dmitry

  reply	other threads:[~2022-08-03  7:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 22:37 [PATCH v3 0/6] drm/msm/dsi regulator improvements Douglas Anderson
2022-08-02 22:37 ` [PATCH v3 1/6] drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg Douglas Anderson
2022-08-03  7:01   ` Dmitry Baryshkov
2022-08-04  0:12   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 2/6] drm/msm/dsi: Fix number of regulators for SDM660 Douglas Anderson
2022-08-03  7:02   ` Dmitry Baryshkov
2022-08-03 14:25   ` Marijn Suijten
2022-08-04  0:14   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 3/6] drm/msm/dsi: Don't set a load before disabling a regulator Douglas Anderson
2022-08-03  7:07   ` Dmitry Baryshkov
2022-08-04  0:16   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 4/6] drm/msm/dsi: Use the new regulator bulk feature to specify the load Douglas Anderson
2022-08-03  7:12   ` Dmitry Baryshkov
2022-08-03 13:50     ` Doug Anderson
2022-08-04  0:18   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 5/6] drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const() Douglas Anderson
2022-08-03  7:18   ` Dmitry Baryshkov [this message]
2022-08-03 13:53     ` Doug Anderson
2022-08-04  2:00   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 6/6] drm/msm/dsi: Improve dsi_phy_driver_probe() probe error handling Douglas Anderson
2022-08-03  7:32   ` Dmitry Baryshkov
2022-08-03 13:54     ` Doug Anderson
2022-08-04  2:13   ` Abhinav Kumar
2022-08-03  7:37 ` [PATCH v3 0/6] drm/msm/dsi regulator improvements Dmitry Baryshkov

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=228e5e34-6467-a75b-129d-2b37b32acf13@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@linux.ie \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=jose.exposito89@gmail.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_rajeevny@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=sireeshkodali1@gmail.com \
    --cc=swboyd@chromium.org \
    --cc=vkoul@kernel.org \
    --cc=vladimir.lypak@gmail.com \
    /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

all inboxes | Powered by JetHome®