From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Akhil P Oommen <quic_akhilpo@quicinc.com>,
freedreno <freedreno@lists.freedesktop.org>,
dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Rob Clark <robdclark@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Jonathan Marek <jonathan@marek.ca>, Sean Paul <sean@poorly.run>,
Vladimir Lypak <vladimir.lypak@gmail.com>,
linux-kernel@vger.kernel.org,
Marijn Suijten <marijn.suijten@somainline.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Martin Botka <martin.botka@somainline.org>
Subject: Re: [PATCH v1 07/10] drm/msm/adreno: Retry on gpu resume failure
Date: Thu, 3 Mar 2022 10:21:46 +0100 [thread overview]
Message-ID: <373491a2-0fa5-0326-29cd-1650f86202d4@collabora.com> (raw)
In-Reply-To: <20220302225551.v1.7.I55e39e28375b64455d1605f67453d5e91b0c2710@changeid>
Il 02/03/22 18:27, Akhil P Oommen ha scritto:
> Retry infinitely on resume failure because there is nothing much we can
> do if GPU is not ON. Also, this helps us to avoid checking for the
> return value of pm_runtime_get() to see if GPU is ON.
>
> Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
> ---
>
> drivers/gpu/drm/msm/adreno/adreno_device.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 89cfd84..abcc553 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -603,8 +603,16 @@ static const struct of_device_id dt_match[] = {
> static int adreno_resume(struct device *dev)
> {
> struct msm_gpu *gpu = dev_to_gpu(dev);
> + int ret;
> +
> + /* What hope do we have for the future if we can't turn ON gpu */
Hello Akhil,
the hope for the future would be to at least not lock up everything with
an infinite loop, so, please change this to have a limited amount of retries.
My guess would be that a maximum of 10 is already a lot of retries, but
feel free to choose an appropriate number.
Regards,
Angelo
> + while (true) {
> + ret = gpu->funcs->pm_resume(gpu);
> + if (!ret)
> + break;
> + }
>
> - return gpu->funcs->pm_resume(gpu);
> + return 0;
> }
>
> static int active_submits(struct msm_gpu *gpu)
next prev parent reply other threads:[~2022-03-03 9:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 17:27 [PATCH v1 00/10] Support for GMU coredump and some related improvements Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 01/10] drm/msm/a6xx: Add helper to check smmu is stalled Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 02/10] drm/msm/a6xx: Send NMI to gmu when it is hung Akhil P Oommen
2022-03-08 12:54 ` kernel test robot
2022-03-02 17:27 ` [PATCH v1 03/10] drm/msm/a6xx: Avoid gmu lock in pm ops Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 04/10] drm/msm/a6xx: Enhance debugging of gmu faults Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 05/10] drm/msm: Do recovery on hw_init failure Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 06/10] drm/msm/a6xx: Propagate OOB set error Akhil P Oommen
2022-03-09 11:35 ` kernel test robot
2022-03-02 17:27 ` [PATCH v1 07/10] drm/msm/adreno: Retry on gpu resume failure Akhil P Oommen
2022-03-03 9:21 ` AngeloGioacchino Del Regno [this message]
2022-03-04 19:22 ` Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 08/10] drm/msm/a6xx: Remove clk votes on failure Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 09/10] drm/msm: Remove pm_runtime_get() from msm_job_run() Akhil P Oommen
2022-03-02 17:27 ` [PATCH v1 10/10] drm/msm/a6xx: Free gmu_debug crashstate bo Akhil P Oommen
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=373491a2-0fa5-0326-29cd-1650f86202d4@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=martin.botka@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_akhilpo@quicinc.com \
--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