dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
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>, Rob Clark <robdclark@gmail.com>,
	Sean Paul <sean@poorly.run>
Subject: Re: [Freedreno] [PATCH 7/8] drm/msm/dsi: drop msm_dsi_phy_get_shared_timings
Date: Mon, 21 Jun 2021 15:41:47 -0700	[thread overview]
Message-ID: <68887c25ff97c62ad65fdbfda3b7b66f@codeaurora.org> (raw)
In-Reply-To: <20210515131217.1540412-8-dmitry.baryshkov@linaro.org>

On 2021-05-15 06:12, Dmitry Baryshkov wrote:
> Instead of fetching shared timing through an extra function call, get
> them directly from msm_dsi_phy_enable. This would allow removing phy
> timings from the struct msm_dsi_phy in the next patch.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/dsi/dsi.h         |  5 ++---
>  drivers/gpu/drm/msm/dsi/dsi_manager.c |  3 +--
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 13 +++++--------
>  3 files changed, 8 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.h 
> b/drivers/gpu/drm/msm/dsi/dsi.h
> index 2041980548f0..84f9900ff878 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.h
> +++ b/drivers/gpu/drm/msm/dsi/dsi.h
> @@ -163,10 +163,9 @@ struct msm_dsi_phy_clk_request {
>  void msm_dsi_phy_driver_register(void);
>  void msm_dsi_phy_driver_unregister(void);
>  int msm_dsi_phy_enable(struct msm_dsi_phy *phy,
> -			struct msm_dsi_phy_clk_request *clk_req);
> +			struct msm_dsi_phy_clk_request *clk_req,
> +			struct msm_dsi_phy_shared_timings *shared_timings);
>  void msm_dsi_phy_disable(struct msm_dsi_phy *phy);
> -void msm_dsi_phy_get_shared_timings(struct msm_dsi_phy *phy,
> -			struct msm_dsi_phy_shared_timings *shared_timing);
>  void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
>  			     enum msm_dsi_phy_usecase uc);
>  void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy);
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 12efc8c69046..88d56a2bc8ab 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -118,8 +118,7 @@ static int enable_phy(struct msm_dsi *msm_dsi,
> 
>  	msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_dual_dsi);
> 
> -	ret = msm_dsi_phy_enable(msm_dsi->phy, &clk_req);
> -	msm_dsi_phy_get_shared_timings(msm_dsi->phy, shared_timings);
> +	ret = msm_dsi_phy_enable(msm_dsi->phy, &clk_req, shared_timings);
> 
>  	return ret;
>  }
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> index feaeb34b7071..53a02c02dd6e 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> @@ -752,7 +752,8 @@ void __exit msm_dsi_phy_driver_unregister(void)
>  }
> 
>  int msm_dsi_phy_enable(struct msm_dsi_phy *phy,
> -			struct msm_dsi_phy_clk_request *clk_req)
> +			struct msm_dsi_phy_clk_request *clk_req,
> +			struct msm_dsi_phy_shared_timings *shared_timings)
>  {
>  	struct device *dev = &phy->pdev->dev;
>  	int ret;
> @@ -780,6 +781,9 @@ int msm_dsi_phy_enable(struct msm_dsi_phy *phy,
>  		goto phy_en_fail;
>  	}
> 
> +	memcpy(shared_timings, &phy->timing.shared_timings,
> +	       sizeof(*shared_timings));
> +
>  	/*
>  	 * Resetting DSI PHY silently changes its PLL registers to reset 
> status,
>  	 * which will confuse clock driver and result in wrong output rate of
> @@ -819,13 +823,6 @@ void msm_dsi_phy_disable(struct msm_dsi_phy *phy)
>  	dsi_phy_disable_resource(phy);
>  }
> 
> -void msm_dsi_phy_get_shared_timings(struct msm_dsi_phy *phy,
> -			struct msm_dsi_phy_shared_timings *shared_timings)
> -{
> -	memcpy(shared_timings, &phy->timing.shared_timings,
> -	       sizeof(*shared_timings));
> -}
> -
>  void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
>  			     enum msm_dsi_phy_usecase uc)
>  {

  reply	other threads:[~2021-06-21 22:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 13:12 [PATCH 0/8] dsi: rework clock parents and timing handling Dmitry Baryshkov
2021-05-15 13:12 ` [PATCH 1/8] arm64: dts: qcom: sc7180: assign DSI clock source parents Dmitry Baryshkov
2021-06-21 22:08   ` [Freedreno] " abhinavk
2021-05-15 13:12 ` [PATCH 2/8] arm64: dts: qcom: sdm845: " Dmitry Baryshkov
2021-06-21 22:08   ` [Freedreno] " abhinavk
2021-05-15 13:12 ` [PATCH 3/8] arm64: dts: qcom: sdm845-mtp: " Dmitry Baryshkov
2021-06-21 22:08   ` [Freedreno] " abhinavk
2021-05-15 13:12 ` [PATCH 4/8] arm64: dts: qcom: sm8250: " Dmitry Baryshkov
2021-06-21 22:09   ` abhinavk
2021-05-15 13:12 ` [PATCH 5/8] drm/msm/dsi: stop setting clock parents manually Dmitry Baryshkov
2021-06-21 22:10   ` [Freedreno] " abhinavk
2021-05-15 13:12 ` [PATCH 6/8] drm/msm/dsi: phy: use of_device_get_match_data Dmitry Baryshkov
2021-06-21 22:11   ` [Freedreno] " abhinavk
2021-05-15 13:12 ` [PATCH 7/8] drm/msm/dsi: drop msm_dsi_phy_get_shared_timings Dmitry Baryshkov
2021-06-21 22:41   ` abhinavk [this message]
2021-05-15 13:12 ` [PATCH 8/8] drm/msm/dsi: remove msm_dsi_dphy_timing from msm_dsi_phy Dmitry Baryshkov
2021-06-21 22:43   ` [Freedreno] " abhinavk
2021-06-21 22:57     ` Dmitry Baryshkov
2021-06-10 13:48 ` [PATCH 0/8] dsi: rework clock parents and timing handling Dmitry Baryshkov
2021-06-10 16:34   ` [Freedreno] " abhinavk
2021-06-21 22:01 ` 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=68887c25ff97c62ad65fdbfda3b7b66f@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=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).