From: abhinavk@codeaurora.org
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: freedreno@lists.freedesktop.org,
Jonathan Marek <jonathan@marek.ca>,
Stephen Boyd <sboyd@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
Bjorn Andersson <bjorn.andersson@linaro.org>,
David Airlie <airlied@linux.ie>, Sean Paul <sean@poorly.run>
Subject: Re: [PATCH v2 4/4] drm/msm/dsi: add DSI PHY registers to snapshot data
Date: Tue, 27 Apr 2021 15:14:18 -0700 [thread overview]
Message-ID: <c567806ed6024e5c8b6b8a948632fc71@codeaurora.org> (raw)
In-Reply-To: <20210427001828.2375555-5-dmitry.baryshkov@linaro.org>
On 2021-04-26 17:18, Dmitry Baryshkov wrote:
> Add DSI PHY registers to the msm state snapshots to be able to check
> their contents.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
> drivers/gpu/drm/msm/dsi/dsi.c | 1 +
> drivers/gpu/drm/msm/dsi/dsi.h | 1 +
> drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 31 +++++++++++++++++++++++----
> drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 4 ++++
> 4 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.c
> b/drivers/gpu/drm/msm/dsi/dsi.c
> index 322d2e535df0..75afc12a7b25 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi.c
> @@ -269,5 +269,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi,
> struct drm_device *dev,
> void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct
> msm_dsi *msm_dsi)
> {
> msm_dsi_host_snapshot(disp_state, msm_dsi->host);
> + msm_dsi_phy_snapshot(disp_state, msm_dsi->phy);
> }
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.h
> b/drivers/gpu/drm/msm/dsi/dsi.h
> index b5679cf89413..cea73f9c4be9 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.h
> +++ b/drivers/gpu/drm/msm/dsi/dsi.h
> @@ -176,6 +176,7 @@ int msm_dsi_phy_get_clk_provider(struct msm_dsi_phy
> *phy,
> struct clk **byte_clk_provider, struct clk **pixel_clk_provider);
> void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy);
> int msm_dsi_phy_pll_restore_state(struct msm_dsi_phy *phy);
> +void msm_dsi_phy_snapshot(struct msm_disp_state *disp_state, struct
> msm_dsi_phy *phy);
>
> #endif /* __DSI_CONNECTOR_H__ */
>
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> index f0a2ddf96a4b..bf7a4c20c13c 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> @@ -658,14 +658,14 @@ static int dsi_phy_driver_probe(struct
> platform_device *pdev)
> phy->regulator_ldo_mode = of_property_read_bool(dev->of_node,
> "qcom,dsi-phy-regulator-ldo-mode");
>
> - phy->base = msm_ioremap(pdev, "dsi_phy", "DSI_PHY");
> + phy->base = msm_ioremap_size(pdev, "dsi_phy", "DSI_PHY",
> &phy->base_size);
> if (IS_ERR(phy->base)) {
> DRM_DEV_ERROR(dev, "%s: failed to map phy base\n", __func__);
> ret = -ENOMEM;
> goto fail;
> }
>
> - phy->pll_base = msm_ioremap(pdev, "dsi_pll", "DSI_PLL");
> + phy->pll_base = msm_ioremap_size(pdev, "dsi_pll", "DSI_PLL",
> &phy->pll_size);
> if (IS_ERR(phy->pll_base)) {
> DRM_DEV_ERROR(&pdev->dev, "%s: failed to map pll base\n", __func__);
> ret = -ENOMEM;
> @@ -673,7 +673,7 @@ static int dsi_phy_driver_probe(struct
> platform_device *pdev)
> }
>
> if (phy->cfg->has_phy_lane) {
> - phy->lane_base = msm_ioremap(pdev, "dsi_phy_lane", "DSI_PHY_LANE");
> + phy->lane_base = msm_ioremap_size(pdev, "dsi_phy_lane",
> "DSI_PHY_LANE", &phy->lane_size);
> if (IS_ERR(phy->lane_base)) {
> DRM_DEV_ERROR(&pdev->dev, "%s: failed to map phy lane base\n",
> __func__);
> ret = -ENOMEM;
> @@ -682,7 +682,7 @@ static int dsi_phy_driver_probe(struct
> platform_device *pdev)
> }
>
> if (phy->cfg->has_phy_regulator) {
> - phy->reg_base = msm_ioremap(pdev, "dsi_phy_regulator",
> "DSI_PHY_REG");
> + phy->reg_base = msm_ioremap_size(pdev, "dsi_phy_regulator",
> "DSI_PHY_REG", &phy->reg_size);
> if (IS_ERR(phy->reg_base)) {
> DRM_DEV_ERROR(&pdev->dev, "%s: failed to map phy regulator
> base\n", __func__);
> ret = -ENOMEM;
> @@ -868,3 +868,26 @@ int msm_dsi_phy_pll_restore_state(struct
> msm_dsi_phy *phy)
>
> return 0;
> }
> +
> +void msm_dsi_phy_snapshot(struct msm_disp_state *disp_state, struct
> msm_dsi_phy *phy)
> +{
> + msm_disp_snapshot_add_block(disp_state,
> + phy->base_size, phy->base,
> + "dsi%d_phy", phy->id);
> +
> + /* Do not try accessing PLL registers if it is switched off */
> + if (phy->pll_on)
> + msm_disp_snapshot_add_block(disp_state,
> + phy->pll_size, phy->pll_base,
> + "dsi%d_pll", phy->id);
> +
> + if (phy->lane_base)
> + msm_disp_snapshot_add_block(disp_state,
> + phy->lane_size, phy->lane_base,
> + "dsi%d_lane", phy->id);
> +
> + if (phy->reg_base)
> + msm_disp_snapshot_add_block(disp_state,
> + phy->reg_size, phy->reg_base,
> + "dsi%d_reg", phy->id);
> +}
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
> b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
> index 94a77ac364d3..5b0feef87127 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
> @@ -85,6 +85,10 @@ struct msm_dsi_phy {
> void __iomem *pll_base;
> void __iomem *reg_base;
> void __iomem *lane_base;
> + phys_addr_t base_size;
> + phys_addr_t pll_size;
> + phys_addr_t reg_size;
> + phys_addr_t lane_size;
> int id;
>
> struct clk *ahb_clk;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-04-27 22:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 0:18 [PATCH v2 0/4] drm/msm: improve register snapshotting Dmitry Baryshkov
2021-04-27 0:18 ` [PATCH v2 1/4] drm/msm: pass dump state as a function argument Dmitry Baryshkov
2021-04-27 0:18 ` [PATCH v2 2/4] drm/msm: make msm_disp_state transient data struct Dmitry Baryshkov
2021-04-27 19:19 ` [Freedreno] " abhinavk
2021-04-27 20:29 ` Dmitry Baryshkov
2021-04-27 22:11 ` abhinavk
2021-04-27 0:18 ` [PATCH v2 3/4] drm/msm: get rid of msm_iomap_size Dmitry Baryshkov
2021-04-27 19:29 ` [Freedreno] " abhinavk
2021-04-27 20:32 ` Dmitry Baryshkov
2021-04-27 22:12 ` abhinavk
2021-04-28 2:47 ` Bjorn Andersson
2021-04-28 13:41 ` Dmitry Baryshkov
2021-04-28 13:59 ` Bjorn Andersson
2021-04-28 14:03 ` Dmitry Baryshkov
2021-04-27 0:18 ` [PATCH v2 4/4] drm/msm/dsi: add DSI PHY registers to snapshot data Dmitry Baryshkov
2021-04-27 22:14 ` abhinavk [this message]
2021-04-27 19:10 ` [PATCH v2 0/4] drm/msm: improve register snapshotting abhinavk
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=c567806ed6024e5c8b6b8a948632fc71@codeaurora.org \
--to=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--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=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).