dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Melissa Wen <mwen@igalia.com>
To: "Maíra Canal" <mcanal@igalia.com>,
	"Iago Toral Quiroga" <itoral@igalia.com>,
	"Jose Maria Casanova Crespo" <jmcasanova@igalia.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 5/6] drm/v3d: Synchronous operations can't timeout
Date: Mon, 25 Aug 2025 17:31:54 -0300	[thread overview]
Message-ID: <512f5510-a86d-47cb-a92d-d6206906e52c@igalia.com> (raw)
In-Reply-To: <20250815-v3d-queue-lock-v2-5-ce37258ffb53@igalia.com>



On 15/08/2025 16:58, Maíra Canal wrote:
> CPU jobs and CACHE CLEAN jobs execute synchronously once the DRM
> scheduler starts running them. Therefore, there is no fence to wait on,
> neither are those jobs able to timeout.
>
> Hence, remove the `timedout_job` hook from the CPU and CACHE CLEAN
> scheduler ops.
Makes sense.

Reviewed-by: Melissa Wen <mwen@igalia.com>
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
> ---
>   drivers/gpu/drm/v3d/v3d_sched.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
> index 60e251367f42170b30de968682deb6370604db44..d2045d0db12e63bc67bac6a47cabcf746189ea88 100644
> --- a/drivers/gpu/drm/v3d/v3d_sched.c
> +++ b/drivers/gpu/drm/v3d/v3d_sched.c
> @@ -701,6 +701,7 @@ v3d_cpu_job_run(struct drm_sched_job *sched_job)
>   	trace_v3d_cpu_job_end(&v3d->drm, job->job_type);
>   	v3d_job_update_stats(&job->base, V3D_CPU);
>   
> +	/* Synchronous operation, so no fence to wait on. */
>   	return NULL;
>   }
>   
> @@ -716,6 +717,7 @@ v3d_cache_clean_job_run(struct drm_sched_job *sched_job)
>   
>   	v3d_job_update_stats(job, V3D_CACHE_CLEAN);
>   
> +	/* Synchronous operation, so no fence to wait on. */
>   	return NULL;
>   }
>   
> @@ -797,7 +799,7 @@ v3d_render_job_timedout(struct drm_sched_job *sched_job)
>   }
>   
>   static enum drm_gpu_sched_stat
> -v3d_generic_job_timedout(struct drm_sched_job *sched_job)
> +v3d_tfu_job_timedout(struct drm_sched_job *sched_job)
>   {
>   	struct v3d_job *job = to_v3d_job(sched_job);
>   
> @@ -837,7 +839,7 @@ static const struct drm_sched_backend_ops v3d_render_sched_ops = {
>   
>   static const struct drm_sched_backend_ops v3d_tfu_sched_ops = {
>   	.run_job = v3d_tfu_job_run,
> -	.timedout_job = v3d_generic_job_timedout,
> +	.timedout_job = v3d_tfu_job_timedout,
>   	.free_job = v3d_sched_job_free,
>   };
>   
> @@ -849,13 +851,11 @@ static const struct drm_sched_backend_ops v3d_csd_sched_ops = {
>   
>   static const struct drm_sched_backend_ops v3d_cache_clean_sched_ops = {
>   	.run_job = v3d_cache_clean_job_run,
> -	.timedout_job = v3d_generic_job_timedout,
>   	.free_job = v3d_sched_job_free
>   };
>   
>   static const struct drm_sched_backend_ops v3d_cpu_sched_ops = {
>   	.run_job = v3d_cpu_job_run,
> -	.timedout_job = v3d_generic_job_timedout,
>   	.free_job = v3d_cpu_job_free
>   };
>   
>


  reply	other threads:[~2025-08-25 20:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 19:58 [PATCH v2 0/6] drm/v3d: General job locking improvements + race-condition fixes Maíra Canal
2025-08-15 19:58 ` [PATCH v2 1/6] drm/v3d: Store a pointer to `struct v3d_file_priv` inside each job Maíra Canal
2025-08-25 19:56   ` Melissa Wen
2025-08-25 20:30     ` Maíra Canal
2025-08-25 20:33       ` Melissa Wen
2025-08-15 19:58 ` [PATCH v2 2/6] drm/v3d: Store the active job inside the queue's state Maíra Canal
2025-08-25 20:23   ` Melissa Wen
2025-08-15 19:58 ` [PATCH v2 3/6] drm/v3d: Replace a global spinlock with a per-queue spinlock Maíra Canal
2025-08-25 19:57   ` Melissa Wen
2025-08-25 20:35     ` Maíra Canal
2025-08-15 19:58 ` [PATCH v2 4/6] drm/v3d: Address race-condition between per-fd GPU stats and fd release Maíra Canal
2025-08-25 20:03   ` Melissa Wen
2025-08-25 20:53     ` Maíra Canal
2025-08-25 23:09       ` Melissa Wen
2025-08-26 12:03         ` Maíra Canal
2025-08-15 19:58 ` [PATCH v2 5/6] drm/v3d: Synchronous operations can't timeout Maíra Canal
2025-08-25 20:31   ` Melissa Wen [this message]
2025-08-15 19:58 ` [PATCH v2 6/6] drm/v3d: Protect per-fd reset counter against fd release Maíra Canal
2025-08-25 20:15   ` Melissa Wen
2025-08-25 20:50     ` 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=512f5510-a86d-47cb-a92d-d6206906e52c@igalia.com \
    --to=mwen@igalia.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=itoral@igalia.com \
    --cc=jmcasanova@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=mcanal@igalia.com \
    --cc=simona@ffwll.ch \
    /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).