drm/xe: Long running job update
authorMatthew Brost <matthew.brost@intel.com>
Mon, 22 May 2023 01:24:20 +0000 (18:24 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:34:44 +0000 (11:34 -0500)
commit8ae8a2e8dd21bd8bc94c9817874a97239aa867a2
tree4287e92b7ad80bc9edb45d014b5e4bf432c08da6
parent37430402618db90b53aa782a6c49f66ab0efced0
drm/xe: Long running job update

For long running (LR) jobs with the DRM scheduler we must return NULL in
run_job which results in signaling the job's finished fence immediately.
This prevents LR jobs from creating infinite dma-fences.

Signaling job's finished fence immediately breaks flow controlling ring
with the DRM scheduler. To work around this, the ring is flow controlled
and written in the exec IOCTL. Signaling job's finished fence
immediately also breaks the TDR which is used in reset / cleanup entity
paths so write a new path for LR entities.

v2: Better commit, white space, remove rmb(), better comment next to
emit_job()
v3 (Thomas): Change LR reference counting, fix working in commit

Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_engine.c
drivers/gpu/drm/xe/xe_engine.h
drivers/gpu/drm/xe/xe_exec.c
drivers/gpu/drm/xe/xe_guc_engine_types.h
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_trace.h