From: Akhil P Oommen <quic_akhilpo@quicinc.com>
To: Rob Clark <robdclark@gmail.com>, <dri-devel@lists.freedesktop.org>
Cc: Rob Clark <robdclark@chromium.org>,
Jonathan Marek <jonathan@marek.ca>,
David Airlie <airlied@linux.ie>, <linux-arm-msm@vger.kernel.org>,
"Vladimir Lypak" <vladimir.lypak@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Sean Paul <sean@poorly.run>, Daniel Vetter <daniel@ffwll.ch>,
<freedreno@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Subject: Re: [Freedreno] [PATCH 3/3] drm/msm/gpu: Remove mutex from wait_event condition
Date: Fri, 18 Mar 2022 02:15:34 +0530 [thread overview]
Message-ID: <3b066b63-c180-09c6-e39f-b408464b5bc1@quicinc.com> (raw)
In-Reply-To: <20220310234611.424743-4-robdclark@gmail.com>
On 3/11/2022 5:16 AM, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> The mutex wasn't really protecting anything before. Before the previous
> patch we could still be racing with the scheduler's kthread, as that is
> not necessarily frozen yet. Now that we've parked the sched threads,
> the only race is with jobs retiring, and that is harmless, ie.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> drivers/gpu/drm/msm/adreno/adreno_device.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 0440a98988fc..661dfa7681fb 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -607,15 +607,6 @@ static int adreno_runtime_resume(struct device *dev)
> return gpu->funcs->pm_resume(gpu);
> }
>
> -static int active_submits(struct msm_gpu *gpu)
> -{
> - int active_submits;
> - mutex_lock(&gpu->active_lock);
> - active_submits = gpu->active_submits;
> - mutex_unlock(&gpu->active_lock);
I assumed that this lock here was to ensure proper barriers while
reading active_submits. Is that not required?
-Akhil.
> - return active_submits;
> -}
> -
> static int adreno_runtime_suspend(struct device *dev)
> {
> struct msm_gpu *gpu = dev_to_gpu(dev);
> @@ -669,7 +660,7 @@ static int adreno_system_suspend(struct device *dev)
> suspend_scheduler(gpu);
>
> remaining = wait_event_timeout(gpu->retire_event,
> - active_submits(gpu) == 0,
> + gpu->active_submits == 0,
> msecs_to_jiffies(1000));
> if (remaining == 0) {
> dev_err(dev, "Timeout waiting for GPU to suspend\n");
next prev parent reply other threads:[~2022-03-17 20:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 23:46 [PATCH 0/3] drm/msm/gpu: More system suspend fixes Rob Clark
2022-03-10 23:46 ` [PATCH 1/3] drm/msm/gpu: Rename runtime suspend/resume functions Rob Clark
2022-03-11 9:26 ` AngeloGioacchino Del Regno
2022-03-10 23:46 ` [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend Rob Clark
2022-03-17 9:59 ` Daniel Vetter
2022-03-17 10:06 ` Christian König
2022-03-17 14:58 ` Matthew Brost
2022-03-17 15:10 ` Rob Clark
2022-03-17 16:04 ` Christian König
2022-03-17 16:18 ` Rob Clark
2022-03-17 16:44 ` Christian König
2022-03-17 17:29 ` Daniel Vetter
2022-03-17 17:35 ` Rob Clark
2022-03-17 18:10 ` Andrey Grodzovsky
2022-03-17 18:25 ` Rob Clark
2022-03-17 19:49 ` Andrey Grodzovsky
2022-03-17 20:35 ` Rob Clark
2022-03-18 16:04 ` Andrey Grodzovsky
2022-03-18 16:20 ` Rob Clark
2022-03-18 16:27 ` Andrey Grodzovsky
2022-03-18 17:22 ` Rob Clark
2022-03-18 20:14 ` Andrey Grodzovsky
2022-03-17 17:46 ` Andrey Grodzovsky
2022-03-10 23:46 ` [PATCH 3/3] drm/msm/gpu: Remove mutex from wait_event condition Rob Clark
2022-03-17 20:45 ` Akhil P Oommen [this message]
2022-03-17 21:07 ` [Freedreno] " Rob Clark
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=3b066b63-c180-09c6-e39f-b408464b5bc1@quicinc.com \
--to=quic_akhilpo@quicinc.com \
--cc=airlied@linux.ie \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--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=quic_abhinavk@quicinc.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--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®