summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_sched_job.c
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2023-08-22 20:33:34 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:40:27 +0300
commit9e9526352d6f7f94a4348cebce9859dfebed1dea (patch)
tree3b4d148c1b2b2fe0546757509471961db9be991d /drivers/gpu/drm/xe/xe_sched_job.c
parent923e42381745f55ba27a8805a055b51139af6830 (diff)
downloadlinux-9e9526352d6f7f94a4348cebce9859dfebed1dea.tar.xz
drm/xe: standardize vm-less kernel submissions
The current only submission in the driver that doesn't use a vm is the WA setup. We still pass a vm structure (the migration one), but we don't actually use it at submission time and we instead have an hack to use GGTT for this particular engine. Instead of special-casing the WA engine, we can skip providing a VM and use that as selector for whether to use GGTT or PPGTT. As part of this change, we can drop the special engine flag for the WA engine and switch the WA submission to use the standard job functions instead of dedicated ones. v2: rebased on s/engine/exec_queue Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20230822173334.1664332-4-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_sched_job.c')
-rw-r--r--drivers/gpu/drm/xe/xe_sched_job.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c
index 0479d059dc77..b02183147e8e 100644
--- a/drivers/gpu/drm/xe/xe_sched_job.c
+++ b/drivers/gpu/drm/xe/xe_sched_job.c
@@ -59,8 +59,7 @@ static struct xe_sched_job *job_alloc(bool parallel)
bool xe_sched_job_is_migration(struct xe_exec_queue *q)
{
- return q->vm && (q->vm->flags & XE_VM_FLAG_MIGRATION) &&
- !(q->flags & EXEC_QUEUE_FLAG_WA);
+ return q->vm && (q->vm->flags & XE_VM_FLAG_MIGRATION);
}
static void job_free(struct xe_sched_job *job)
@@ -91,8 +90,7 @@ struct xe_sched_job *xe_sched_job_create(struct xe_exec_queue *q,
XE_WARN_ON(!q->vm && !(q->flags & EXEC_QUEUE_FLAG_KERNEL));
/* Migration and kernel engines have their own locking */
- if (!(q->flags & (EXEC_QUEUE_FLAG_KERNEL | EXEC_QUEUE_FLAG_VM |
- EXEC_QUEUE_FLAG_WA))) {
+ if (!(q->flags & (EXEC_QUEUE_FLAG_KERNEL | EXEC_QUEUE_FLAG_VM))) {
lockdep_assert_held(&q->vm->lock);
if (!xe_vm_no_dma_fences(q->vm))
xe_vm_assert_held(q->vm);