dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Akhil P Oommen <akhilpo@codeaurora.org>
To: Jonathan Marek <jonathan@marek.ca>, freedreno@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU"
	<linux-arm-msm@vger.kernel.org>,
	Sharat Masetty <smasetty@codeaurora.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU"
	<dri-devel@lists.freedesktop.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Sean Paul <sean@poorly.run>
Subject: Re: [RESEND PATCH] drm/msm/a6xx: fix frequency not always being restored on GMU resume
Date: Mon, 17 Aug 2020 18:21:50 +0530	[thread overview]
Message-ID: <270c4efd-8524-c389-3347-2f9c4e246b6d@codeaurora.org> (raw)
In-Reply-To: <20200813185450.19387-1-jonathan@marek.ca>

Why don't we move the early return in a6xx_gmu_set_freq() to 
msm_devfreq_target() instead?

-Akhil.

On 8/14/2020 12:24 AM, Jonathan Marek wrote:
> The patch reorganizing the set_freq function made it so the gmu resume
> doesn't always set the frequency, because a6xx_gmu_set_freq() exits early
> when the frequency hasn't been changed. Note this always happens when
> resuming GMU after recovering from a hang.
> 
> Use a simple workaround to prevent this from happening.
> 
> Fixes: 1f60d11423db ("drm: msm: a6xx: send opp instead of a frequency")
> 
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> ---
>   drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index b67b38c8fadf..bbbd00020f92 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -845,6 +845,7 @@ static void a6xx_gmu_set_initial_freq(struct msm_gpu *gpu, struct a6xx_gmu *gmu)
>   	if (IS_ERR_OR_NULL(gpu_opp))
>   		return;
>   
> +	gmu->freq = 0; /* so a6xx_gmu_set_freq() doesn't exit early */
>   	a6xx_gmu_set_freq(gpu, gpu_opp);
>   	dev_pm_opp_put(gpu_opp);
>   }
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2020-08-17 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 18:54 [RESEND PATCH] drm/msm/a6xx: fix frequency not always being restored on GMU resume Jonathan Marek
2020-08-17 12:51 ` Akhil P Oommen [this message]

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=270c4efd-8524-c389-3347-2f9c4e246b6d@codeaurora.org \
    --to=akhilpo@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sean@poorly.run \
    --cc=smasetty@codeaurora.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;
as well as URLs for NNTP newsgroup(s).