From: Lucas Stach <l.stach@pengutronix.de>
To: "Maíra Canal" <mcanal@igalia.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"Simona Vetter" <simona@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Melissa Wen" <mwen@igalia.com>,
"Russell King" <linux+etnaviv@armlinux.org.uk>,
"Christian Gmeiner" <christian.gmeiner@gmail.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
"Rob Herring" <robh@kernel.org>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org,
etnaviv@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset
Date: Tue, 24 Jun 2025 11:37:38 +0200 [thread overview]
Message-ID: <fbc1de81cbb50ea1c74ea153b2d8f7ef619bb151.camel@pengutronix.de> (raw)
In-Reply-To: <20250618-sched-skip-reset-v3-6-8be5cca2725d@igalia.com>
Am Mittwoch, dem 18.06.2025 um 11:47 -0300 schrieb Maíra Canal:
> Etnaviv can skip a hardware reset in two situations:
>
> 1. TDR has fired before the free-job worker and the timeout is spurious.
> 2. The GPU is still making progress on the front-end and we can give
> the job a chance to complete.
>
> Instead of manipulating scheduler's internals, inform the scheduler that
> the job did not actually timeout and no reset was performed through
> the new status code DRM_GPU_SCHED_STAT_NO_HANG.
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/gpu/drm/etnaviv/etnaviv_sched.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_sched.c b/drivers/gpu/drm/etnaviv/etnaviv_sched.c
> index 7146069a98492f5fab2a49d96e2054f649e1fe3d..46f5391e84a12232b247886cf1311f8e09f42f04 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_sched.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_sched.c
> @@ -40,11 +40,11 @@ static enum drm_gpu_sched_stat etnaviv_sched_timedout_job(struct drm_sched_job
> int change;
>
> /*
> - * If the GPU managed to complete this jobs fence, the timout is
> - * spurious. Bail out.
> + * If the GPU managed to complete this jobs fence, the timeout has
> + * fired before free-job worker. The timeout is spurious, so bail out.
> */
> if (dma_fence_is_signaled(submit->out_fence))
> - goto out_no_timeout;
> + return DRM_GPU_SCHED_STAT_NO_HANG;
>
> /*
> * If the GPU is still making forward progress on the front-end (which
> @@ -70,7 +70,7 @@ static enum drm_gpu_sched_stat etnaviv_sched_timedout_job(struct drm_sched_job
> gpu->hangcheck_dma_addr = dma_addr;
> gpu->hangcheck_primid = primid;
> gpu->hangcheck_fence = gpu->completed_fence;
> - goto out_no_timeout;
> + return DRM_GPU_SCHED_STAT_NO_HANG;
> }
>
> /* block scheduler */
> @@ -86,10 +86,7 @@ static enum drm_gpu_sched_stat etnaviv_sched_timedout_job(struct drm_sched_job
> drm_sched_resubmit_jobs(&gpu->sched);
>
> drm_sched_start(&gpu->sched, 0);
> - return DRM_GPU_SCHED_STAT_RESET;
>
> -out_no_timeout:
> - list_add(&sched_job->list, &sched_job->sched->pending_list);
> return DRM_GPU_SCHED_STAT_RESET;
> }
>
>
next prev parent reply other threads:[~2025-06-24 9:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 14:47 [PATCH v3 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG Maíra Canal
2025-06-18 14:47 ` [PATCH v3 1/8] drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET Maíra Canal
2025-06-30 11:39 ` Philipp Stanner
2025-06-18 14:47 ` [PATCH v3 2/8] drm/sched: Allow drivers to skip the reset and keep on running Maíra Canal
2025-06-30 11:25 ` Maíra Canal
2025-06-30 11:46 ` Philipp Stanner
2025-06-18 14:47 ` [PATCH v3 3/8] drm/sched: Make timeout KUnit tests faster Maíra Canal
2025-06-30 11:53 ` Philipp Stanner
2025-06-30 12:05 ` Maíra Canal
2025-06-30 12:20 ` Philipp Stanner
2025-06-30 14:04 ` Maíra Canal
2025-07-02 14:41 ` Philipp Stanner
2025-06-18 14:47 ` [PATCH v3 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG Maíra Canal
2025-06-24 9:09 ` Tvrtko Ursulin
2025-06-18 14:47 ` [PATCH v3 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset Maíra Canal
2025-06-24 9:14 ` Tvrtko Ursulin
2025-06-18 14:47 ` [PATCH v3 6/8] drm/etnaviv: " Maíra Canal
2025-06-24 9:37 ` Lucas Stach [this message]
2025-06-18 14:47 ` [PATCH v3 7/8] drm/xe: " Maíra Canal
2025-06-23 14:28 ` Philipp Stanner
2025-06-18 14:47 ` [PATCH v3 8/8] drm/panfrost: " Maíra Canal
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=fbc1de81cbb50ea1c74ea153b2d8f7ef619bb151.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=christian.gmeiner@gmail.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=liviu.dudau@arm.com \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
--cc=mcanal@igalia.com \
--cc=mwen@igalia.com \
--cc=phasta@kernel.org \
--cc=robh@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tvrtko.ursulin@igalia.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;
as well as URLs for NNTP newsgroup(s).