mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Rob Clark <robdclark@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Andy Gross <andy.gross@linaro.org>,
	linux-arm-msm@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Kristian H . Kristensen" <hoegsberg@chromium.org>,
	Colin Ian King <colin.king@canonical.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Sharat Masetty <smasetty@codeaurora.org>,
	David Airlie <airlied@linux.ie>,
	freedreno@lists.freedesktop.org,
	Mamta Shukla <mamtashukla555@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH] drm/msm: Fix A6XX support for opp-level
Date: Fri, 11 Jan 2019 17:02:06 -0700	[thread overview]
Message-ID: <20190112000206.GB14059@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <20190111222721.246972-1-dianders@chromium.org>

On Fri, Jan 11, 2019 at 02:27:21PM -0800, Douglas Anderson wrote:
> The bindings for Qualcomm opp levels changed after being Acked but
> before landing.  Thus the code in the GPU that was relying on the old
> bindings is now broken.
> 
> While we could just change the string 'qcom,level' to the string
> 'opp-level', it actually seems better to use the newly-introduced
> dev_pm_opp_get_level().
> 
> This patch thus has a hard dependency on the outstanding patch ("OPP:
> Add support for parsing the 'opp-level' property") and will need to
> land in a tree that contains that patch.
> 
> This patch needs to land before the patch ("arm64: dts: sdm845: Add
> gpu and gmu device nodes") since if a tree contains the device tree
> patch but not this one you'll get a crash at bootup.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>

> ---
> 
>  drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 5beb83d1cf87..900f18dc1577 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -928,25 +928,20 @@ static int a6xx_gmu_memory_probe(struct a6xx_gmu *gmu)
>  }
>  
>  /* Return the 'arc-level' for the given frequency */
> -static u32 a6xx_gmu_get_arc_level(struct device *dev, unsigned long freq)
> +static unsigned int a6xx_gmu_get_arc_level(struct device *dev,
> +					   unsigned long freq)
>  {
>  	struct dev_pm_opp *opp;
> -	struct device_node *np;
> -	u32 val = 0;
> +	unsigned int val;
>  
>  	if (!freq)
>  		return 0;
>  
> -	opp  = dev_pm_opp_find_freq_exact(dev, freq, true);
> +	opp = dev_pm_opp_find_freq_exact(dev, freq, true);
>  	if (IS_ERR(opp))
>  		return 0;
>  
> -	np = dev_pm_opp_get_of_node(opp);
> -
> -	if (np) {
> -		of_property_read_u32(np, "qcom,level", &val);
> -		of_node_put(np);
> -	}
> +	val = dev_pm_opp_get_level(opp);
>  
>  	dev_pm_opp_put(opp);
>  
> @@ -982,7 +977,7 @@ static int a6xx_gmu_rpmh_arc_votes_init(struct device *dev, u32 *votes,
>  	/* Construct a vote for each frequency */
>  	for (i = 0; i < freqs_count; i++) {
>  		u8 pindex = 0, sindex = 0;
> -		u32 level = a6xx_gmu_get_arc_level(dev, freqs[i]);
> +		unsigned int level = a6xx_gmu_get_arc_level(dev, freqs[i]);
>  
>  		/* Get the primary index that matches the arc level */
>  		for (j = 0; j < pri_count; j++) {
> -- 
> 2.20.1.97.g81188d93c3-goog
> 

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2019-01-12  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 22:27 Douglas Anderson
2019-01-12  0:02 ` Jordan Crouse [this message]
2019-01-13 21:05 ` kbuild test robot

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=20190112000206.GB14059@jcrouse-lnx.qualcomm.com \
    --to=jcrouse@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=colin.king@canonical.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hoegsberg@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mamtashukla555@gmail.com \
    --cc=rnayak@codeaurora.org \
    --cc=robdclark@gmail.com \
    --cc=smasetty@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=viresh.kumar@linaro.org \
    /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®