* [PATCH 0/5] drm/exec: drm_exec polishing
@ 2026-03-31 9:20 Thomas Hellström
2026-03-31 9:20 ` [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] Thomas Hellström
` (6 more replies)
0 siblings, 7 replies; 25+ messages in thread
From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw)
To: intel-xe
Cc: Thomas Hellström, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno
During the work towards enabling exhaustive eviction using full
ww locking in TTM, Christian indicated that the path for the
drm_exec moving forward was to be a full drm_exec helper with
things like userptr validation rather than a WW transaction
abstraction. The idea was then briefly discussed to craft a
WW transaction helper and then subclass that with drm_exec
with the idea that the WW transaction helper could be used in
TTM for eviction and for other uses that didn't mandate a full
exec sequence.
Regardless whether that actually happens or not, this series
aims to clean up abuses of drm_exec internals in drivers
so that future development of drm_exec isn't blocked by
such driver usage.
Except for patch 3 which is a small cleanup only.
Thomas Hellström (5):
drm/exec: Remove the index parameter from
drm_exec_for_each_locked_obj[_reverse]
drm/msm: Remove abuse of drm_exec internals
drm/exec: Make the drm_exec_until_all_locked() macro more readable
drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer
drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct
drm_exec::ticket
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 15 ++---
.../drm/amd/amdgpu/amdgpu_eviction_fence.c | 3 +-
drivers/gpu/drm/drm_exec.c | 6 +-
drivers/gpu/drm/drm_gpuvm.c | 3 +-
drivers/gpu/drm/msm/msm_gem.h | 1 +
drivers/gpu/drm/msm/msm_gem_submit.c | 4 +-
drivers/gpu/drm/xe/xe_validation.c | 4 +-
drivers/gpu/drm/xe/xe_validation.h | 2 +-
drivers/gpu/drm/xe/xe_vm.c | 3 +-
include/drm/drm_exec.h | 55 +++++++++++++------
11 files changed, 58 insertions(+), 42 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 25+ messages in thread* [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström @ 2026-03-31 9:20 ` Thomas Hellström 2026-03-31 9:29 ` Christian König 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström ` (5 subsequent siblings) 6 siblings, 1 reply; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw) To: intel-xe Cc: Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Nobody makes any use of it. Possible internal future users can instead use the _index variable. External users shouldn't use it since the array it's pointing into is internal drm_exec state. Assisted-by: GitHub Copilot:claude-sonnet-4.6 Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++------ drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 3 +-- drivers/gpu/drm/drm_exec.c | 6 ++---- drivers/gpu/drm/drm_gpuvm.c | 3 +-- drivers/gpu/drm/xe/xe_vm.c | 3 +-- include/drm/drm_exec.h | 14 ++++++-------- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index c048217615c1..c4ee19603460 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -850,7 +850,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, struct amdgpu_vm *vm = &fpriv->vm; struct amdgpu_bo_list_entry *e; struct drm_gem_object *obj; - unsigned long index; unsigned int i; int r; @@ -962,7 +961,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, goto out_free_user_pages; } - drm_exec_for_each_locked_object(&p->exec, index, obj) { + drm_exec_for_each_locked_object(&p->exec, obj) { r = amdgpu_cs_bo_validate(p, gem_to_amdgpu_bo(obj)); if (unlikely(r)) goto out_free_user_pages; @@ -1201,7 +1200,6 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) struct drm_gpu_scheduler *sched; struct drm_gem_object *obj; struct dma_fence *fence; - unsigned long index; unsigned int i; int r; @@ -1212,7 +1210,7 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) return r; } - drm_exec_for_each_locked_object(&p->exec, index, obj) { + drm_exec_for_each_locked_object(&p->exec, obj) { struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); struct dma_resv *resv = bo->tbo.base.resv; @@ -1280,7 +1278,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, struct amdgpu_job *leader = p->gang_leader; struct amdgpu_bo_list_entry *e; struct drm_gem_object *gobj; - unsigned long index; unsigned int i; uint64_t seq; int r; @@ -1330,7 +1327,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, } p->fence = dma_fence_get(&leader->base.s_fence->finished); - drm_exec_for_each_locked_object(&p->exec, index, gobj) { + drm_exec_for_each_locked_object(&p->exec, gobj) { ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c index 4c5e38dea4c2..f6b7522c3c82 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c @@ -121,7 +121,6 @@ int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr, { struct amdgpu_eviction_fence *ev_fence; struct drm_gem_object *obj; - unsigned long index; /* Create and initialize a new eviction fence */ ev_fence = kzalloc_obj(*ev_fence); @@ -140,7 +139,7 @@ int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr, evf_mgr->ev_fence = &ev_fence->base; /* And add it to all existing BOs */ - drm_exec_for_each_locked_object(exec, index, obj) { + drm_exec_for_each_locked_object(exec, obj) { struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_evf_mgr_attach_fence(evf_mgr, bo); diff --git a/drivers/gpu/drm/drm_exec.c b/drivers/gpu/drm/drm_exec.c index 8d0601400182..746210f3f6c2 100644 --- a/drivers/gpu/drm/drm_exec.c +++ b/drivers/gpu/drm/drm_exec.c @@ -24,7 +24,6 @@ * * struct drm_gem_object *obj; * struct drm_exec exec; - * unsigned long index; * int ret; * * drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT); @@ -40,7 +39,7 @@ * goto error; * } * - * drm_exec_for_each_locked_object(&exec, index, obj) { + * drm_exec_for_each_locked_object(&exec, obj) { * dma_resv_add_fence(obj->resv, fence, DMA_RESV_USAGE_READ); * ... * } @@ -56,9 +55,8 @@ static void drm_exec_unlock_all(struct drm_exec *exec) { struct drm_gem_object *obj; - unsigned long index; - drm_exec_for_each_locked_object_reverse(exec, index, obj) { + drm_exec_for_each_locked_object_reverse(exec, obj) { dma_resv_unlock(obj->resv); drm_gem_object_put(obj); } diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index 44acfe4120d2..2e44671e05b1 100644 --- a/drivers/gpu/drm/drm_gpuvm.c +++ b/drivers/gpu/drm/drm_gpuvm.c @@ -1550,9 +1550,8 @@ drm_gpuvm_resv_add_fence(struct drm_gpuvm *gpuvm, enum dma_resv_usage extobj_usage) { struct drm_gem_object *obj; - unsigned long index; - drm_exec_for_each_locked_object(exec, index, obj) { + drm_exec_for_each_locked_object(exec, obj) { dma_resv_assert_held(obj->resv); dma_resv_add_fence(obj->resv, fence, drm_gpuvm_is_extobj(gpuvm, obj) ? diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 56e2db50bb36..30efd6721da1 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -373,7 +373,6 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, unsigned int num_fences) { struct drm_gem_object *obj; - unsigned long index; int ret; do { @@ -386,7 +385,7 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, return ret; } while (!list_empty(&vm->gpuvm.evict.list)); - drm_exec_for_each_locked_object(exec, index, obj) { + drm_exec_for_each_locked_object(exec, obj) { ret = dma_resv_reserve_fences(obj->resv, num_fences); if (ret) return ret; diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index aa786b828a0a..25db52dd2af0 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -68,28 +68,26 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) /** * drm_exec_for_each_locked_object - iterate over all the locked objects * @exec: drm_exec object - * @index: unsigned long index for the iteration * @obj: the current GEM object * * Iterate over all the locked GEM objects inside the drm_exec object. */ -#define drm_exec_for_each_locked_object(exec, index, obj) \ - for ((index) = 0; ((obj) = drm_exec_obj(exec, index)); ++(index)) +#define drm_exec_for_each_locked_object(exec, obj) \ + for (unsigned long _index = 0; ((obj) = drm_exec_obj(exec, _index)); ++_index) /** * drm_exec_for_each_locked_object_reverse - iterate over all the locked * objects in reverse locking order * @exec: drm_exec object - * @index: unsigned long index for the iteration * @obj: the current GEM object * * Iterate over all the locked GEM objects inside the drm_exec object in - * reverse locking order. Note that @index may go below zero and wrap, + * reverse locking order. Note that the internal index may wrap around, * but that will be caught by drm_exec_obj(), returning a NULL object. */ -#define drm_exec_for_each_locked_object_reverse(exec, index, obj) \ - for ((index) = (exec)->num_objects - 1; \ - ((obj) = drm_exec_obj(exec, index)); --(index)) +#define drm_exec_for_each_locked_object_reverse(exec, obj) \ + for (unsigned long _index = (exec)->num_objects - 1; \ + ((obj) = drm_exec_obj(exec, _index)); --_index) /** * drm_exec_until_all_locked - loop until all GEM objects are locked -- 2.53.0 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] 2026-03-31 9:20 ` [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] Thomas Hellström @ 2026-03-31 9:29 ` Christian König 0 siblings, 0 replies; 25+ messages in thread From: Christian König @ 2026-03-31 9:29 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > Nobody makes any use of it. Possible internal future users can > instead use the _index variable. External users shouldn't use > it since the array it's pointing into is internal drm_exec state. Yeah that was on my TODO list as well, just one more comment below. > > Assisted-by: GitHub Copilot:claude-sonnet-4.6 > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++------ > drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 3 +-- > drivers/gpu/drm/drm_exec.c | 6 ++---- > drivers/gpu/drm/drm_gpuvm.c | 3 +-- > drivers/gpu/drm/xe/xe_vm.c | 3 +-- > include/drm/drm_exec.h | 14 ++++++-------- > 6 files changed, 14 insertions(+), 24 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > index c048217615c1..c4ee19603460 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > @@ -850,7 +850,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, > struct amdgpu_vm *vm = &fpriv->vm; > struct amdgpu_bo_list_entry *e; > struct drm_gem_object *obj; > - unsigned long index; > unsigned int i; > int r; > > @@ -962,7 +961,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, > goto out_free_user_pages; > } > > - drm_exec_for_each_locked_object(&p->exec, index, obj) { > + drm_exec_for_each_locked_object(&p->exec, obj) { > r = amdgpu_cs_bo_validate(p, gem_to_amdgpu_bo(obj)); > if (unlikely(r)) > goto out_free_user_pages; > @@ -1201,7 +1200,6 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) > struct drm_gpu_scheduler *sched; > struct drm_gem_object *obj; > struct dma_fence *fence; > - unsigned long index; > unsigned int i; > int r; > > @@ -1212,7 +1210,7 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) > return r; > } > > - drm_exec_for_each_locked_object(&p->exec, index, obj) { > + drm_exec_for_each_locked_object(&p->exec, obj) { > struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); > > struct dma_resv *resv = bo->tbo.base.resv; > @@ -1280,7 +1278,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, > struct amdgpu_job *leader = p->gang_leader; > struct amdgpu_bo_list_entry *e; > struct drm_gem_object *gobj; > - unsigned long index; > unsigned int i; > uint64_t seq; > int r; > @@ -1330,7 +1327,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, > } > > p->fence = dma_fence_get(&leader->base.s_fence->finished); > - drm_exec_for_each_locked_object(&p->exec, index, gobj) { > + drm_exec_for_each_locked_object(&p->exec, gobj) { > > ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo); > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > index 4c5e38dea4c2..f6b7522c3c82 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > @@ -121,7 +121,6 @@ int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr, > { > struct amdgpu_eviction_fence *ev_fence; > struct drm_gem_object *obj; > - unsigned long index; > > /* Create and initialize a new eviction fence */ > ev_fence = kzalloc_obj(*ev_fence); > @@ -140,7 +139,7 @@ int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr, > evf_mgr->ev_fence = &ev_fence->base; > > /* And add it to all existing BOs */ > - drm_exec_for_each_locked_object(exec, index, obj) { > + drm_exec_for_each_locked_object(exec, obj) { > struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); > > amdgpu_evf_mgr_attach_fence(evf_mgr, bo); > diff --git a/drivers/gpu/drm/drm_exec.c b/drivers/gpu/drm/drm_exec.c > index 8d0601400182..746210f3f6c2 100644 > --- a/drivers/gpu/drm/drm_exec.c > +++ b/drivers/gpu/drm/drm_exec.c > @@ -24,7 +24,6 @@ > * > * struct drm_gem_object *obj; > * struct drm_exec exec; > - * unsigned long index; > * int ret; > * > * drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT); > @@ -40,7 +39,7 @@ > * goto error; > * } > * > - * drm_exec_for_each_locked_object(&exec, index, obj) { > + * drm_exec_for_each_locked_object(&exec, obj) { > * dma_resv_add_fence(obj->resv, fence, DMA_RESV_USAGE_READ); > * ... > * } > @@ -56,9 +55,8 @@ > static void drm_exec_unlock_all(struct drm_exec *exec) > { > struct drm_gem_object *obj; > - unsigned long index; > > - drm_exec_for_each_locked_object_reverse(exec, index, obj) { > + drm_exec_for_each_locked_object_reverse(exec, obj) { > dma_resv_unlock(obj->resv); > drm_gem_object_put(obj); > } > diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c > index 44acfe4120d2..2e44671e05b1 100644 > --- a/drivers/gpu/drm/drm_gpuvm.c > +++ b/drivers/gpu/drm/drm_gpuvm.c > @@ -1550,9 +1550,8 @@ drm_gpuvm_resv_add_fence(struct drm_gpuvm *gpuvm, > enum dma_resv_usage extobj_usage) > { > struct drm_gem_object *obj; > - unsigned long index; > > - drm_exec_for_each_locked_object(exec, index, obj) { > + drm_exec_for_each_locked_object(exec, obj) { > dma_resv_assert_held(obj->resv); > dma_resv_add_fence(obj->resv, fence, > drm_gpuvm_is_extobj(gpuvm, obj) ? > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c > index 56e2db50bb36..30efd6721da1 100644 > --- a/drivers/gpu/drm/xe/xe_vm.c > +++ b/drivers/gpu/drm/xe/xe_vm.c > @@ -373,7 +373,6 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, > unsigned int num_fences) > { > struct drm_gem_object *obj; > - unsigned long index; > int ret; > > do { > @@ -386,7 +385,7 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, > return ret; > } while (!list_empty(&vm->gpuvm.evict.list)); > > - drm_exec_for_each_locked_object(exec, index, obj) { > + drm_exec_for_each_locked_object(exec, obj) { > ret = dma_resv_reserve_fences(obj->resv, num_fences); > if (ret) > return ret; > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > index aa786b828a0a..25db52dd2af0 100644 > --- a/include/drm/drm_exec.h > +++ b/include/drm/drm_exec.h > @@ -68,28 +68,26 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) > /** > * drm_exec_for_each_locked_object - iterate over all the locked objects > * @exec: drm_exec object > - * @index: unsigned long index for the iteration > * @obj: the current GEM object > * > * Iterate over all the locked GEM objects inside the drm_exec object. > */ > -#define drm_exec_for_each_locked_object(exec, index, obj) \ > - for ((index) = 0; ((obj) = drm_exec_obj(exec, index)); ++(index)) > +#define drm_exec_for_each_locked_object(exec, obj) \ > + for (unsigned long _index = 0; ((obj) = drm_exec_obj(exec, _index)); ++_index) I'm not sure if _index is unique enough here, would use something like __PASTE(_drm_exec_index, __LINE__) instead. Apart from that looks good to me. Regards, Christian. > > /** > * drm_exec_for_each_locked_object_reverse - iterate over all the locked > * objects in reverse locking order > * @exec: drm_exec object > - * @index: unsigned long index for the iteration > * @obj: the current GEM object > * > * Iterate over all the locked GEM objects inside the drm_exec object in > - * reverse locking order. Note that @index may go below zero and wrap, > + * reverse locking order. Note that the internal index may wrap around, > * but that will be caught by drm_exec_obj(), returning a NULL object. > */ > -#define drm_exec_for_each_locked_object_reverse(exec, index, obj) \ > - for ((index) = (exec)->num_objects - 1; \ > - ((obj) = drm_exec_obj(exec, index)); --(index)) > +#define drm_exec_for_each_locked_object_reverse(exec, obj) \ > + for (unsigned long _index = (exec)->num_objects - 1; \ > + ((obj) = drm_exec_obj(exec, _index)); --_index) > > /** > * drm_exec_until_all_locked - loop until all GEM objects are locked ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström 2026-03-31 9:20 ` [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] Thomas Hellström @ 2026-03-31 9:20 ` Thomas Hellström 2026-03-31 9:30 ` Christian König ` (2 more replies) 2026-03-31 9:20 ` [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable Thomas Hellström ` (4 subsequent siblings) 6 siblings, 3 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw) To: intel-xe Cc: Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno The code was reading drm_exec internal state to determine whether the drm_exec structure had been initialized or not, and therefore needed cleaning up, relying on undocumented behaviour. Instead add a bool to struct msm_gem_submit to indicate whether drm_exec cleaning up is needed. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index cb32093fda47..762e546d25ef 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -452,6 +452,7 @@ struct msm_gem_submit { bool bos_pinned : 1; bool fault_dumped:1;/* Limit devcoredump dumping to one per submit */ bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ + bool has_exec : 1; /* @exec is initialized. */ struct msm_ringbuffer *ring; unsigned int nr_cmds; unsigned int nr_bos; diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 75d9f3574370..26ea8a28be47 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct msm_gem_submit *submit) int ret = 0; drm_exec_init(&submit->exec, flags, submit->nr_bos); + submit->has_exec = true; drm_exec_until_all_locked (&submit->exec) { ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); @@ -304,6 +305,7 @@ static int submit_lock_objects(struct msm_gem_submit *submit) return submit_lock_objects_vmbind(submit); drm_exec_init(&submit->exec, flags, submit->nr_bos); + submit->has_exec = true; drm_exec_until_all_locked (&submit->exec) { ret = drm_exec_lock_obj(&submit->exec, @@ -523,7 +525,7 @@ static void submit_cleanup(struct msm_gem_submit *submit, bool error) if (error) submit_unpin_objects(submit); - if (submit->exec.objects) + if (submit->has_exec) drm_exec_fini(&submit->exec); /* if job wasn't enqueued to scheduler, early retirement: */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström @ 2026-03-31 9:30 ` Christian König 2026-03-31 9:36 ` Christian König 2026-03-31 19:08 ` Rob Clark 2 siblings, 0 replies; 25+ messages in thread From: Christian König @ 2026-03-31 9:30 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > The code was reading drm_exec internal state to determine whether > the drm_exec structure had been initialized or not, and therefore > needed cleaning up, relying on undocumented behaviour. > > Instead add a bool to struct msm_gem_submit to indicate whether > drm_exec cleaning up is needed. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Acked-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/msm/msm_gem.h | 1 + > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h > index cb32093fda47..762e546d25ef 100644 > --- a/drivers/gpu/drm/msm/msm_gem.h > +++ b/drivers/gpu/drm/msm/msm_gem.h > @@ -452,6 +452,7 @@ struct msm_gem_submit { > bool bos_pinned : 1; > bool fault_dumped:1;/* Limit devcoredump dumping to one per submit */ > bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ > + bool has_exec : 1; /* @exec is initialized. */ > struct msm_ringbuffer *ring; > unsigned int nr_cmds; > unsigned int nr_bos; > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c > index 75d9f3574370..26ea8a28be47 100644 > --- a/drivers/gpu/drm/msm/msm_gem_submit.c > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c > @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct msm_gem_submit *submit) > int ret = 0; > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); > @@ -304,6 +305,7 @@ static int submit_lock_objects(struct msm_gem_submit *submit) > return submit_lock_objects_vmbind(submit); > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_exec_lock_obj(&submit->exec, > @@ -523,7 +525,7 @@ static void submit_cleanup(struct msm_gem_submit *submit, bool error) > if (error) > submit_unpin_objects(submit); > > - if (submit->exec.objects) > + if (submit->has_exec) > drm_exec_fini(&submit->exec); > > /* if job wasn't enqueued to scheduler, early retirement: */ ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström 2026-03-31 9:30 ` Christian König @ 2026-03-31 9:36 ` Christian König 2026-03-31 19:08 ` Rob Clark 2 siblings, 0 replies; 25+ messages in thread From: Christian König @ 2026-03-31 9:36 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > The code was reading drm_exec internal state to determine whether > the drm_exec structure had been initialized or not, and therefore > needed cleaning up, relying on undocumented behaviour. > > Instead add a bool to struct msm_gem_submit to indicate whether > drm_exec cleaning up is needed. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Acked-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/msm/msm_gem.h | 1 + > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h > index cb32093fda47..762e546d25ef 100644 > --- a/drivers/gpu/drm/msm/msm_gem.h > +++ b/drivers/gpu/drm/msm/msm_gem.h > @@ -452,6 +452,7 @@ struct msm_gem_submit { > bool bos_pinned : 1; > bool fault_dumped:1;/* Limit devcoredump dumping to one per submit */ > bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ > + bool has_exec : 1; /* @exec is initialized. */ > struct msm_ringbuffer *ring; > unsigned int nr_cmds; > unsigned int nr_bos; > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c > index 75d9f3574370..26ea8a28be47 100644 > --- a/drivers/gpu/drm/msm/msm_gem_submit.c > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c > @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct msm_gem_submit *submit) > int ret = 0; > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); > @@ -304,6 +305,7 @@ static int submit_lock_objects(struct msm_gem_submit *submit) > return submit_lock_objects_vmbind(submit); > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_exec_lock_obj(&submit->exec, > @@ -523,7 +525,7 @@ static void submit_cleanup(struct msm_gem_submit *submit, bool error) > if (error) > submit_unpin_objects(submit); > > - if (submit->exec.objects) > + if (submit->has_exec) > drm_exec_fini(&submit->exec); > > /* if job wasn't enqueued to scheduler, early retirement: */ ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström 2026-03-31 9:30 ` Christian König 2026-03-31 9:36 ` Christian König @ 2026-03-31 19:08 ` Rob Clark 2026-03-31 19:52 ` Thomas Hellström 2 siblings, 1 reply; 25+ messages in thread From: Rob Clark @ 2026-03-31 19:08 UTC (permalink / raw) To: Thomas Hellström Cc: intel-xe, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, Mar 31, 2026 at 2:21 AM Thomas Hellström <thomas.hellstrom@linux.intel.com> wrote: > > The code was reading drm_exec internal state to determine whether > the drm_exec structure had been initialized or not, and therefore > needed cleaning up, relying on undocumented behaviour. > > Instead add a bool to struct msm_gem_submit to indicate whether > drm_exec cleaning up is needed. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com> This is pretty stand-alone, so I can pick it up for v7.1. Or ack for landing it via drm-misc with the rest of the series if that is easier for you. It shouldn't conflict with anything in flight. BR, -R > --- > drivers/gpu/drm/msm/msm_gem.h | 1 + > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h > index cb32093fda47..762e546d25ef 100644 > --- a/drivers/gpu/drm/msm/msm_gem.h > +++ b/drivers/gpu/drm/msm/msm_gem.h > @@ -452,6 +452,7 @@ struct msm_gem_submit { > bool bos_pinned : 1; > bool fault_dumped:1;/* Limit devcoredump dumping to one per submit */ > bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ > + bool has_exec : 1; /* @exec is initialized. */ > struct msm_ringbuffer *ring; > unsigned int nr_cmds; > unsigned int nr_bos; > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c > index 75d9f3574370..26ea8a28be47 100644 > --- a/drivers/gpu/drm/msm/msm_gem_submit.c > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c > @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct msm_gem_submit *submit) > int ret = 0; > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); > @@ -304,6 +305,7 @@ static int submit_lock_objects(struct msm_gem_submit *submit) > return submit_lock_objects_vmbind(submit); > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > + submit->has_exec = true; > > drm_exec_until_all_locked (&submit->exec) { > ret = drm_exec_lock_obj(&submit->exec, > @@ -523,7 +525,7 @@ static void submit_cleanup(struct msm_gem_submit *submit, bool error) > if (error) > submit_unpin_objects(submit); > > - if (submit->exec.objects) > + if (submit->has_exec) > drm_exec_fini(&submit->exec); > > /* if job wasn't enqueued to scheduler, early retirement: */ > -- > 2.53.0 > ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 19:08 ` Rob Clark @ 2026-03-31 19:52 ` Thomas Hellström 2026-03-31 20:39 ` Rob Clark 0 siblings, 1 reply; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 19:52 UTC (permalink / raw) To: rob.clark Cc: intel-xe, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, 2026-03-31 at 12:08 -0700, Rob Clark wrote: > On Tue, Mar 31, 2026 at 2:21 AM Thomas Hellström > <thomas.hellstrom@linux.intel.com> wrote: > > > > The code was reading drm_exec internal state to determine whether > > the drm_exec structure had been initialized or not, and therefore > > needed cleaning up, relying on undocumented behaviour. > > > > Instead add a bool to struct msm_gem_submit to indicate whether > > drm_exec cleaning up is needed. > > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com> > > This is pretty stand-alone, so I can pick it up for v7.1. Or ack for > landing it via drm-misc with the rest of the series if that is easier > for you. It shouldn't conflict with anything in flight. Thanks Rob. Please pick it up and I'll exclude it from the next iteration of the series. Thanks, Thomas > > BR, > -R > > > --- > > drivers/gpu/drm/msm/msm_gem.h | 1 + > > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/msm/msm_gem.h > > b/drivers/gpu/drm/msm/msm_gem.h > > index cb32093fda47..762e546d25ef 100644 > > --- a/drivers/gpu/drm/msm/msm_gem.h > > +++ b/drivers/gpu/drm/msm/msm_gem.h > > @@ -452,6 +452,7 @@ struct msm_gem_submit { > > bool bos_pinned : 1; > > bool fault_dumped:1;/* Limit devcoredump dumping to one per > > submit */ > > bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ > > + bool has_exec : 1; /* @exec is initialized. */ > > struct msm_ringbuffer *ring; > > unsigned int nr_cmds; > > unsigned int nr_bos; > > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c > > b/drivers/gpu/drm/msm/msm_gem_submit.c > > index 75d9f3574370..26ea8a28be47 100644 > > --- a/drivers/gpu/drm/msm/msm_gem_submit.c > > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c > > @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct > > msm_gem_submit *submit) > > int ret = 0; > > > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > > + submit->has_exec = true; > > > > drm_exec_until_all_locked (&submit->exec) { > > ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); > > @@ -304,6 +305,7 @@ static int submit_lock_objects(struct > > msm_gem_submit *submit) > > return submit_lock_objects_vmbind(submit); > > > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > > + submit->has_exec = true; > > > > drm_exec_until_all_locked (&submit->exec) { > > ret = drm_exec_lock_obj(&submit->exec, > > @@ -523,7 +525,7 @@ static void submit_cleanup(struct > > msm_gem_submit *submit, bool error) > > if (error) > > submit_unpin_objects(submit); > > > > - if (submit->exec.objects) > > + if (submit->has_exec) > > drm_exec_fini(&submit->exec); > > > > /* if job wasn't enqueued to scheduler, early retirement: > > */ > > -- > > 2.53.0 > > ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals 2026-03-31 19:52 ` Thomas Hellström @ 2026-03-31 20:39 ` Rob Clark 0 siblings, 0 replies; 25+ messages in thread From: Rob Clark @ 2026-03-31 20:39 UTC (permalink / raw) To: Thomas Hellström Cc: intel-xe, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, Mar 31, 2026 at 12:52 PM Thomas Hellström <thomas.hellstrom@linux.intel.com> wrote: > > On Tue, 2026-03-31 at 12:08 -0700, Rob Clark wrote: > > On Tue, Mar 31, 2026 at 2:21 AM Thomas Hellström > > <thomas.hellstrom@linux.intel.com> wrote: > > > > > > The code was reading drm_exec internal state to determine whether > > > the drm_exec structure had been initialized or not, and therefore > > > needed cleaning up, relying on undocumented behaviour. > > > > > > Instead add a bool to struct msm_gem_submit to indicate whether > > > drm_exec cleaning up is needed. > > > > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > > > Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com> > > > > This is pretty stand-alone, so I can pick it up for v7.1. Or ack for > > landing it via drm-misc with the rest of the series if that is easier > > for you. It shouldn't conflict with anything in flight. > > Thanks Rob. Please pick it up and I'll exclude it from the next > iteration of the series. Will do, I have it queued up: https://gitlab.freedesktop.org/drm/msm/-/merge_requests/227 BR, -R > Thanks, > Thomas > > > > > BR, > > -R > > > > > --- > > > drivers/gpu/drm/msm/msm_gem.h | 1 + > > > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +++- > > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/msm/msm_gem.h > > > b/drivers/gpu/drm/msm/msm_gem.h > > > index cb32093fda47..762e546d25ef 100644 > > > --- a/drivers/gpu/drm/msm/msm_gem.h > > > +++ b/drivers/gpu/drm/msm/msm_gem.h > > > @@ -452,6 +452,7 @@ struct msm_gem_submit { > > > bool bos_pinned : 1; > > > bool fault_dumped:1;/* Limit devcoredump dumping to one per > > > submit */ > > > bool in_rb : 1; /* "sudo" mode, copy cmds into RB */ > > > + bool has_exec : 1; /* @exec is initialized. */ > > > struct msm_ringbuffer *ring; > > > unsigned int nr_cmds; > > > unsigned int nr_bos; > > > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c > > > b/drivers/gpu/drm/msm/msm_gem_submit.c > > > index 75d9f3574370..26ea8a28be47 100644 > > > --- a/drivers/gpu/drm/msm/msm_gem_submit.c > > > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c > > > @@ -278,6 +278,7 @@ static int submit_lock_objects_vmbind(struct > > > msm_gem_submit *submit) > > > int ret = 0; > > > > > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > > > + submit->has_exec = true; > > > > > > drm_exec_until_all_locked (&submit->exec) { > > > ret = drm_gpuvm_prepare_vm(submit->vm, exec, 1); > > > @@ -304,6 +305,7 @@ static int submit_lock_objects(struct > > > msm_gem_submit *submit) > > > return submit_lock_objects_vmbind(submit); > > > > > > drm_exec_init(&submit->exec, flags, submit->nr_bos); > > > + submit->has_exec = true; > > > > > > drm_exec_until_all_locked (&submit->exec) { > > > ret = drm_exec_lock_obj(&submit->exec, > > > @@ -523,7 +525,7 @@ static void submit_cleanup(struct > > > msm_gem_submit *submit, bool error) > > > if (error) > > > submit_unpin_objects(submit); > > > > > > - if (submit->exec.objects) > > > + if (submit->has_exec) > > > drm_exec_fini(&submit->exec); > > > > > > /* if job wasn't enqueued to scheduler, early retirement: > > > */ > > > -- > > > 2.53.0 > > > ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström 2026-03-31 9:20 ` [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] Thomas Hellström 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström @ 2026-03-31 9:20 ` Thomas Hellström 2026-03-31 9:39 ` Christian König 2026-03-31 9:20 ` [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer Thomas Hellström ` (3 subsequent siblings) 6 siblings, 1 reply; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw) To: intel-xe Cc: Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Use __UNIQUE_ID as done elsewhere in the kernel rather than a hand-rolled __PASTE to craft a unique id. Also use __maybe_unused rather than (void) to signify that a variable, althrough written to, may not actually be used. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- include/drm/drm_exec.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index 25db52dd2af0..fc95a979e253 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -89,6 +89,19 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) for (unsigned long _index = (exec)->num_objects - 1; \ ((obj) = drm_exec_obj(exec, _index)); --_index) +/* + * Helper to drm_exec_until_all_locked(). Don't use directly. + * + * Since labels can't be defined local to the loop's body we use a jump pointer + * to make sure that the retry is only used from within the loop's body. + */ +#define __drm_exec_until_all_locked(exec, _label) \ +_label: \ + for (void * __maybe_unused __drm_exec_retry_ptr; ({ \ + __drm_exec_retry_ptr = &&_label; \ + drm_exec_cleanup(exec); \ + });) + /** * drm_exec_until_all_locked - loop until all GEM objects are locked * @exec: drm_exec object @@ -96,17 +109,9 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) * Core functionality of the drm_exec object. Loops until all GEM objects are * locked and no more contention exists. At the beginning of the loop it is * guaranteed that no GEM object is locked. - * - * Since labels can't be defined local to the loops body we use a jump pointer - * to make sure that the retry is only used from within the loops body. */ #define drm_exec_until_all_locked(exec) \ -__PASTE(__drm_exec_, __LINE__): \ - for (void *__drm_exec_retry_ptr; ({ \ - __drm_exec_retry_ptr = &&__PASTE(__drm_exec_, __LINE__);\ - (void)__drm_exec_retry_ptr; \ - drm_exec_cleanup(exec); \ - });) + __drm_exec_until_all_locked(exec, __UNIQUE_ID(drm_exec)) /** * drm_exec_retry_on_contention - restart the loop to grap all locks -- 2.53.0 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable 2026-03-31 9:20 ` [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable Thomas Hellström @ 2026-03-31 9:39 ` Christian König 2026-03-31 11:03 ` Thomas Hellström 0 siblings, 1 reply; 25+ messages in thread From: Christian König @ 2026-03-31 9:39 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > Use __UNIQUE_ID as done elsewhere in the kernel rather than a > hand-rolled __PASTE to craft a unique id. > > Also use __maybe_unused rather than (void) to signify that a > variable, althrough written to, may not actually be used. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > --- > include/drm/drm_exec.h | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > index 25db52dd2af0..fc95a979e253 100644 > --- a/include/drm/drm_exec.h > +++ b/include/drm/drm_exec.h > @@ -89,6 +89,19 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) > for (unsigned long _index = (exec)->num_objects - 1; \ > ((obj) = drm_exec_obj(exec, _index)); --_index) > > +/* > + * Helper to drm_exec_until_all_locked(). Don't use directly. > + * > + * Since labels can't be defined local to the loop's body we use a jump pointer > + * to make sure that the retry is only used from within the loop's body. > + */ > +#define __drm_exec_until_all_locked(exec, _label) \ > +_label: \ > + for (void * __maybe_unused __drm_exec_retry_ptr; ({ \ > + __drm_exec_retry_ptr = &&_label; \ I think when using __maybe_unused we could also move assigning the variable to the deceleration and drop the extra ({}). Apart from that looks good to me. Regards, Christian. > + drm_exec_cleanup(exec); \ > + });) > + > /** > * drm_exec_until_all_locked - loop until all GEM objects are locked > * @exec: drm_exec object > @@ -96,17 +109,9 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) > * Core functionality of the drm_exec object. Loops until all GEM objects are > * locked and no more contention exists. At the beginning of the loop it is > * guaranteed that no GEM object is locked. > - * > - * Since labels can't be defined local to the loops body we use a jump pointer > - * to make sure that the retry is only used from within the loops body. > */ > #define drm_exec_until_all_locked(exec) \ > -__PASTE(__drm_exec_, __LINE__): \ > - for (void *__drm_exec_retry_ptr; ({ \ > - __drm_exec_retry_ptr = &&__PASTE(__drm_exec_, __LINE__);\ > - (void)__drm_exec_retry_ptr; \ > - drm_exec_cleanup(exec); \ > - });) > + __drm_exec_until_all_locked(exec, __UNIQUE_ID(drm_exec)) > > /** > * drm_exec_retry_on_contention - restart the loop to grap all locks ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable 2026-03-31 9:39 ` Christian König @ 2026-03-31 11:03 ` Thomas Hellström 0 siblings, 0 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 11:03 UTC (permalink / raw) To: Christian König, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, 2026-03-31 at 11:39 +0200, Christian König wrote: > > > On 3/31/26 11:20, Thomas Hellström wrote: > > Use __UNIQUE_ID as done elsewhere in the kernel rather than a > > hand-rolled __PASTE to craft a unique id. > > > > Also use __maybe_unused rather than (void) to signify that a > > variable, althrough written to, may not actually be used. > > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > --- > > include/drm/drm_exec.h | 23 ++++++++++++++--------- > > 1 file changed, 14 insertions(+), 9 deletions(-) > > > > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > > index 25db52dd2af0..fc95a979e253 100644 > > --- a/include/drm/drm_exec.h > > +++ b/include/drm/drm_exec.h > > @@ -89,6 +89,19 @@ drm_exec_obj(struct drm_exec *exec, unsigned > > long index) > > for (unsigned long _index = (exec)->num_objects - > > 1; \ > > ((obj) = drm_exec_obj(exec, _index)); --_index) > > > > +/* > > + * Helper to drm_exec_until_all_locked(). Don't use directly. > > + * > > + * Since labels can't be defined local to the loop's body we use a > > jump pointer > > + * to make sure that the retry is only used from within the loop's > > body. > > + */ > > +#define __drm_exec_until_all_locked(exec, > > _label) \ > > +_label: > > \ > > + for (void * __maybe_unused __drm_exec_retry_ptr; > > ({ \ > > + __drm_exec_retry_ptr = > > &&_label; \ > > I think when using __maybe_unused we could also move assigning the > variable to the deceleration and drop the extra ({}). Sure. Looks even better. Thanks, Thomas > > Apart from that looks good to me. > > Regards, > Christian. > > > + drm_exec_cleanup(exec); > > \ > > + });) > > + > > /** > > * drm_exec_until_all_locked - loop until all GEM objects are > > locked > > * @exec: drm_exec object > > @@ -96,17 +109,9 @@ drm_exec_obj(struct drm_exec *exec, unsigned > > long index) > > * Core functionality of the drm_exec object. Loops until all GEM > > objects are > > * locked and no more contention exists. At the beginning of the > > loop it is > > * guaranteed that no GEM object is locked. > > - * > > - * Since labels can't be defined local to the loops body we use a > > jump pointer > > - * to make sure that the retry is only used from within the loops > > body. > > */ > > #define > > drm_exec_until_all_locked(exec) \ > > -__PASTE(__drm_exec_, > > __LINE__): \ > > - for (void *__drm_exec_retry_ptr; > > ({ \ > > - __drm_exec_retry_ptr = &&__PASTE(__drm_exec_, > > __LINE__);\ > > - > > (void)__drm_exec_retry_ptr; \ > > - > > drm_exec_cleanup(exec); \ > > - });) > > + __drm_exec_until_all_locked(exec, __UNIQUE_ID(drm_exec)) > > > > /** > > * drm_exec_retry_on_contention - restart the loop to grap all > > locks ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström ` (2 preceding siblings ...) 2026-03-31 9:20 ` [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable Thomas Hellström @ 2026-03-31 9:20 ` Thomas Hellström 2026-03-31 9:44 ` Christian König 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström ` (2 subsequent siblings) 6 siblings, 1 reply; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw) To: intel-xe Cc: Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno The xe driver was using the drm_exec retry pointer directly to restart the locking loop after out-of-memory errors. This is relying on documented behaviour. Instead add a drm_exec_retry() macro that can be used in this situation, and that also asserts that the struct drm_exec is in a state that is compatible with retrying: Either newly initialized or in a contended state with all locks dropped. Use that macro in xe. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- drivers/gpu/drm/xe/xe_validation.h | 2 +- include/drm/drm_exec.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_validation.h b/drivers/gpu/drm/xe/xe_validation.h index a30e732c4d51..4cd955ce6cd2 100644 --- a/drivers/gpu/drm/xe/xe_validation.h +++ b/drivers/gpu/drm/xe/xe_validation.h @@ -146,7 +146,7 @@ bool xe_validation_should_retry(struct xe_validation_ctx *ctx, int *ret); #define xe_validation_retry_on_oom(_ctx, _ret) \ do { \ if (xe_validation_should_retry(_ctx, _ret)) \ - goto *__drm_exec_retry_ptr; \ + drm_exec_retry((_ctx)->exec); \ } while (0) /** diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index fc95a979e253..5ed5be1f8244 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -138,6 +138,19 @@ static inline bool drm_exec_is_contended(struct drm_exec *exec) return !!exec->contended; } +/** + * drm_exec_retry() - Unconditionally restart the loop to grab all locks. + * @exec: drm_exec object + * + * Unconditionally retry the loop to lock all objects. For consistency, + * the exec object needs to be newly initialized or contended. + */ +#define drm_exec_retry(_exec) \ + do { \ + WARN_ON(!drm_exec_is_contended(_exec)); \ + goto *__drm_exec_retry_ptr; \ + } while (0) + void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); void drm_exec_fini(struct drm_exec *exec); bool drm_exec_cleanup(struct drm_exec *exec); -- 2.53.0 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer 2026-03-31 9:20 ` [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer Thomas Hellström @ 2026-03-31 9:44 ` Christian König 2026-03-31 10:13 ` Thomas Hellström 0 siblings, 1 reply; 25+ messages in thread From: Christian König @ 2026-03-31 9:44 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > The xe driver was using the drm_exec retry pointer directly to > restart the locking loop after out-of-memory errors. This is > relying on documented behaviour. > > Instead add a drm_exec_retry() macro that can be used in this > situation, and that also asserts that the struct drm_exec is > in a state that is compatible with retrying: > Either newly initialized or in a contended state with all locks > dropped. > > Use that macro in xe. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > --- > drivers/gpu/drm/xe/xe_validation.h | 2 +- > include/drm/drm_exec.h | 13 +++++++++++++ > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_validation.h b/drivers/gpu/drm/xe/xe_validation.h > index a30e732c4d51..4cd955ce6cd2 100644 > --- a/drivers/gpu/drm/xe/xe_validation.h > +++ b/drivers/gpu/drm/xe/xe_validation.h > @@ -146,7 +146,7 @@ bool xe_validation_should_retry(struct xe_validation_ctx *ctx, int *ret); > #define xe_validation_retry_on_oom(_ctx, _ret) \ > do { \ > if (xe_validation_should_retry(_ctx, _ret)) \ > - goto *__drm_exec_retry_ptr; \ > + drm_exec_retry((_ctx)->exec); \ Oh, that goto is extremely questionable to begin with. > } while (0) > > /** > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > index fc95a979e253..5ed5be1f8244 100644 > --- a/include/drm/drm_exec.h > +++ b/include/drm/drm_exec.h > @@ -138,6 +138,19 @@ static inline bool drm_exec_is_contended(struct drm_exec *exec) > return !!exec->contended; > } > > +/** > + * drm_exec_retry() - Unconditionally restart the loop to grab all locks. > + * @exec: drm_exec object > + * > + * Unconditionally retry the loop to lock all objects. For consistency, > + * the exec object needs to be newly initialized or contended. > + */ > +#define drm_exec_retry(_exec) \ > + do { \ > + WARN_ON(!drm_exec_is_contended(_exec)); \ This warning would trigger! See the code in xe_bo_notifier_prepare_pinned() for example: drm_exec_retry_on_contention(&exec); ret = PTR_ERR(backup); xe_validation_retry_on_oom(&ctx, &ret); Without contention we would just skip the loop and never lock anything. What XE does here just doesn't work as far as I can see. Regards, Christian. > + goto *__drm_exec_retry_ptr; \ > + } while (0) > + > void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); > void drm_exec_fini(struct drm_exec *exec); > bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer 2026-03-31 9:44 ` Christian König @ 2026-03-31 10:13 ` Thomas Hellström 2026-03-31 11:09 ` Thomas Hellström 2026-03-31 11:59 ` Christian König 0 siblings, 2 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 10:13 UTC (permalink / raw) To: Christian König, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, 2026-03-31 at 11:44 +0200, Christian König wrote: > On 3/31/26 11:20, Thomas Hellström wrote: > > The xe driver was using the drm_exec retry pointer directly to > > restart the locking loop after out-of-memory errors. This is > > relying on documented behaviour. > > > > Instead add a drm_exec_retry() macro that can be used in this > > situation, and that also asserts that the struct drm_exec is > > in a state that is compatible with retrying: > > Either newly initialized or in a contended state with all locks > > dropped. > > > > Use that macro in xe. > > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > --- > > drivers/gpu/drm/xe/xe_validation.h | 2 +- > > include/drm/drm_exec.h | 13 +++++++++++++ > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/xe/xe_validation.h > > b/drivers/gpu/drm/xe/xe_validation.h > > index a30e732c4d51..4cd955ce6cd2 100644 > > --- a/drivers/gpu/drm/xe/xe_validation.h > > +++ b/drivers/gpu/drm/xe/xe_validation.h > > @@ -146,7 +146,7 @@ bool xe_validation_should_retry(struct > > xe_validation_ctx *ctx, int *ret); > > #define xe_validation_retry_on_oom(_ctx, > > _ret) \ > > do > > { \ > > if (xe_validation_should_retry(_ctx, > > _ret)) \ > > - goto > > *__drm_exec_retry_ptr; \ > > + drm_exec_retry((_ctx)- > > >exec); \ > > Oh, that goto is extremely questionable to begin with. > > > } while (0) > > > > /** > > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > > index fc95a979e253..5ed5be1f8244 100644 > > --- a/include/drm/drm_exec.h > > +++ b/include/drm/drm_exec.h > > @@ -138,6 +138,19 @@ static inline bool > > drm_exec_is_contended(struct drm_exec *exec) > > return !!exec->contended; > > } > > > > +/** > > + * drm_exec_retry() - Unconditionally restart the loop to grab all > > locks. > > + * @exec: drm_exec object > > + * > > + * Unconditionally retry the loop to lock all objects. For > > consistency, > > + * the exec object needs to be newly initialized or contended. > > + */ > > +#define drm_exec_retry(_exec) \ > > + do { \ > > + WARN_ON(!drm_exec_is_contended(_exec)); \ > > This warning would trigger! > > See the code in xe_bo_notifier_prepare_pinned() for example: > > drm_exec_retry_on_contention(&exec); > ret = PTR_ERR(backup); > xe_validation_retry_on_oom(&ctx, &ret); > > Without contention we would just skip the loop and never lock > anything. > > What XE does here just doesn't work as far as I can see. So if the xe_validation_retry_on_oom() is actually retrying it internally call drm_exec_fini() and drm_exec_init() first, which means that the warning doesn't trigger, due to the dummy value of contended. So the warning does its job, and xe is safe. Thanks, Thomas > > Regards, > Christian. > > > + goto *__drm_exec_retry_ptr; \ > > + } while (0) > > + > > void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); > > void drm_exec_fini(struct drm_exec *exec); > > bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer 2026-03-31 10:13 ` Thomas Hellström @ 2026-03-31 11:09 ` Thomas Hellström 2026-03-31 11:59 ` Christian König 1 sibling, 0 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 11:09 UTC (permalink / raw) To: Christian König, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On Tue, 2026-03-31 at 12:13 +0200, Thomas Hellström wrote: > On Tue, 2026-03-31 at 11:44 +0200, Christian König wrote: > > On 3/31/26 11:20, Thomas Hellström wrote: > > > The xe driver was using the drm_exec retry pointer directly to > > > restart the locking loop after out-of-memory errors. This is > > > relying on documented behaviour. > > > > > > Instead add a drm_exec_retry() macro that can be used in this > > > situation, and that also asserts that the struct drm_exec is > > > in a state that is compatible with retrying: > > > Either newly initialized or in a contended state with all locks > > > dropped. > > > > > > Use that macro in xe. > > > > > > Signed-off-by: Thomas Hellström > > > <thomas.hellstrom@linux.intel.com> > > > --- > > > drivers/gpu/drm/xe/xe_validation.h | 2 +- > > > include/drm/drm_exec.h | 13 +++++++++++++ > > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/xe/xe_validation.h > > > b/drivers/gpu/drm/xe/xe_validation.h > > > index a30e732c4d51..4cd955ce6cd2 100644 > > > --- a/drivers/gpu/drm/xe/xe_validation.h > > > +++ b/drivers/gpu/drm/xe/xe_validation.h > > > @@ -146,7 +146,7 @@ bool xe_validation_should_retry(struct > > > xe_validation_ctx *ctx, int *ret); > > > #define xe_validation_retry_on_oom(_ctx, > > > _ret) \ > > > do > > > { \ > > > if (xe_validation_should_retry(_ctx, > > > _ret)) \ > > > - goto > > > *__drm_exec_retry_ptr; \ > > > + drm_exec_retry((_ctx)- > > > > exec); \ > > > > Oh, that goto is extremely questionable to begin with. > > > > > } while (0) > > > > > > /** > > > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > > > index fc95a979e253..5ed5be1f8244 100644 > > > --- a/include/drm/drm_exec.h > > > +++ b/include/drm/drm_exec.h > > > @@ -138,6 +138,19 @@ static inline bool > > > drm_exec_is_contended(struct drm_exec *exec) > > > return !!exec->contended; > > > } > > > > > > +/** > > > + * drm_exec_retry() - Unconditionally restart the loop to grab > > > all > > > locks. > > > + * @exec: drm_exec object > > > + * > > > + * Unconditionally retry the loop to lock all objects. For > > > consistency, > > > + * the exec object needs to be newly initialized or contended. > > > + */ > > > +#define drm_exec_retry(_exec) \ > > > + do { \ > > > + WARN_ON(!drm_exec_is_contended(_exec)); \ > > > > This warning would trigger! > > > > See the code in xe_bo_notifier_prepare_pinned() for example: > > > > drm_exec_retry_on_contention(&exec); > > ret = PTR_ERR(backup); > > xe_validation_retry_on_oom(&ctx, &ret); > > > > Without contention we would just skip the loop and never lock > > anything. > > > > What XE does here just doesn't work as far as I can see. > > So if the xe_validation_retry_on_oom() is actually retrying it > internally call drm_exec_fini() and drm_exec_init() first, which > means > that the warning doesn't trigger, due to the dummy value of > contended. > > So the warning does its job, and xe is safe. So the xe stuff is actually basically an outer loop to drm_exec_until_all_locked(). We could ofc explicitly code that implementing an xe_validation_until_all_valid() and have a separate goto ptr, but I'm not sure that is cleaner, really. They'd point to the same address anyway. In the end, the WARN_ON in drm_exec_retry() would ensure drm_exec is not in an awkward state anyway. Thanks, Thomas > > Thanks, > Thomas > > > > > > > Regards, > > Christian. > > > > > + goto *__drm_exec_retry_ptr; \ > > > + } while (0) > > > + > > > void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned > > > nr); > > > void drm_exec_fini(struct drm_exec *exec); > > > bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer 2026-03-31 10:13 ` Thomas Hellström 2026-03-31 11:09 ` Thomas Hellström @ 2026-03-31 11:59 ` Christian König 1 sibling, 0 replies; 25+ messages in thread From: Christian König @ 2026-03-31 11:59 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 12:13, Thomas Hellström wrote: > On Tue, 2026-03-31 at 11:44 +0200, Christian König wrote: >> On 3/31/26 11:20, Thomas Hellström wrote: >>> The xe driver was using the drm_exec retry pointer directly to >>> restart the locking loop after out-of-memory errors. This is >>> relying on documented behaviour. >>> >>> Instead add a drm_exec_retry() macro that can be used in this >>> situation, and that also asserts that the struct drm_exec is >>> in a state that is compatible with retrying: >>> Either newly initialized or in a contended state with all locks >>> dropped. >>> >>> Use that macro in xe. >>> >>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> >>> --- >>> drivers/gpu/drm/xe/xe_validation.h | 2 +- >>> include/drm/drm_exec.h | 13 +++++++++++++ >>> 2 files changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/xe/xe_validation.h >>> b/drivers/gpu/drm/xe/xe_validation.h >>> index a30e732c4d51..4cd955ce6cd2 100644 >>> --- a/drivers/gpu/drm/xe/xe_validation.h >>> +++ b/drivers/gpu/drm/xe/xe_validation.h >>> @@ -146,7 +146,7 @@ bool xe_validation_should_retry(struct >>> xe_validation_ctx *ctx, int *ret); >>> #define xe_validation_retry_on_oom(_ctx, >>> _ret) \ >>> do >>> { \ >>> if (xe_validation_should_retry(_ctx, >>> _ret)) \ >>> - goto >>> *__drm_exec_retry_ptr; \ >>> + drm_exec_retry((_ctx)- >>>> exec); \ >> >> Oh, that goto is extremely questionable to begin with. >> >>> } while (0) >>> >>> /** >>> diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h >>> index fc95a979e253..5ed5be1f8244 100644 >>> --- a/include/drm/drm_exec.h >>> +++ b/include/drm/drm_exec.h >>> @@ -138,6 +138,19 @@ static inline bool >>> drm_exec_is_contended(struct drm_exec *exec) >>> return !!exec->contended; >>> } >>> >>> +/** >>> + * drm_exec_retry() - Unconditionally restart the loop to grab all >>> locks. >>> + * @exec: drm_exec object >>> + * >>> + * Unconditionally retry the loop to lock all objects. For >>> consistency, >>> + * the exec object needs to be newly initialized or contended. >>> + */ >>> +#define drm_exec_retry(_exec) \ >>> + do { \ >>> + WARN_ON(!drm_exec_is_contended(_exec)); \ >> >> This warning would trigger! >> >> See the code in xe_bo_notifier_prepare_pinned() for example: >> >> drm_exec_retry_on_contention(&exec); >> ret = PTR_ERR(backup); >> xe_validation_retry_on_oom(&ctx, &ret); >> >> Without contention we would just skip the loop and never lock >> anything. >> >> What XE does here just doesn't work as far as I can see. > > So if the xe_validation_retry_on_oom() is actually retrying it > internally call drm_exec_fini() and drm_exec_init() first, which means > that the warning doesn't trigger, due to the dummy value of contended. Ah! Yeah that information was missing. I'm really wondering if the calls to drm_exec_fini()/drm_exec_init() should be part of the drm_exec_retry() handling. Otherwise that is kind of easy to mess up. Regards, Christian. > > So the warning does its job, and xe is safe. > > Thanks, > Thomas > > > >> >> Regards, >> Christian. >> >>> + goto *__drm_exec_retry_ptr; \ >>> + } while (0) >>> + >>> void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); >>> void drm_exec_fini(struct drm_exec *exec); >>> bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström ` (3 preceding siblings ...) 2026-03-31 9:20 ` [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer Thomas Hellström @ 2026-03-31 9:20 ` Thomas Hellström 2026-03-31 9:46 ` Christian König ` (3 more replies) 2026-03-31 9:49 ` ✗ CI.checkpatch: warning for drm/exec: drm_exec polishing Patchwork 2026-03-31 9:51 ` ✓ CI.KUnit: success " Patchwork 6 siblings, 4 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 9:20 UTC (permalink / raw) To: intel-xe Cc: Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Drivers were accessing this drm_exec member directly. Provide an accessor, drm_exec_ticket() to avoid that. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- drivers/gpu/drm/xe/xe_validation.c | 4 ++-- include/drm/drm_exec.h | 5 +++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 29b400cdd6d5..8a4fb9a62485 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -2998,7 +2998,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu * /* Validate PDs, PTs and evicted DMABuf imports last. Otherwise BO * validations above would invalidate DMABuf imports again. */ - ret = process_validate_vms(process_info, &exec.ticket); + ret = process_validate_vms(process_info, drm_exec_ticket(exec)); if (ret) { pr_debug("Validating VMs failed, ret: %d\n", ret); goto validate_map_fail; @@ -3039,7 +3039,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu * goto validate_map_fail; } - ret = amdgpu_vm_handle_moved(adev, peer_vm, &exec.ticket); + ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); if (ret) { dev_dbg(adev->dev, "Memory eviction: handle moved failed, pid %8d. Try again.\n", diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index c4ee19603460..c725a7976c63 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1157,7 +1157,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p) return r; } - r = amdgpu_vm_handle_moved(adev, vm, &p->exec.ticket); + r = amdgpu_vm_handle_moved(adev, vm, drm_exec_ticket(&p->exec)); if (r) return r; @@ -1358,7 +1358,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, cs->out.handle = seq; leader->uf_sequence = seq; - amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->exec.ticket); + amdgpu_vm_bo_trace_cs(&fpriv->vm, drm_exec_ticket(&p->exec)); for (i = 0; i < p->gang_size; ++i) { amdgpu_job_free_resources(p->jobs[i]); trace_amdgpu_cs_ioctl(p->jobs[i]); @@ -1793,7 +1793,7 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, *map = mapping; /* Double check that the BO is reserved by this CS */ - if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser->exec.ticket) + if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != drm_exec_ticket(&parser->exec)) return -EINVAL; /* Make sure VRAM is allocated contigiously */ diff --git a/drivers/gpu/drm/xe/xe_validation.c b/drivers/gpu/drm/xe/xe_validation.c index a611438eaafe..8dff4d0ec895 100644 --- a/drivers/gpu/drm/xe/xe_validation.c +++ b/drivers/gpu/drm/xe/xe_validation.c @@ -156,7 +156,7 @@ int xe_validation_ctx_init(struct xe_validation_ctx *ctx, struct xe_validation_d #ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH /* - * This abuses both drm_exec and ww_mutex internals and should be + * This abuses ww_mutex internals and should be * replaced by checking for -EDEADLK when we can make TTM * stop converting -EDEADLK to -ENOMEM. * An alternative is to not have exhaustive eviction with @@ -164,7 +164,7 @@ int xe_validation_ctx_init(struct xe_validation_ctx *ctx, struct xe_validation_d */ static bool xe_validation_contention_injected(struct drm_exec *exec) { - return !!exec->ticket.contending_lock; + return !!drm_exec_ticket(exec)->contending_lock; } #else diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index 5ed5be1f8244..50d056a87de0 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -151,6 +151,11 @@ static inline bool drm_exec_is_contended(struct drm_exec *exec) goto *__drm_exec_retry_ptr; \ } while (0) +static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) +{ + return &exec->ticket; +} + void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); void drm_exec_fini(struct drm_exec *exec); bool drm_exec_cleanup(struct drm_exec *exec); -- 2.53.0 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström @ 2026-03-31 9:46 ` Christian König 2026-03-31 10:18 ` Thomas Hellström 2026-03-31 21:46 ` kernel test robot ` (2 subsequent siblings) 3 siblings, 1 reply; 25+ messages in thread From: Christian König @ 2026-03-31 9:46 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno On 3/31/26 11:20, Thomas Hellström wrote: > Drivers were accessing this drm_exec member directly. I don't see a problem with that as long as we have documented that this is allowed. Regards, Christian. > Provide an accessor, drm_exec_ticket() to avoid that. > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- > drivers/gpu/drm/xe/xe_validation.c | 4 ++-- > include/drm/drm_exec.h | 5 +++++ > 4 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > index 29b400cdd6d5..8a4fb9a62485 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > @@ -2998,7 +2998,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu * > /* Validate PDs, PTs and evicted DMABuf imports last. Otherwise BO > * validations above would invalidate DMABuf imports again. > */ > - ret = process_validate_vms(process_info, &exec.ticket); > + ret = process_validate_vms(process_info, drm_exec_ticket(exec)); > if (ret) { > pr_debug("Validating VMs failed, ret: %d\n", ret); > goto validate_map_fail; > @@ -3039,7 +3039,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu * > goto validate_map_fail; > } > > - ret = amdgpu_vm_handle_moved(adev, peer_vm, &exec.ticket); > + ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); > if (ret) { > dev_dbg(adev->dev, > "Memory eviction: handle moved failed, pid %8d. Try again.\n", > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > index c4ee19603460..c725a7976c63 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > @@ -1157,7 +1157,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p) > return r; > } > > - r = amdgpu_vm_handle_moved(adev, vm, &p->exec.ticket); > + r = amdgpu_vm_handle_moved(adev, vm, drm_exec_ticket(&p->exec)); > if (r) > return r; > > @@ -1358,7 +1358,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, > cs->out.handle = seq; > leader->uf_sequence = seq; > > - amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->exec.ticket); > + amdgpu_vm_bo_trace_cs(&fpriv->vm, drm_exec_ticket(&p->exec)); > for (i = 0; i < p->gang_size; ++i) { > amdgpu_job_free_resources(p->jobs[i]); > trace_amdgpu_cs_ioctl(p->jobs[i]); > @@ -1793,7 +1793,7 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, > *map = mapping; > > /* Double check that the BO is reserved by this CS */ > - if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser->exec.ticket) > + if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != drm_exec_ticket(&parser->exec)) > return -EINVAL; > > /* Make sure VRAM is allocated contigiously */ > diff --git a/drivers/gpu/drm/xe/xe_validation.c b/drivers/gpu/drm/xe/xe_validation.c > index a611438eaafe..8dff4d0ec895 100644 > --- a/drivers/gpu/drm/xe/xe_validation.c > +++ b/drivers/gpu/drm/xe/xe_validation.c > @@ -156,7 +156,7 @@ int xe_validation_ctx_init(struct xe_validation_ctx *ctx, struct xe_validation_d > > #ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH > /* > - * This abuses both drm_exec and ww_mutex internals and should be > + * This abuses ww_mutex internals and should be > * replaced by checking for -EDEADLK when we can make TTM > * stop converting -EDEADLK to -ENOMEM. > * An alternative is to not have exhaustive eviction with > @@ -164,7 +164,7 @@ int xe_validation_ctx_init(struct xe_validation_ctx *ctx, struct xe_validation_d > */ > static bool xe_validation_contention_injected(struct drm_exec *exec) > { > - return !!exec->ticket.contending_lock; > + return !!drm_exec_ticket(exec)->contending_lock; > } > > #else > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > index 5ed5be1f8244..50d056a87de0 100644 > --- a/include/drm/drm_exec.h > +++ b/include/drm/drm_exec.h > @@ -151,6 +151,11 @@ static inline bool drm_exec_is_contended(struct drm_exec *exec) > goto *__drm_exec_retry_ptr; \ > } while (0) > > +static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) > +{ > + return &exec->ticket; > +} > + > void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); > void drm_exec_fini(struct drm_exec *exec); > bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:46 ` Christian König @ 2026-03-31 10:18 ` Thomas Hellström 0 siblings, 0 replies; 25+ messages in thread From: Thomas Hellström @ 2026-03-31 10:18 UTC (permalink / raw) To: Christian König, intel-xe Cc: Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Hi, On Tue, 2026-03-31 at 11:46 +0200, Christian König wrote: > On 3/31/26 11:20, Thomas Hellström wrote: > > Drivers were accessing this drm_exec member directly. > > I don't see a problem with that as long as we have documented that > this is allowed. It's more of forward-looking for the case I mentioned in the cover- letter. If drm_exec becomes a subclass of a drm_transaction or whatever, then this would likely be &exec->txn.ticket; Could ofc postpone that to any such refactor, but since the patch is up for review... Thanks, Thomas > > Regards, > Christian. > > > Provide an accessor, drm_exec_ticket() to avoid that. > > > > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- > > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- > > drivers/gpu/drm/xe/xe_validation.c | 4 ++-- > > include/drm/drm_exec.h | 5 +++++ > > 4 files changed, 12 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > > index 29b400cdd6d5..8a4fb9a62485 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > > @@ -2998,7 +2998,7 @@ int > > amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct > > dma_fence __rcu * > > /* Validate PDs, PTs and evicted DMABuf imports last. > > Otherwise BO > > * validations above would invalidate DMABuf imports > > again. > > */ > > - ret = process_validate_vms(process_info, &exec.ticket); > > + ret = process_validate_vms(process_info, > > drm_exec_ticket(exec)); > > if (ret) { > > pr_debug("Validating VMs failed, ret: %d\n", ret); > > goto validate_map_fail; > > @@ -3039,7 +3039,7 @@ int > > amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct > > dma_fence __rcu * > > goto validate_map_fail; > > } > > > > - ret = amdgpu_vm_handle_moved(adev, peer_vm, > > &exec.ticket); > > + ret = amdgpu_vm_handle_moved(adev, peer_vm, > > drm_exec_ticket(exec)); > > if (ret) { > > dev_dbg(adev->dev, > > "Memory eviction: handle moved > > failed, pid %8d. Try again.\n", > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > index c4ee19603460..c725a7976c63 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > @@ -1157,7 +1157,7 @@ static int amdgpu_cs_vm_handling(struct > > amdgpu_cs_parser *p) > > return r; > > } > > > > - r = amdgpu_vm_handle_moved(adev, vm, &p->exec.ticket); > > + r = amdgpu_vm_handle_moved(adev, vm, drm_exec_ticket(&p- > > >exec)); > > if (r) > > return r; > > > > @@ -1358,7 +1358,7 @@ static int amdgpu_cs_submit(struct > > amdgpu_cs_parser *p, > > cs->out.handle = seq; > > leader->uf_sequence = seq; > > > > - amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->exec.ticket); > > + amdgpu_vm_bo_trace_cs(&fpriv->vm, drm_exec_ticket(&p- > > >exec)); > > for (i = 0; i < p->gang_size; ++i) { > > amdgpu_job_free_resources(p->jobs[i]); > > trace_amdgpu_cs_ioctl(p->jobs[i]); > > @@ -1793,7 +1793,7 @@ int amdgpu_cs_find_mapping(struct > > amdgpu_cs_parser *parser, > > *map = mapping; > > > > /* Double check that the BO is reserved by this CS */ > > - if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser- > > >exec.ticket) > > + if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != > > drm_exec_ticket(&parser->exec)) > > return -EINVAL; > > > > /* Make sure VRAM is allocated contigiously */ > > diff --git a/drivers/gpu/drm/xe/xe_validation.c > > b/drivers/gpu/drm/xe/xe_validation.c > > index a611438eaafe..8dff4d0ec895 100644 > > --- a/drivers/gpu/drm/xe/xe_validation.c > > +++ b/drivers/gpu/drm/xe/xe_validation.c > > @@ -156,7 +156,7 @@ int xe_validation_ctx_init(struct > > xe_validation_ctx *ctx, struct xe_validation_d > > > > #ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH > > /* > > - * This abuses both drm_exec and ww_mutex internals and should be > > + * This abuses ww_mutex internals and should be > > * replaced by checking for -EDEADLK when we can make TTM > > * stop converting -EDEADLK to -ENOMEM. > > * An alternative is to not have exhaustive eviction with > > @@ -164,7 +164,7 @@ int xe_validation_ctx_init(struct > > xe_validation_ctx *ctx, struct xe_validation_d > > */ > > static bool xe_validation_contention_injected(struct drm_exec > > *exec) > > { > > - return !!exec->ticket.contending_lock; > > + return !!drm_exec_ticket(exec)->contending_lock; > > } > > > > #else > > diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h > > index 5ed5be1f8244..50d056a87de0 100644 > > --- a/include/drm/drm_exec.h > > +++ b/include/drm/drm_exec.h > > @@ -151,6 +151,11 @@ static inline bool > > drm_exec_is_contended(struct drm_exec *exec) > > goto *__drm_exec_retry_ptr; \ > > } while (0) > > > > +static inline struct ww_acquire_ctx *drm_exec_ticket(struct > > drm_exec *exec) > > +{ > > + return &exec->ticket; > > +} > > + > > void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); > > void drm_exec_fini(struct drm_exec *exec); > > bool drm_exec_cleanup(struct drm_exec *exec); ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström 2026-03-31 9:46 ` Christian König @ 2026-03-31 21:46 ` kernel test robot 2026-03-31 22:07 ` kernel test robot 2026-04-01 0:38 ` kernel test robot 3 siblings, 0 replies; 25+ messages in thread From: kernel test robot @ 2026-03-31 21:46 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: oe-kbuild-all, Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Hi Thomas, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on next-20260331] [cannot apply to drm-xe/drm-xe-next linus/master v6.16-rc1] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Hellstr-m/drm-exec-Remove-the-index-parameter-from-drm_exec_for_each_locked_obj-_reverse/20260331-220349 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260331092023.81616-6-thomas.hellstrom%40linux.intel.com patch subject: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260331/202603312339.70s7djVd-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603312339.70s7djVd-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202603312339.70s7djVd-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 'amdgpu_amdkfd_gpuvm_restore_process_bos': >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3001:66: error: incompatible type for argument 1 of 'drm_exec_ticket' 3001 | ret = process_validate_vms(process_info, drm_exec_ticket(exec)); | ^~~~ | | | struct drm_exec In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:30: include/drm/drm_exec.h:154:71: note: expected 'struct drm_exec *' but argument is of type 'struct drm_exec' 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ~~~~~~~~~~~~~~~~~^~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3042:77: error: incompatible type for argument 1 of 'drm_exec_ticket' 3042 | ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); | ^~~~ | | | struct drm_exec include/drm/drm_exec.h:154:71: note: expected 'struct drm_exec *' but argument is of type 'struct drm_exec' 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ~~~~~~~~~~~~~~~~~^~~~ vim +/drm_exec_ticket +3001 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2897 2898 /** amdgpu_amdkfd_gpuvm_restore_process_bos - Restore all BOs for the given 2899 * KFD process identified by process_info 2900 * 2901 * @process_info: amdkfd_process_info of the KFD process 2902 * 2903 * After memory eviction, restore thread calls this function. The function 2904 * should be called when the Process is still valid. BO restore involves - 2905 * 2906 * 1. Release old eviction fence and create new one 2907 * 2. Get two copies of PD BO list from all the VMs. Keep one copy as pd_list. 2908 * 3 Use the second PD list and kfd_bo_list to create a list (ctx.list) of 2909 * BOs that need to be reserved. 2910 * 4. Reserve all the BOs 2911 * 5. Validate of PD and PT BOs. 2912 * 6. Validate all KFD BOs using kfd_bo_list and Map them and add new fence 2913 * 7. Add fence to all PD and PT BOs. 2914 * 8. Unreserve all BOs 2915 */ 2916 int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu **ef) 2917 { 2918 struct amdkfd_process_info *process_info = info; 2919 struct amdgpu_vm *peer_vm; 2920 struct kgd_mem *mem; 2921 struct list_head duplicate_save; 2922 struct amdgpu_sync sync_obj; 2923 unsigned long failed_size = 0; 2924 unsigned long total_size = 0; 2925 struct drm_exec exec; 2926 int ret; 2927 2928 INIT_LIST_HEAD(&duplicate_save); 2929 2930 mutex_lock(&process_info->lock); 2931 2932 drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0); 2933 drm_exec_until_all_locked(&exec) { 2934 list_for_each_entry(peer_vm, &process_info->vm_list_head, 2935 vm_list_node) { 2936 ret = amdgpu_vm_lock_pd(peer_vm, &exec, 2); 2937 drm_exec_retry_on_contention(&exec); 2938 if (unlikely(ret)) { 2939 pr_err("Locking VM PD failed, ret: %d\n", ret); 2940 goto ttm_reserve_fail; 2941 } 2942 } 2943 2944 /* Reserve all BOs and page tables/directory. Add all BOs from 2945 * kfd_bo_list to ctx.list 2946 */ 2947 list_for_each_entry(mem, &process_info->kfd_bo_list, 2948 validate_list) { 2949 struct drm_gem_object *gobj; 2950 2951 gobj = &mem->bo->tbo.base; 2952 ret = drm_exec_prepare_obj(&exec, gobj, 1); 2953 drm_exec_retry_on_contention(&exec); 2954 if (unlikely(ret)) { 2955 pr_err("drm_exec_prepare_obj failed, ret: %d\n", ret); 2956 goto ttm_reserve_fail; 2957 } 2958 } 2959 } 2960 2961 amdgpu_sync_create(&sync_obj); 2962 2963 /* Validate BOs managed by KFD */ 2964 list_for_each_entry(mem, &process_info->kfd_bo_list, 2965 validate_list) { 2966 2967 struct amdgpu_bo *bo = mem->bo; 2968 uint32_t domain = mem->domain; 2969 struct dma_resv_iter cursor; 2970 struct dma_fence *fence; 2971 2972 total_size += amdgpu_bo_size(bo); 2973 2974 ret = amdgpu_amdkfd_bo_validate(bo, domain, false); 2975 if (ret) { 2976 pr_debug("Memory eviction: Validate BOs failed\n"); 2977 failed_size += amdgpu_bo_size(bo); 2978 ret = amdgpu_amdkfd_bo_validate(bo, 2979 AMDGPU_GEM_DOMAIN_GTT, false); 2980 if (ret) { 2981 pr_debug("Memory eviction: Try again\n"); 2982 goto validate_map_fail; 2983 } 2984 } 2985 dma_resv_for_each_fence(&cursor, bo->tbo.base.resv, 2986 DMA_RESV_USAGE_KERNEL, fence) { 2987 ret = amdgpu_sync_fence(&sync_obj, fence, GFP_KERNEL); 2988 if (ret) { 2989 pr_debug("Memory eviction: Sync BO fence failed. Try again\n"); 2990 goto validate_map_fail; 2991 } 2992 } 2993 } 2994 2995 if (failed_size) 2996 pr_debug("0x%lx/0x%lx in system\n", failed_size, total_size); 2997 2998 /* Validate PDs, PTs and evicted DMABuf imports last. Otherwise BO 2999 * validations above would invalidate DMABuf imports again. 3000 */ > 3001 ret = process_validate_vms(process_info, drm_exec_ticket(exec)); 3002 if (ret) { 3003 pr_debug("Validating VMs failed, ret: %d\n", ret); 3004 goto validate_map_fail; 3005 } 3006 3007 /* Update mappings managed by KFD. */ 3008 list_for_each_entry(mem, &process_info->kfd_bo_list, 3009 validate_list) { 3010 struct kfd_mem_attachment *attachment; 3011 3012 list_for_each_entry(attachment, &mem->attachments, list) { 3013 if (!attachment->is_mapped) 3014 continue; 3015 3016 kfd_mem_dmaunmap_attachment(mem, attachment); 3017 ret = update_gpuvm_pte(mem, attachment, &sync_obj); 3018 if (ret) { 3019 pr_debug("Memory eviction: update PTE failed. Try again\n"); 3020 goto validate_map_fail; 3021 } 3022 } 3023 } 3024 3025 /* Update mappings not managed by KFD */ 3026 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3027 vm_list_node) { 3028 struct amdgpu_device *adev = amdgpu_ttm_adev( 3029 peer_vm->root.bo->tbo.bdev); 3030 3031 struct amdgpu_fpriv *fpriv = 3032 container_of(peer_vm, struct amdgpu_fpriv, vm); 3033 3034 ret = amdgpu_vm_bo_update(adev, fpriv->prt_va, false); 3035 if (ret) { 3036 dev_dbg(adev->dev, 3037 "Memory eviction: handle PRT moved failed, pid %8d. Try again.\n", 3038 pid_nr(process_info->pid)); 3039 goto validate_map_fail; 3040 } 3041 3042 ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); 3043 if (ret) { 3044 dev_dbg(adev->dev, 3045 "Memory eviction: handle moved failed, pid %8d. Try again.\n", 3046 pid_nr(process_info->pid)); 3047 goto validate_map_fail; 3048 } 3049 } 3050 3051 /* Update page directories */ 3052 ret = process_update_pds(process_info, &sync_obj); 3053 if (ret) { 3054 pr_debug("Memory eviction: update PDs failed. Try again\n"); 3055 goto validate_map_fail; 3056 } 3057 3058 /* Sync with fences on all the page tables. They implicitly depend on any 3059 * move fences from amdgpu_vm_handle_moved above. 3060 */ 3061 ret = process_sync_pds_resv(process_info, &sync_obj); 3062 if (ret) { 3063 pr_debug("Memory eviction: Failed to sync to PD BO moving fence. Try again\n"); 3064 goto validate_map_fail; 3065 } 3066 3067 /* Wait for validate and PT updates to finish */ 3068 amdgpu_sync_wait(&sync_obj, false); 3069 3070 /* The old eviction fence may be unsignaled if restore happens 3071 * after a GPU reset or suspend/resume. Keep the old fence in that 3072 * case. Otherwise release the old eviction fence and create new 3073 * one, because fence only goes from unsignaled to signaled once 3074 * and cannot be reused. Use context and mm from the old fence. 3075 * 3076 * If an old eviction fence signals after this check, that's OK. 3077 * Anyone signaling an eviction fence must stop the queues first 3078 * and schedule another restore worker. 3079 */ 3080 if (dma_fence_is_signaled(&process_info->eviction_fence->base)) { 3081 struct amdgpu_amdkfd_fence *new_fence = 3082 amdgpu_amdkfd_fence_create( 3083 process_info->eviction_fence->base.context, 3084 process_info->eviction_fence->mm, 3085 NULL, process_info->context_id); 3086 3087 if (!new_fence) { 3088 pr_err("Failed to create eviction fence\n"); 3089 ret = -ENOMEM; 3090 goto validate_map_fail; 3091 } 3092 dma_fence_put(&process_info->eviction_fence->base); 3093 process_info->eviction_fence = new_fence; 3094 replace_eviction_fence(ef, dma_fence_get(&new_fence->base)); 3095 } else { 3096 WARN_ONCE(*ef != &process_info->eviction_fence->base, 3097 "KFD eviction fence doesn't match KGD process_info"); 3098 } 3099 3100 /* Attach new eviction fence to all BOs except pinned ones */ 3101 list_for_each_entry(mem, &process_info->kfd_bo_list, validate_list) { 3102 if (mem->bo->tbo.pin_count) 3103 continue; 3104 3105 dma_resv_add_fence(mem->bo->tbo.base.resv, 3106 &process_info->eviction_fence->base, 3107 DMA_RESV_USAGE_BOOKKEEP); 3108 } 3109 /* Attach eviction fence to PD / PT BOs and DMABuf imports */ 3110 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3111 vm_list_node) { 3112 struct amdgpu_bo *bo = peer_vm->root.bo; 3113 3114 dma_resv_add_fence(bo->tbo.base.resv, 3115 &process_info->eviction_fence->base, 3116 DMA_RESV_USAGE_BOOKKEEP); 3117 } 3118 3119 validate_map_fail: 3120 amdgpu_sync_free(&sync_obj); 3121 ttm_reserve_fail: 3122 drm_exec_fini(&exec); 3123 mutex_unlock(&process_info->lock); 3124 return ret; 3125 } 3126 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström 2026-03-31 9:46 ` Christian König 2026-03-31 21:46 ` kernel test robot @ 2026-03-31 22:07 ` kernel test robot 2026-04-01 0:38 ` kernel test robot 3 siblings, 0 replies; 25+ messages in thread From: kernel test robot @ 2026-03-31 22:07 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: oe-kbuild-all, Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Hi Thomas, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on next-20260330] [cannot apply to drm-xe/drm-xe-next linus/master v7.0-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Hellstr-m/drm-exec-Remove-the-index-parameter-from-drm_exec_for_each_locked_obj-_reverse/20260331-220349 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260331092023.81616-6-thomas.hellstrom%40linux.intel.com patch subject: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket config: riscv-randconfig-r073-20260401 (https://download.01.org/0day-ci/archive/20260401/202604010642.6F4lO2Gd-lkp@intel.com/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 2cd67b8b69f78e3f95918204320c3075a74ba16c) smatch: v0.5.0-9004-gb810ac53 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604010642.6F4lO2Gd-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202604010642.6F4lO2Gd-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3001:59: error: passing 'struct drm_exec' to parameter of incompatible type 'struct drm_exec *'; take the address with & 3001 | ret = process_validate_vms(process_info, drm_exec_ticket(exec)); | ^~~~ | & include/drm/drm_exec.h:154:71: note: passing argument to parameter 'exec' here 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ^ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3042:63: error: passing 'struct drm_exec' to parameter of incompatible type 'struct drm_exec *'; take the address with & 3042 | ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); | ^~~~ | & include/drm/drm_exec.h:154:71: note: passing argument to parameter 'exec' here 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ^ 2 errors generated. vim +3001 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2897 2898 /** amdgpu_amdkfd_gpuvm_restore_process_bos - Restore all BOs for the given 2899 * KFD process identified by process_info 2900 * 2901 * @process_info: amdkfd_process_info of the KFD process 2902 * 2903 * After memory eviction, restore thread calls this function. The function 2904 * should be called when the Process is still valid. BO restore involves - 2905 * 2906 * 1. Release old eviction fence and create new one 2907 * 2. Get two copies of PD BO list from all the VMs. Keep one copy as pd_list. 2908 * 3 Use the second PD list and kfd_bo_list to create a list (ctx.list) of 2909 * BOs that need to be reserved. 2910 * 4. Reserve all the BOs 2911 * 5. Validate of PD and PT BOs. 2912 * 6. Validate all KFD BOs using kfd_bo_list and Map them and add new fence 2913 * 7. Add fence to all PD and PT BOs. 2914 * 8. Unreserve all BOs 2915 */ 2916 int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu **ef) 2917 { 2918 struct amdkfd_process_info *process_info = info; 2919 struct amdgpu_vm *peer_vm; 2920 struct kgd_mem *mem; 2921 struct list_head duplicate_save; 2922 struct amdgpu_sync sync_obj; 2923 unsigned long failed_size = 0; 2924 unsigned long total_size = 0; 2925 struct drm_exec exec; 2926 int ret; 2927 2928 INIT_LIST_HEAD(&duplicate_save); 2929 2930 mutex_lock(&process_info->lock); 2931 2932 drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0); 2933 drm_exec_until_all_locked(&exec) { 2934 list_for_each_entry(peer_vm, &process_info->vm_list_head, 2935 vm_list_node) { 2936 ret = amdgpu_vm_lock_pd(peer_vm, &exec, 2); 2937 drm_exec_retry_on_contention(&exec); 2938 if (unlikely(ret)) { 2939 pr_err("Locking VM PD failed, ret: %d\n", ret); 2940 goto ttm_reserve_fail; 2941 } 2942 } 2943 2944 /* Reserve all BOs and page tables/directory. Add all BOs from 2945 * kfd_bo_list to ctx.list 2946 */ 2947 list_for_each_entry(mem, &process_info->kfd_bo_list, 2948 validate_list) { 2949 struct drm_gem_object *gobj; 2950 2951 gobj = &mem->bo->tbo.base; 2952 ret = drm_exec_prepare_obj(&exec, gobj, 1); 2953 drm_exec_retry_on_contention(&exec); 2954 if (unlikely(ret)) { 2955 pr_err("drm_exec_prepare_obj failed, ret: %d\n", ret); 2956 goto ttm_reserve_fail; 2957 } 2958 } 2959 } 2960 2961 amdgpu_sync_create(&sync_obj); 2962 2963 /* Validate BOs managed by KFD */ 2964 list_for_each_entry(mem, &process_info->kfd_bo_list, 2965 validate_list) { 2966 2967 struct amdgpu_bo *bo = mem->bo; 2968 uint32_t domain = mem->domain; 2969 struct dma_resv_iter cursor; 2970 struct dma_fence *fence; 2971 2972 total_size += amdgpu_bo_size(bo); 2973 2974 ret = amdgpu_amdkfd_bo_validate(bo, domain, false); 2975 if (ret) { 2976 pr_debug("Memory eviction: Validate BOs failed\n"); 2977 failed_size += amdgpu_bo_size(bo); 2978 ret = amdgpu_amdkfd_bo_validate(bo, 2979 AMDGPU_GEM_DOMAIN_GTT, false); 2980 if (ret) { 2981 pr_debug("Memory eviction: Try again\n"); 2982 goto validate_map_fail; 2983 } 2984 } 2985 dma_resv_for_each_fence(&cursor, bo->tbo.base.resv, 2986 DMA_RESV_USAGE_KERNEL, fence) { 2987 ret = amdgpu_sync_fence(&sync_obj, fence, GFP_KERNEL); 2988 if (ret) { 2989 pr_debug("Memory eviction: Sync BO fence failed. Try again\n"); 2990 goto validate_map_fail; 2991 } 2992 } 2993 } 2994 2995 if (failed_size) 2996 pr_debug("0x%lx/0x%lx in system\n", failed_size, total_size); 2997 2998 /* Validate PDs, PTs and evicted DMABuf imports last. Otherwise BO 2999 * validations above would invalidate DMABuf imports again. 3000 */ > 3001 ret = process_validate_vms(process_info, drm_exec_ticket(exec)); 3002 if (ret) { 3003 pr_debug("Validating VMs failed, ret: %d\n", ret); 3004 goto validate_map_fail; 3005 } 3006 3007 /* Update mappings managed by KFD. */ 3008 list_for_each_entry(mem, &process_info->kfd_bo_list, 3009 validate_list) { 3010 struct kfd_mem_attachment *attachment; 3011 3012 list_for_each_entry(attachment, &mem->attachments, list) { 3013 if (!attachment->is_mapped) 3014 continue; 3015 3016 kfd_mem_dmaunmap_attachment(mem, attachment); 3017 ret = update_gpuvm_pte(mem, attachment, &sync_obj); 3018 if (ret) { 3019 pr_debug("Memory eviction: update PTE failed. Try again\n"); 3020 goto validate_map_fail; 3021 } 3022 } 3023 } 3024 3025 /* Update mappings not managed by KFD */ 3026 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3027 vm_list_node) { 3028 struct amdgpu_device *adev = amdgpu_ttm_adev( 3029 peer_vm->root.bo->tbo.bdev); 3030 3031 struct amdgpu_fpriv *fpriv = 3032 container_of(peer_vm, struct amdgpu_fpriv, vm); 3033 3034 ret = amdgpu_vm_bo_update(adev, fpriv->prt_va, false); 3035 if (ret) { 3036 dev_dbg(adev->dev, 3037 "Memory eviction: handle PRT moved failed, pid %8d. Try again.\n", 3038 pid_nr(process_info->pid)); 3039 goto validate_map_fail; 3040 } 3041 3042 ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); 3043 if (ret) { 3044 dev_dbg(adev->dev, 3045 "Memory eviction: handle moved failed, pid %8d. Try again.\n", 3046 pid_nr(process_info->pid)); 3047 goto validate_map_fail; 3048 } 3049 } 3050 3051 /* Update page directories */ 3052 ret = process_update_pds(process_info, &sync_obj); 3053 if (ret) { 3054 pr_debug("Memory eviction: update PDs failed. Try again\n"); 3055 goto validate_map_fail; 3056 } 3057 3058 /* Sync with fences on all the page tables. They implicitly depend on any 3059 * move fences from amdgpu_vm_handle_moved above. 3060 */ 3061 ret = process_sync_pds_resv(process_info, &sync_obj); 3062 if (ret) { 3063 pr_debug("Memory eviction: Failed to sync to PD BO moving fence. Try again\n"); 3064 goto validate_map_fail; 3065 } 3066 3067 /* Wait for validate and PT updates to finish */ 3068 amdgpu_sync_wait(&sync_obj, false); 3069 3070 /* The old eviction fence may be unsignaled if restore happens 3071 * after a GPU reset or suspend/resume. Keep the old fence in that 3072 * case. Otherwise release the old eviction fence and create new 3073 * one, because fence only goes from unsignaled to signaled once 3074 * and cannot be reused. Use context and mm from the old fence. 3075 * 3076 * If an old eviction fence signals after this check, that's OK. 3077 * Anyone signaling an eviction fence must stop the queues first 3078 * and schedule another restore worker. 3079 */ 3080 if (dma_fence_is_signaled(&process_info->eviction_fence->base)) { 3081 struct amdgpu_amdkfd_fence *new_fence = 3082 amdgpu_amdkfd_fence_create( 3083 process_info->eviction_fence->base.context, 3084 process_info->eviction_fence->mm, 3085 NULL, process_info->context_id); 3086 3087 if (!new_fence) { 3088 pr_err("Failed to create eviction fence\n"); 3089 ret = -ENOMEM; 3090 goto validate_map_fail; 3091 } 3092 dma_fence_put(&process_info->eviction_fence->base); 3093 process_info->eviction_fence = new_fence; 3094 replace_eviction_fence(ef, dma_fence_get(&new_fence->base)); 3095 } else { 3096 WARN_ONCE(*ef != &process_info->eviction_fence->base, 3097 "KFD eviction fence doesn't match KGD process_info"); 3098 } 3099 3100 /* Attach new eviction fence to all BOs except pinned ones */ 3101 list_for_each_entry(mem, &process_info->kfd_bo_list, validate_list) { 3102 if (mem->bo->tbo.pin_count) 3103 continue; 3104 3105 dma_resv_add_fence(mem->bo->tbo.base.resv, 3106 &process_info->eviction_fence->base, 3107 DMA_RESV_USAGE_BOOKKEEP); 3108 } 3109 /* Attach eviction fence to PD / PT BOs and DMABuf imports */ 3110 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3111 vm_list_node) { 3112 struct amdgpu_bo *bo = peer_vm->root.bo; 3113 3114 dma_resv_add_fence(bo->tbo.base.resv, 3115 &process_info->eviction_fence->base, 3116 DMA_RESV_USAGE_BOOKKEEP); 3117 } 3118 3119 validate_map_fail: 3120 amdgpu_sync_free(&sync_obj); 3121 ttm_reserve_fail: 3122 drm_exec_fini(&exec); 3123 mutex_unlock(&process_info->lock); 3124 return ret; 3125 } 3126 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström ` (2 preceding siblings ...) 2026-03-31 22:07 ` kernel test robot @ 2026-04-01 0:38 ` kernel test robot 3 siblings, 0 replies; 25+ messages in thread From: kernel test robot @ 2026-04-01 0:38 UTC (permalink / raw) To: Thomas Hellström, intel-xe Cc: oe-kbuild-all, Thomas Hellström, Felix Kuehling, Alex Deucher, Christian König, David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Danilo Krummrich, Matthew Brost, Alice Ryhl, Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten, amd-gfx, dri-devel, linux-arm-msm, freedreno Hi Thomas, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on next-20260330] [cannot apply to drm-xe/drm-xe-next linus/master v7.0-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Hellstr-m/drm-exec-Remove-the-index-parameter-from-drm_exec_for_each_locked_obj-_reverse/20260331-220349 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20260331092023.81616-6-thomas.hellstrom%40linux.intel.com patch subject: [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260401/202604010859.7LmkFoJx-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604010859.7LmkFoJx-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202604010859.7LmkFoJx-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function 'amdgpu_amdkfd_gpuvm_restore_process_bos': >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3001:66: error: incompatible type for argument 1 of 'drm_exec_ticket' 3001 | ret = process_validate_vms(process_info, drm_exec_ticket(exec)); | ^~~~ | | | struct drm_exec In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:30: include/drm/drm_exec.h:154:71: note: expected 'struct drm_exec *' but argument is of type 'struct drm_exec' 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ~~~~~~~~~~~~~~~~~^~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:3042:77: error: incompatible type for argument 1 of 'drm_exec_ticket' 3042 | ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); | ^~~~ | | | struct drm_exec include/drm/drm_exec.h:154:71: note: expected 'struct drm_exec *' but argument is of type 'struct drm_exec' 154 | static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) | ~~~~~~~~~~~~~~~~~^~~~ vim +/drm_exec_ticket +3001 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2897 2898 /** amdgpu_amdkfd_gpuvm_restore_process_bos - Restore all BOs for the given 2899 * KFD process identified by process_info 2900 * 2901 * @process_info: amdkfd_process_info of the KFD process 2902 * 2903 * After memory eviction, restore thread calls this function. The function 2904 * should be called when the Process is still valid. BO restore involves - 2905 * 2906 * 1. Release old eviction fence and create new one 2907 * 2. Get two copies of PD BO list from all the VMs. Keep one copy as pd_list. 2908 * 3 Use the second PD list and kfd_bo_list to create a list (ctx.list) of 2909 * BOs that need to be reserved. 2910 * 4. Reserve all the BOs 2911 * 5. Validate of PD and PT BOs. 2912 * 6. Validate all KFD BOs using kfd_bo_list and Map them and add new fence 2913 * 7. Add fence to all PD and PT BOs. 2914 * 8. Unreserve all BOs 2915 */ 2916 int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu **ef) 2917 { 2918 struct amdkfd_process_info *process_info = info; 2919 struct amdgpu_vm *peer_vm; 2920 struct kgd_mem *mem; 2921 struct list_head duplicate_save; 2922 struct amdgpu_sync sync_obj; 2923 unsigned long failed_size = 0; 2924 unsigned long total_size = 0; 2925 struct drm_exec exec; 2926 int ret; 2927 2928 INIT_LIST_HEAD(&duplicate_save); 2929 2930 mutex_lock(&process_info->lock); 2931 2932 drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0); 2933 drm_exec_until_all_locked(&exec) { 2934 list_for_each_entry(peer_vm, &process_info->vm_list_head, 2935 vm_list_node) { 2936 ret = amdgpu_vm_lock_pd(peer_vm, &exec, 2); 2937 drm_exec_retry_on_contention(&exec); 2938 if (unlikely(ret)) { 2939 pr_err("Locking VM PD failed, ret: %d\n", ret); 2940 goto ttm_reserve_fail; 2941 } 2942 } 2943 2944 /* Reserve all BOs and page tables/directory. Add all BOs from 2945 * kfd_bo_list to ctx.list 2946 */ 2947 list_for_each_entry(mem, &process_info->kfd_bo_list, 2948 validate_list) { 2949 struct drm_gem_object *gobj; 2950 2951 gobj = &mem->bo->tbo.base; 2952 ret = drm_exec_prepare_obj(&exec, gobj, 1); 2953 drm_exec_retry_on_contention(&exec); 2954 if (unlikely(ret)) { 2955 pr_err("drm_exec_prepare_obj failed, ret: %d\n", ret); 2956 goto ttm_reserve_fail; 2957 } 2958 } 2959 } 2960 2961 amdgpu_sync_create(&sync_obj); 2962 2963 /* Validate BOs managed by KFD */ 2964 list_for_each_entry(mem, &process_info->kfd_bo_list, 2965 validate_list) { 2966 2967 struct amdgpu_bo *bo = mem->bo; 2968 uint32_t domain = mem->domain; 2969 struct dma_resv_iter cursor; 2970 struct dma_fence *fence; 2971 2972 total_size += amdgpu_bo_size(bo); 2973 2974 ret = amdgpu_amdkfd_bo_validate(bo, domain, false); 2975 if (ret) { 2976 pr_debug("Memory eviction: Validate BOs failed\n"); 2977 failed_size += amdgpu_bo_size(bo); 2978 ret = amdgpu_amdkfd_bo_validate(bo, 2979 AMDGPU_GEM_DOMAIN_GTT, false); 2980 if (ret) { 2981 pr_debug("Memory eviction: Try again\n"); 2982 goto validate_map_fail; 2983 } 2984 } 2985 dma_resv_for_each_fence(&cursor, bo->tbo.base.resv, 2986 DMA_RESV_USAGE_KERNEL, fence) { 2987 ret = amdgpu_sync_fence(&sync_obj, fence, GFP_KERNEL); 2988 if (ret) { 2989 pr_debug("Memory eviction: Sync BO fence failed. Try again\n"); 2990 goto validate_map_fail; 2991 } 2992 } 2993 } 2994 2995 if (failed_size) 2996 pr_debug("0x%lx/0x%lx in system\n", failed_size, total_size); 2997 2998 /* Validate PDs, PTs and evicted DMABuf imports last. Otherwise BO 2999 * validations above would invalidate DMABuf imports again. 3000 */ > 3001 ret = process_validate_vms(process_info, drm_exec_ticket(exec)); 3002 if (ret) { 3003 pr_debug("Validating VMs failed, ret: %d\n", ret); 3004 goto validate_map_fail; 3005 } 3006 3007 /* Update mappings managed by KFD. */ 3008 list_for_each_entry(mem, &process_info->kfd_bo_list, 3009 validate_list) { 3010 struct kfd_mem_attachment *attachment; 3011 3012 list_for_each_entry(attachment, &mem->attachments, list) { 3013 if (!attachment->is_mapped) 3014 continue; 3015 3016 kfd_mem_dmaunmap_attachment(mem, attachment); 3017 ret = update_gpuvm_pte(mem, attachment, &sync_obj); 3018 if (ret) { 3019 pr_debug("Memory eviction: update PTE failed. Try again\n"); 3020 goto validate_map_fail; 3021 } 3022 } 3023 } 3024 3025 /* Update mappings not managed by KFD */ 3026 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3027 vm_list_node) { 3028 struct amdgpu_device *adev = amdgpu_ttm_adev( 3029 peer_vm->root.bo->tbo.bdev); 3030 3031 struct amdgpu_fpriv *fpriv = 3032 container_of(peer_vm, struct amdgpu_fpriv, vm); 3033 3034 ret = amdgpu_vm_bo_update(adev, fpriv->prt_va, false); 3035 if (ret) { 3036 dev_dbg(adev->dev, 3037 "Memory eviction: handle PRT moved failed, pid %8d. Try again.\n", 3038 pid_nr(process_info->pid)); 3039 goto validate_map_fail; 3040 } 3041 3042 ret = amdgpu_vm_handle_moved(adev, peer_vm, drm_exec_ticket(exec)); 3043 if (ret) { 3044 dev_dbg(adev->dev, 3045 "Memory eviction: handle moved failed, pid %8d. Try again.\n", 3046 pid_nr(process_info->pid)); 3047 goto validate_map_fail; 3048 } 3049 } 3050 3051 /* Update page directories */ 3052 ret = process_update_pds(process_info, &sync_obj); 3053 if (ret) { 3054 pr_debug("Memory eviction: update PDs failed. Try again\n"); 3055 goto validate_map_fail; 3056 } 3057 3058 /* Sync with fences on all the page tables. They implicitly depend on any 3059 * move fences from amdgpu_vm_handle_moved above. 3060 */ 3061 ret = process_sync_pds_resv(process_info, &sync_obj); 3062 if (ret) { 3063 pr_debug("Memory eviction: Failed to sync to PD BO moving fence. Try again\n"); 3064 goto validate_map_fail; 3065 } 3066 3067 /* Wait for validate and PT updates to finish */ 3068 amdgpu_sync_wait(&sync_obj, false); 3069 3070 /* The old eviction fence may be unsignaled if restore happens 3071 * after a GPU reset or suspend/resume. Keep the old fence in that 3072 * case. Otherwise release the old eviction fence and create new 3073 * one, because fence only goes from unsignaled to signaled once 3074 * and cannot be reused. Use context and mm from the old fence. 3075 * 3076 * If an old eviction fence signals after this check, that's OK. 3077 * Anyone signaling an eviction fence must stop the queues first 3078 * and schedule another restore worker. 3079 */ 3080 if (dma_fence_is_signaled(&process_info->eviction_fence->base)) { 3081 struct amdgpu_amdkfd_fence *new_fence = 3082 amdgpu_amdkfd_fence_create( 3083 process_info->eviction_fence->base.context, 3084 process_info->eviction_fence->mm, 3085 NULL, process_info->context_id); 3086 3087 if (!new_fence) { 3088 pr_err("Failed to create eviction fence\n"); 3089 ret = -ENOMEM; 3090 goto validate_map_fail; 3091 } 3092 dma_fence_put(&process_info->eviction_fence->base); 3093 process_info->eviction_fence = new_fence; 3094 replace_eviction_fence(ef, dma_fence_get(&new_fence->base)); 3095 } else { 3096 WARN_ONCE(*ef != &process_info->eviction_fence->base, 3097 "KFD eviction fence doesn't match KGD process_info"); 3098 } 3099 3100 /* Attach new eviction fence to all BOs except pinned ones */ 3101 list_for_each_entry(mem, &process_info->kfd_bo_list, validate_list) { 3102 if (mem->bo->tbo.pin_count) 3103 continue; 3104 3105 dma_resv_add_fence(mem->bo->tbo.base.resv, 3106 &process_info->eviction_fence->base, 3107 DMA_RESV_USAGE_BOOKKEEP); 3108 } 3109 /* Attach eviction fence to PD / PT BOs and DMABuf imports */ 3110 list_for_each_entry(peer_vm, &process_info->vm_list_head, 3111 vm_list_node) { 3112 struct amdgpu_bo *bo = peer_vm->root.bo; 3113 3114 dma_resv_add_fence(bo->tbo.base.resv, 3115 &process_info->eviction_fence->base, 3116 DMA_RESV_USAGE_BOOKKEEP); 3117 } 3118 3119 validate_map_fail: 3120 amdgpu_sync_free(&sync_obj); 3121 ttm_reserve_fail: 3122 drm_exec_fini(&exec); 3123 mutex_unlock(&process_info->lock); 3124 return ret; 3125 } 3126 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 25+ messages in thread
* ✗ CI.checkpatch: warning for drm/exec: drm_exec polishing 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström ` (4 preceding siblings ...) 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström @ 2026-03-31 9:49 ` Patchwork 2026-03-31 9:51 ` ✓ CI.KUnit: success " Patchwork 6 siblings, 0 replies; 25+ messages in thread From: Patchwork @ 2026-03-31 9:49 UTC (permalink / raw) To: Thomas Hellström; +Cc: intel-xe == Series Details == Series: drm/exec: drm_exec polishing URL : https://patchwork.freedesktop.org/series/164149/ State : warning == Summary == + KERNEL=/kernel + git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'... warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/ + git -C mt rev-list -n1 origin/master 1f57ba1afceae32108bd24770069f764d940a0e4 + cd /kernel + git config --global --add safe.directory /kernel + git log -n1 commit 4978388be3a8ccb6c16f6764f741cd9e4d95fa21 Author: Thomas Hellström <thomas.hellstrom@linux.intel.com> Date: Tue Mar 31 11:20:23 2026 +0200 drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Drivers were accessing this drm_exec member directly. Provide an accessor, drm_exec_ticket() to avoid that. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> + /mt/dim checkpatch e15bf8dd9e5cd3aa1352b5b9a16eeffd3b1b193d drm-intel d8a655eae98f drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] -:14: WARNING:BAD_SIGN_OFF: Non-standard signature: Assisted-by: #14: Assisted-by: GitHub Copilot:claude-sonnet-4.6 -:14: ERROR:BAD_SIGN_OFF: Unrecognized email address: 'GitHub Copilot:claude-sonnet-4.6' #14: Assisted-by: GitHub Copilot:claude-sonnet-4.6 -:194: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'exec' - possible side-effects? #194: FILE: include/drm/drm_exec.h:88: +#define drm_exec_for_each_locked_object_reverse(exec, obj) \ + for (unsigned long _index = (exec)->num_objects - 1; \ + ((obj) = drm_exec_obj(exec, _index)); --_index) total: 1 errors, 1 warnings, 1 checks, 144 lines checked 4b95193a06e8 drm/msm: Remove abuse of drm_exec internals -:18: WARNING:BAD_SIGN_OFF: Duplicate signature #18: Acked-by: Christian König <christian.koenig@amd.com> total: 0 errors, 1 warnings, 0 checks, 29 lines checked 1ecb9d0cbf63 drm/exec: Make the drm_exec_until_all_locked() macro more readable -:32: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #32: FILE: include/drm/drm_exec.h:98: +#define __drm_exec_until_all_locked(exec, _label) \ +_label: \ + for (void * __maybe_unused __drm_exec_retry_ptr; ({ \ + __drm_exec_retry_ptr = &&_label; \ + drm_exec_cleanup(exec); \ + });) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. -:32: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_label' - possible side-effects? #32: FILE: include/drm/drm_exec.h:98: +#define __drm_exec_until_all_locked(exec, _label) \ +_label: \ + for (void * __maybe_unused __drm_exec_retry_ptr; ({ \ + __drm_exec_retry_ptr = &&_label; \ + drm_exec_cleanup(exec); \ + });) -:33: ERROR:SPACING: spaces required around that ':' (ctx:VxE) #33: FILE: include/drm/drm_exec.h:99: +_label: \ ^ total: 2 errors, 0 warnings, 1 checks, 37 lines checked ed0cf2d32bd7 drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer -:51: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #51: FILE: include/drm/drm_exec.h:148: +#define drm_exec_retry(_exec) \ + do { \ + WARN_ON(!drm_exec_is_contended(_exec)); \ + goto *__drm_exec_retry_ptr; \ + } while (0) total: 0 errors, 1 warnings, 0 checks, 27 lines checked 4978388be3a8 drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket ^ permalink raw reply [flat|nested] 25+ messages in thread
* ✓ CI.KUnit: success for drm/exec: drm_exec polishing 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström ` (5 preceding siblings ...) 2026-03-31 9:49 ` ✗ CI.checkpatch: warning for drm/exec: drm_exec polishing Patchwork @ 2026-03-31 9:51 ` Patchwork 6 siblings, 0 replies; 25+ messages in thread From: Patchwork @ 2026-03-31 9:51 UTC (permalink / raw) To: Thomas Hellström; +Cc: intel-xe == Series Details == Series: drm/exec: drm_exec polishing URL : https://patchwork.freedesktop.org/series/164149/ State : success == Summary == + trap cleanup EXIT + /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [09:49:57] Configuring KUnit Kernel ... Generating .config ... Populating config with: $ make ARCH=um O=.kunit olddefconfig [09:50:01] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [09:50:33] Starting KUnit Kernel (1/1)... [09:50:33] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [09:50:33] ================== guc_buf (11 subtests) =================== [09:50:33] [PASSED] test_smallest [09:50:33] [PASSED] test_largest [09:50:33] [PASSED] test_granular [09:50:33] [PASSED] test_unique [09:50:33] [PASSED] test_overlap [09:50:33] [PASSED] test_reusable [09:50:33] [PASSED] test_too_big [09:50:33] [PASSED] test_flush [09:50:33] [PASSED] test_lookup [09:50:33] [PASSED] test_data [09:50:33] [PASSED] test_class [09:50:33] ===================== [PASSED] guc_buf ===================== [09:50:33] =================== guc_dbm (7 subtests) =================== [09:50:33] [PASSED] test_empty [09:50:33] [PASSED] test_default [09:50:33] ======================== test_size ======================== [09:50:33] [PASSED] 4 [09:50:33] [PASSED] 8 [09:50:33] [PASSED] 32 [09:50:33] [PASSED] 256 [09:50:33] ==================== [PASSED] test_size ==================== [09:50:33] ======================= test_reuse ======================== [09:50:33] [PASSED] 4 [09:50:33] [PASSED] 8 [09:50:33] [PASSED] 32 [09:50:33] [PASSED] 256 [09:50:33] =================== [PASSED] test_reuse ==================== [09:50:33] =================== test_range_overlap ==================== [09:50:33] [PASSED] 4 [09:50:33] [PASSED] 8 [09:50:33] [PASSED] 32 [09:50:33] [PASSED] 256 [09:50:33] =============== [PASSED] test_range_overlap ================ [09:50:33] =================== test_range_compact ==================== [09:50:33] [PASSED] 4 [09:50:33] [PASSED] 8 [09:50:33] [PASSED] 32 [09:50:33] [PASSED] 256 [09:50:33] =============== [PASSED] test_range_compact ================ [09:50:33] ==================== test_range_spare ===================== [09:50:33] [PASSED] 4 [09:50:33] [PASSED] 8 [09:50:33] [PASSED] 32 [09:50:33] [PASSED] 256 [09:50:33] ================ [PASSED] test_range_spare ================= [09:50:33] ===================== [PASSED] guc_dbm ===================== [09:50:33] =================== guc_idm (6 subtests) =================== [09:50:33] [PASSED] bad_init [09:50:33] [PASSED] no_init [09:50:33] [PASSED] init_fini [09:50:33] [PASSED] check_used [09:50:33] [PASSED] check_quota [09:50:33] [PASSED] check_all [09:50:33] ===================== [PASSED] guc_idm ===================== [09:50:33] ================== no_relay (3 subtests) =================== [09:50:33] [PASSED] xe_drops_guc2pf_if_not_ready [09:50:33] [PASSED] xe_drops_guc2vf_if_not_ready [09:50:33] [PASSED] xe_rejects_send_if_not_ready [09:50:33] ==================== [PASSED] no_relay ===================== [09:50:33] ================== pf_relay (14 subtests) ================== [09:50:33] [PASSED] pf_rejects_guc2pf_too_short [09:50:33] [PASSED] pf_rejects_guc2pf_too_long [09:50:33] [PASSED] pf_rejects_guc2pf_no_payload [09:50:33] [PASSED] pf_fails_no_payload [09:50:33] [PASSED] pf_fails_bad_origin [09:50:33] [PASSED] pf_fails_bad_type [09:50:33] [PASSED] pf_txn_reports_error [09:50:33] [PASSED] pf_txn_sends_pf2guc [09:50:33] [PASSED] pf_sends_pf2guc [09:50:33] [SKIPPED] pf_loopback_nop [09:50:33] [SKIPPED] pf_loopback_echo [09:50:33] [SKIPPED] pf_loopback_fail [09:50:33] [SKIPPED] pf_loopback_busy [09:50:33] [SKIPPED] pf_loopback_retry [09:50:33] ==================== [PASSED] pf_relay ===================== [09:50:33] ================== vf_relay (3 subtests) =================== [09:50:33] [PASSED] vf_rejects_guc2vf_too_short [09:50:33] [PASSED] vf_rejects_guc2vf_too_long [09:50:33] [PASSED] vf_rejects_guc2vf_no_payload [09:50:33] ==================== [PASSED] vf_relay ===================== [09:50:33] ================ pf_gt_config (9 subtests) ================= [09:50:33] [PASSED] fair_contexts_1vf [09:50:33] [PASSED] fair_doorbells_1vf [09:50:33] [PASSED] fair_ggtt_1vf [09:50:33] ====================== fair_vram_1vf ====================== [09:50:33] [PASSED] 3.50 GiB [09:50:33] [PASSED] 11.5 GiB [09:50:33] [PASSED] 15.5 GiB [09:50:33] [PASSED] 31.5 GiB [09:50:33] [PASSED] 63.5 GiB [09:50:33] [PASSED] 1.91 GiB [09:50:33] ================== [PASSED] fair_vram_1vf ================== [09:50:33] ================ fair_vram_1vf_admin_only ================= [09:50:33] [PASSED] 3.50 GiB [09:50:33] [PASSED] 11.5 GiB [09:50:33] [PASSED] 15.5 GiB [09:50:33] [PASSED] 31.5 GiB [09:50:33] [PASSED] 63.5 GiB [09:50:33] [PASSED] 1.91 GiB [09:50:33] ============ [PASSED] fair_vram_1vf_admin_only ============= [09:50:33] ====================== fair_contexts ====================== [09:50:33] [PASSED] 1 VF [09:50:33] [PASSED] 2 VFs [09:50:33] [PASSED] 3 VFs [09:50:33] [PASSED] 4 VFs [09:50:33] [PASSED] 5 VFs [09:50:33] [PASSED] 6 VFs [09:50:33] [PASSED] 7 VFs [09:50:33] [PASSED] 8 VFs [09:50:33] [PASSED] 9 VFs [09:50:33] [PASSED] 10 VFs [09:50:33] [PASSED] 11 VFs [09:50:33] [PASSED] 12 VFs [09:50:33] [PASSED] 13 VFs [09:50:33] [PASSED] 14 VFs [09:50:33] [PASSED] 15 VFs [09:50:33] [PASSED] 16 VFs [09:50:33] [PASSED] 17 VFs [09:50:33] [PASSED] 18 VFs [09:50:33] [PASSED] 19 VFs [09:50:33] [PASSED] 20 VFs [09:50:33] [PASSED] 21 VFs [09:50:33] [PASSED] 22 VFs [09:50:33] [PASSED] 23 VFs [09:50:33] [PASSED] 24 VFs [09:50:33] [PASSED] 25 VFs [09:50:33] [PASSED] 26 VFs [09:50:33] [PASSED] 27 VFs [09:50:33] [PASSED] 28 VFs [09:50:33] [PASSED] 29 VFs [09:50:33] [PASSED] 30 VFs [09:50:33] [PASSED] 31 VFs [09:50:33] [PASSED] 32 VFs [09:50:33] [PASSED] 33 VFs [09:50:33] [PASSED] 34 VFs [09:50:33] [PASSED] 35 VFs [09:50:33] [PASSED] 36 VFs [09:50:33] [PASSED] 37 VFs [09:50:33] [PASSED] 38 VFs [09:50:33] [PASSED] 39 VFs [09:50:33] [PASSED] 40 VFs [09:50:33] [PASSED] 41 VFs [09:50:33] [PASSED] 42 VFs [09:50:33] [PASSED] 43 VFs [09:50:33] [PASSED] 44 VFs [09:50:33] [PASSED] 45 VFs [09:50:33] [PASSED] 46 VFs [09:50:33] [PASSED] 47 VFs [09:50:33] [PASSED] 48 VFs [09:50:33] [PASSED] 49 VFs [09:50:33] [PASSED] 50 VFs [09:50:33] [PASSED] 51 VFs [09:50:33] [PASSED] 52 VFs [09:50:33] [PASSED] 53 VFs [09:50:33] [PASSED] 54 VFs [09:50:33] [PASSED] 55 VFs [09:50:33] [PASSED] 56 VFs [09:50:33] [PASSED] 57 VFs [09:50:33] [PASSED] 58 VFs [09:50:33] [PASSED] 59 VFs [09:50:33] [PASSED] 60 VFs [09:50:33] [PASSED] 61 VFs [09:50:33] [PASSED] 62 VFs [09:50:33] [PASSED] 63 VFs [09:50:33] ================== [PASSED] fair_contexts ================== [09:50:33] ===================== fair_doorbells ====================== [09:50:33] [PASSED] 1 VF [09:50:33] [PASSED] 2 VFs [09:50:33] [PASSED] 3 VFs [09:50:33] [PASSED] 4 VFs [09:50:33] [PASSED] 5 VFs [09:50:33] [PASSED] 6 VFs [09:50:33] [PASSED] 7 VFs [09:50:33] [PASSED] 8 VFs [09:50:33] [PASSED] 9 VFs [09:50:33] [PASSED] 10 VFs [09:50:33] [PASSED] 11 VFs [09:50:33] [PASSED] 12 VFs [09:50:33] [PASSED] 13 VFs [09:50:33] [PASSED] 14 VFs [09:50:33] [PASSED] 15 VFs [09:50:33] [PASSED] 16 VFs [09:50:33] [PASSED] 17 VFs [09:50:33] [PASSED] 18 VFs [09:50:33] [PASSED] 19 VFs [09:50:33] [PASSED] 20 VFs [09:50:33] [PASSED] 21 VFs [09:50:33] [PASSED] 22 VFs [09:50:33] [PASSED] 23 VFs [09:50:33] [PASSED] 24 VFs [09:50:33] [PASSED] 25 VFs [09:50:33] [PASSED] 26 VFs [09:50:33] [PASSED] 27 VFs [09:50:33] [PASSED] 28 VFs [09:50:33] [PASSED] 29 VFs [09:50:33] [PASSED] 30 VFs [09:50:33] [PASSED] 31 VFs [09:50:33] [PASSED] 32 VFs [09:50:33] [PASSED] 33 VFs [09:50:33] [PASSED] 34 VFs [09:50:33] [PASSED] 35 VFs [09:50:33] [PASSED] 36 VFs [09:50:33] [PASSED] 37 VFs [09:50:33] [PASSED] 38 VFs [09:50:33] [PASSED] 39 VFs [09:50:33] [PASSED] 40 VFs [09:50:33] [PASSED] 41 VFs [09:50:33] [PASSED] 42 VFs [09:50:33] [PASSED] 43 VFs [09:50:33] [PASSED] 44 VFs [09:50:33] [PASSED] 45 VFs [09:50:33] [PASSED] 46 VFs [09:50:33] [PASSED] 47 VFs [09:50:33] [PASSED] 48 VFs [09:50:33] [PASSED] 49 VFs [09:50:33] [PASSED] 50 VFs [09:50:33] [PASSED] 51 VFs [09:50:33] [PASSED] 52 VFs [09:50:33] [PASSED] 53 VFs [09:50:33] [PASSED] 54 VFs [09:50:33] [PASSED] 55 VFs [09:50:33] [PASSED] 56 VFs [09:50:33] [PASSED] 57 VFs [09:50:33] [PASSED] 58 VFs [09:50:33] [PASSED] 59 VFs [09:50:33] [PASSED] 60 VFs [09:50:33] [PASSED] 61 VFs [09:50:33] [PASSED] 62 VFs [09:50:33] [PASSED] 63 VFs [09:50:33] ================= [PASSED] fair_doorbells ================== [09:50:33] ======================== fair_ggtt ======================== [09:50:33] [PASSED] 1 VF [09:50:33] [PASSED] 2 VFs [09:50:33] [PASSED] 3 VFs [09:50:33] [PASSED] 4 VFs [09:50:33] [PASSED] 5 VFs [09:50:33] [PASSED] 6 VFs [09:50:33] [PASSED] 7 VFs [09:50:33] [PASSED] 8 VFs [09:50:33] [PASSED] 9 VFs [09:50:33] [PASSED] 10 VFs [09:50:33] [PASSED] 11 VFs [09:50:33] [PASSED] 12 VFs [09:50:33] [PASSED] 13 VFs [09:50:33] [PASSED] 14 VFs [09:50:33] [PASSED] 15 VFs [09:50:33] [PASSED] 16 VFs [09:50:33] [PASSED] 17 VFs [09:50:33] [PASSED] 18 VFs [09:50:33] [PASSED] 19 VFs [09:50:33] [PASSED] 20 VFs [09:50:33] [PASSED] 21 VFs [09:50:33] [PASSED] 22 VFs [09:50:33] [PASSED] 23 VFs [09:50:33] [PASSED] 24 VFs [09:50:33] [PASSED] 25 VFs [09:50:33] [PASSED] 26 VFs [09:50:33] [PASSED] 27 VFs [09:50:33] [PASSED] 28 VFs [09:50:33] [PASSED] 29 VFs [09:50:33] [PASSED] 30 VFs [09:50:33] [PASSED] 31 VFs [09:50:33] [PASSED] 32 VFs [09:50:33] [PASSED] 33 VFs [09:50:33] [PASSED] 34 VFs [09:50:33] [PASSED] 35 VFs [09:50:33] [PASSED] 36 VFs [09:50:33] [PASSED] 37 VFs [09:50:33] [PASSED] 38 VFs [09:50:33] [PASSED] 39 VFs [09:50:33] [PASSED] 40 VFs [09:50:33] [PASSED] 41 VFs [09:50:33] [PASSED] 42 VFs [09:50:33] [PASSED] 43 VFs [09:50:33] [PASSED] 44 VFs [09:50:33] [PASSED] 45 VFs [09:50:33] [PASSED] 46 VFs [09:50:33] [PASSED] 47 VFs [09:50:33] [PASSED] 48 VFs [09:50:33] [PASSED] 49 VFs [09:50:33] [PASSED] 50 VFs [09:50:33] [PASSED] 51 VFs [09:50:33] [PASSED] 52 VFs [09:50:33] [PASSED] 53 VFs [09:50:33] [PASSED] 54 VFs [09:50:33] [PASSED] 55 VFs [09:50:33] [PASSED] 56 VFs [09:50:33] [PASSED] 57 VFs [09:50:33] [PASSED] 58 VFs [09:50:33] [PASSED] 59 VFs [09:50:33] [PASSED] 60 VFs [09:50:33] [PASSED] 61 VFs [09:50:33] [PASSED] 62 VFs [09:50:33] [PASSED] 63 VFs [09:50:33] ==================== [PASSED] fair_ggtt ==================== [09:50:33] ======================== fair_vram ======================== [09:50:33] [PASSED] 1 VF [09:50:33] [PASSED] 2 VFs [09:50:33] [PASSED] 3 VFs [09:50:33] [PASSED] 4 VFs [09:50:33] [PASSED] 5 VFs [09:50:33] [PASSED] 6 VFs [09:50:33] [PASSED] 7 VFs [09:50:33] [PASSED] 8 VFs [09:50:33] [PASSED] 9 VFs [09:50:33] [PASSED] 10 VFs [09:50:33] [PASSED] 11 VFs [09:50:33] [PASSED] 12 VFs [09:50:33] [PASSED] 13 VFs [09:50:33] [PASSED] 14 VFs [09:50:33] [PASSED] 15 VFs [09:50:33] [PASSED] 16 VFs [09:50:33] [PASSED] 17 VFs [09:50:33] [PASSED] 18 VFs [09:50:33] [PASSED] 19 VFs [09:50:33] [PASSED] 20 VFs [09:50:33] [PASSED] 21 VFs [09:50:33] [PASSED] 22 VFs [09:50:33] [PASSED] 23 VFs [09:50:33] [PASSED] 24 VFs [09:50:33] [PASSED] 25 VFs [09:50:33] [PASSED] 26 VFs [09:50:33] [PASSED] 27 VFs [09:50:33] [PASSED] 28 VFs [09:50:33] [PASSED] 29 VFs [09:50:33] [PASSED] 30 VFs [09:50:33] [PASSED] 31 VFs [09:50:33] [PASSED] 32 VFs [09:50:33] [PASSED] 33 VFs [09:50:33] [PASSED] 34 VFs [09:50:33] [PASSED] 35 VFs [09:50:33] [PASSED] 36 VFs [09:50:33] [PASSED] 37 VFs [09:50:33] [PASSED] 38 VFs [09:50:33] [PASSED] 39 VFs [09:50:33] [PASSED] 40 VFs [09:50:33] [PASSED] 41 VFs [09:50:33] [PASSED] 42 VFs [09:50:33] [PASSED] 43 VFs [09:50:33] [PASSED] 44 VFs [09:50:33] [PASSED] 45 VFs [09:50:33] [PASSED] 46 VFs [09:50:33] [PASSED] 47 VFs [09:50:33] [PASSED] 48 VFs [09:50:33] [PASSED] 49 VFs [09:50:33] [PASSED] 50 VFs [09:50:33] [PASSED] 51 VFs [09:50:33] [PASSED] 52 VFs [09:50:33] [PASSED] 53 VFs [09:50:33] [PASSED] 54 VFs [09:50:33] [PASSED] 55 VFs [09:50:33] [PASSED] 56 VFs [09:50:33] [PASSED] 57 VFs [09:50:33] [PASSED] 58 VFs [09:50:33] [PASSED] 59 VFs [09:50:33] [PASSED] 60 VFs [09:50:33] [PASSED] 61 VFs [09:50:33] [PASSED] 62 VFs [09:50:33] [PASSED] 63 VFs [09:50:33] ==================== [PASSED] fair_vram ==================== [09:50:33] ================== [PASSED] pf_gt_config =================== [09:50:33] ===================== lmtt (1 subtest) ===================== [09:50:33] ======================== test_ops ========================= [09:50:33] [PASSED] 2-level [09:50:33] [PASSED] multi-level [09:50:33] ==================== [PASSED] test_ops ===================== [09:50:33] ====================== [PASSED] lmtt ======================= [09:50:33] ================= pf_service (11 subtests) ================= [09:50:33] [PASSED] pf_negotiate_any [09:50:33] [PASSED] pf_negotiate_base_match [09:50:33] [PASSED] pf_negotiate_base_newer [09:50:33] [PASSED] pf_negotiate_base_next [09:50:33] [SKIPPED] pf_negotiate_base_older [09:50:33] [PASSED] pf_negotiate_base_prev [09:50:33] [PASSED] pf_negotiate_latest_match [09:50:33] [PASSED] pf_negotiate_latest_newer [09:50:33] [PASSED] pf_negotiate_latest_next [09:50:33] [SKIPPED] pf_negotiate_latest_older [09:50:33] [SKIPPED] pf_negotiate_latest_prev [09:50:33] =================== [PASSED] pf_service ==================== [09:50:33] ================= xe_guc_g2g (2 subtests) ================== [09:50:33] ============== xe_live_guc_g2g_kunit_default ============== [09:50:33] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [09:50:33] ============== xe_live_guc_g2g_kunit_allmem =============== [09:50:33] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [09:50:33] =================== [SKIPPED] xe_guc_g2g =================== [09:50:33] =================== xe_mocs (2 subtests) =================== [09:50:33] ================ xe_live_mocs_kernel_kunit ================ [09:50:33] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [09:50:33] ================ xe_live_mocs_reset_kunit ================= [09:50:33] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [09:50:33] ==================== [SKIPPED] xe_mocs ===================== [09:50:33] ================= xe_migrate (2 subtests) ================== [09:50:33] ================= xe_migrate_sanity_kunit ================= [09:50:33] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [09:50:33] ================== xe_validate_ccs_kunit ================== [09:50:33] ============= [SKIPPED] xe_validate_ccs_kunit ============== [09:50:33] =================== [SKIPPED] xe_migrate =================== [09:50:33] ================== xe_dma_buf (1 subtest) ================== [09:50:33] ==================== xe_dma_buf_kunit ===================== [09:50:33] ================ [SKIPPED] xe_dma_buf_kunit ================ [09:50:33] =================== [SKIPPED] xe_dma_buf =================== [09:50:33] ================= xe_bo_shrink (1 subtest) ================= [09:50:33] =================== xe_bo_shrink_kunit ==================== [09:50:33] =============== [SKIPPED] xe_bo_shrink_kunit =============== [09:50:33] ================== [SKIPPED] xe_bo_shrink ================== [09:50:33] ==================== xe_bo (2 subtests) ==================== [09:50:33] ================== xe_ccs_migrate_kunit =================== [09:50:33] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [09:50:33] ==================== xe_bo_evict_kunit ==================== [09:50:33] =============== [SKIPPED] xe_bo_evict_kunit ================ [09:50:33] ===================== [SKIPPED] xe_bo ====================== [09:50:33] ==================== args (13 subtests) ==================== [09:50:33] [PASSED] count_args_test [09:50:33] [PASSED] call_args_example [09:50:33] [PASSED] call_args_test [09:50:33] [PASSED] drop_first_arg_example [09:50:33] [PASSED] drop_first_arg_test [09:50:33] [PASSED] first_arg_example [09:50:33] [PASSED] first_arg_test [09:50:33] [PASSED] last_arg_example [09:50:33] [PASSED] last_arg_test [09:50:33] [PASSED] pick_arg_example [09:50:33] [PASSED] if_args_example [09:50:33] [PASSED] if_args_test [09:50:33] [PASSED] sep_comma_example [09:50:33] ====================== [PASSED] args ======================= [09:50:33] =================== xe_pci (3 subtests) ==================== [09:50:33] ==================== check_graphics_ip ==================== [09:50:33] [PASSED] 12.00 Xe_LP [09:50:33] [PASSED] 12.10 Xe_LP+ [09:50:33] [PASSED] 12.55 Xe_HPG [09:50:33] [PASSED] 12.60 Xe_HPC [09:50:33] [PASSED] 12.70 Xe_LPG [09:50:33] [PASSED] 12.71 Xe_LPG [09:50:33] [PASSED] 12.74 Xe_LPG+ [09:50:33] [PASSED] 20.01 Xe2_HPG [09:50:33] [PASSED] 20.02 Xe2_HPG [09:50:33] [PASSED] 20.04 Xe2_LPG [09:50:33] [PASSED] 30.00 Xe3_LPG [09:50:33] [PASSED] 30.01 Xe3_LPG [09:50:33] [PASSED] 30.03 Xe3_LPG [09:50:33] [PASSED] 30.04 Xe3_LPG [09:50:33] [PASSED] 30.05 Xe3_LPG [09:50:33] [PASSED] 35.10 Xe3p_LPG [09:50:33] [PASSED] 35.11 Xe3p_XPC [09:50:33] ================ [PASSED] check_graphics_ip ================ [09:50:33] ===================== check_media_ip ====================== [09:50:33] [PASSED] 12.00 Xe_M [09:50:33] [PASSED] 12.55 Xe_HPM [09:50:33] [PASSED] 13.00 Xe_LPM+ [09:50:33] [PASSED] 13.01 Xe2_HPM [09:50:33] [PASSED] 20.00 Xe2_LPM [09:50:33] [PASSED] 30.00 Xe3_LPM [09:50:33] [PASSED] 30.02 Xe3_LPM [09:50:33] [PASSED] 35.00 Xe3p_LPM [09:50:33] [PASSED] 35.03 Xe3p_HPM [09:50:33] ================= [PASSED] check_media_ip ================== [09:50:33] =================== check_platform_desc =================== [09:50:33] [PASSED] 0x9A60 (TIGERLAKE) [09:50:33] [PASSED] 0x9A68 (TIGERLAKE) [09:50:33] [PASSED] 0x9A70 (TIGERLAKE) [09:50:33] [PASSED] 0x9A40 (TIGERLAKE) [09:50:33] [PASSED] 0x9A49 (TIGERLAKE) [09:50:33] [PASSED] 0x9A59 (TIGERLAKE) [09:50:33] [PASSED] 0x9A78 (TIGERLAKE) [09:50:33] [PASSED] 0x9AC0 (TIGERLAKE) [09:50:33] [PASSED] 0x9AC9 (TIGERLAKE) [09:50:33] [PASSED] 0x9AD9 (TIGERLAKE) [09:50:33] [PASSED] 0x9AF8 (TIGERLAKE) [09:50:33] [PASSED] 0x4C80 (ROCKETLAKE) [09:50:33] [PASSED] 0x4C8A (ROCKETLAKE) [09:50:33] [PASSED] 0x4C8B (ROCKETLAKE) [09:50:33] [PASSED] 0x4C8C (ROCKETLAKE) [09:50:33] [PASSED] 0x4C90 (ROCKETLAKE) [09:50:33] [PASSED] 0x4C9A (ROCKETLAKE) [09:50:33] [PASSED] 0x4680 (ALDERLAKE_S) [09:50:33] [PASSED] 0x4682 (ALDERLAKE_S) [09:50:33] [PASSED] 0x4688 (ALDERLAKE_S) [09:50:33] [PASSED] 0x468A (ALDERLAKE_S) [09:50:33] [PASSED] 0x468B (ALDERLAKE_S) [09:50:33] [PASSED] 0x4690 (ALDERLAKE_S) [09:50:33] [PASSED] 0x4692 (ALDERLAKE_S) [09:50:33] [PASSED] 0x4693 (ALDERLAKE_S) [09:50:33] [PASSED] 0x46A0 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46A1 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46A2 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46A3 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46A6 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46A8 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46AA (ALDERLAKE_P) [09:50:33] [PASSED] 0x462A (ALDERLAKE_P) [09:50:33] [PASSED] 0x4626 (ALDERLAKE_P) [09:50:33] [PASSED] 0x4628 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46B0 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46B1 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46B2 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46B3 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46C0 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46C1 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46C2 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46C3 (ALDERLAKE_P) [09:50:33] [PASSED] 0x46D0 (ALDERLAKE_N) [09:50:33] [PASSED] 0x46D1 (ALDERLAKE_N) [09:50:33] [PASSED] 0x46D2 (ALDERLAKE_N) [09:50:33] [PASSED] 0x46D3 (ALDERLAKE_N) [09:50:33] [PASSED] 0x46D4 (ALDERLAKE_N) [09:50:33] [PASSED] 0xA721 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7A1 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7A9 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7AC (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7AD (ALDERLAKE_P) [09:50:33] [PASSED] 0xA720 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7A0 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7A8 (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7AA (ALDERLAKE_P) [09:50:33] [PASSED] 0xA7AB (ALDERLAKE_P) [09:50:33] [PASSED] 0xA780 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA781 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA782 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA783 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA788 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA789 (ALDERLAKE_S) [09:50:33] [PASSED] 0xA78A (ALDERLAKE_S) [09:50:33] [PASSED] 0xA78B (ALDERLAKE_S) [09:50:33] [PASSED] 0x4905 (DG1) [09:50:33] [PASSED] 0x4906 (DG1) [09:50:33] [PASSED] 0x4907 (DG1) [09:50:33] [PASSED] 0x4908 (DG1) [09:50:33] [PASSED] 0x4909 (DG1) [09:50:33] [PASSED] 0x56C0 (DG2) [09:50:33] [PASSED] 0x56C2 (DG2) [09:50:33] [PASSED] 0x56C1 (DG2) [09:50:33] [PASSED] 0x7D51 (METEORLAKE) [09:50:33] [PASSED] 0x7DD1 (METEORLAKE) [09:50:33] [PASSED] 0x7D41 (METEORLAKE) [09:50:33] [PASSED] 0x7D67 (METEORLAKE) [09:50:33] [PASSED] 0xB640 (METEORLAKE) [09:50:33] [PASSED] 0x56A0 (DG2) [09:50:33] [PASSED] 0x56A1 (DG2) [09:50:33] [PASSED] 0x56A2 (DG2) [09:50:33] [PASSED] 0x56BE (DG2) [09:50:33] [PASSED] 0x56BF (DG2) [09:50:33] [PASSED] 0x5690 (DG2) [09:50:33] [PASSED] 0x5691 (DG2) [09:50:33] [PASSED] 0x5692 (DG2) [09:50:33] [PASSED] 0x56A5 (DG2) [09:50:33] [PASSED] 0x56A6 (DG2) [09:50:33] [PASSED] 0x56B0 (DG2) [09:50:33] [PASSED] 0x56B1 (DG2) [09:50:33] [PASSED] 0x56BA (DG2) [09:50:33] [PASSED] 0x56BB (DG2) [09:50:33] [PASSED] 0x56BC (DG2) [09:50:33] [PASSED] 0x56BD (DG2) [09:50:33] [PASSED] 0x5693 (DG2) [09:50:33] [PASSED] 0x5694 (DG2) [09:50:33] [PASSED] 0x5695 (DG2) [09:50:33] [PASSED] 0x56A3 (DG2) [09:50:33] [PASSED] 0x56A4 (DG2) [09:50:33] [PASSED] 0x56B2 (DG2) [09:50:33] [PASSED] 0x56B3 (DG2) [09:50:33] [PASSED] 0x5696 (DG2) [09:50:33] [PASSED] 0x5697 (DG2) [09:50:33] [PASSED] 0xB69 (PVC) [09:50:33] [PASSED] 0xB6E (PVC) [09:50:33] [PASSED] 0xBD4 (PVC) [09:50:33] [PASSED] 0xBD5 (PVC) [09:50:33] [PASSED] 0xBD6 (PVC) [09:50:33] [PASSED] 0xBD7 (PVC) [09:50:33] [PASSED] 0xBD8 (PVC) [09:50:33] [PASSED] 0xBD9 (PVC) [09:50:33] [PASSED] 0xBDA (PVC) [09:50:33] [PASSED] 0xBDB (PVC) [09:50:33] [PASSED] 0xBE0 (PVC) [09:50:33] [PASSED] 0xBE1 (PVC) [09:50:33] [PASSED] 0xBE5 (PVC) [09:50:33] [PASSED] 0x7D40 (METEORLAKE) [09:50:33] [PASSED] 0x7D45 (METEORLAKE) [09:50:33] [PASSED] 0x7D55 (METEORLAKE) [09:50:33] [PASSED] 0x7D60 (METEORLAKE) [09:50:33] [PASSED] 0x7DD5 (METEORLAKE) [09:50:33] [PASSED] 0x6420 (LUNARLAKE) [09:50:33] [PASSED] 0x64A0 (LUNARLAKE) [09:50:33] [PASSED] 0x64B0 (LUNARLAKE) [09:50:33] [PASSED] 0xE202 (BATTLEMAGE) [09:50:33] [PASSED] 0xE209 (BATTLEMAGE) [09:50:33] [PASSED] 0xE20B (BATTLEMAGE) [09:50:33] [PASSED] 0xE20C (BATTLEMAGE) [09:50:33] [PASSED] 0xE20D (BATTLEMAGE) [09:50:33] [PASSED] 0xE210 (BATTLEMAGE) [09:50:33] [PASSED] 0xE211 (BATTLEMAGE) [09:50:33] [PASSED] 0xE212 (BATTLEMAGE) [09:50:33] [PASSED] 0xE216 (BATTLEMAGE) [09:50:33] [PASSED] 0xE220 (BATTLEMAGE) [09:50:33] [PASSED] 0xE221 (BATTLEMAGE) [09:50:33] [PASSED] 0xE222 (BATTLEMAGE) [09:50:33] [PASSED] 0xE223 (BATTLEMAGE) [09:50:33] [PASSED] 0xB080 (PANTHERLAKE) [09:50:33] [PASSED] 0xB081 (PANTHERLAKE) [09:50:33] [PASSED] 0xB082 (PANTHERLAKE) [09:50:33] [PASSED] 0xB083 (PANTHERLAKE) [09:50:33] [PASSED] 0xB084 (PANTHERLAKE) [09:50:33] [PASSED] 0xB085 (PANTHERLAKE) [09:50:33] [PASSED] 0xB086 (PANTHERLAKE) [09:50:33] [PASSED] 0xB087 (PANTHERLAKE) [09:50:33] [PASSED] 0xB08F (PANTHERLAKE) [09:50:33] [PASSED] 0xB090 (PANTHERLAKE) [09:50:33] [PASSED] 0xB0A0 (PANTHERLAKE) [09:50:33] [PASSED] 0xB0B0 (PANTHERLAKE) [09:50:33] [PASSED] 0xFD80 (PANTHERLAKE) [09:50:33] [PASSED] 0xFD81 (PANTHERLAKE) [09:50:33] [PASSED] 0xD740 (NOVALAKE_S) [09:50:33] [PASSED] 0xD741 (NOVALAKE_S) [09:50:33] [PASSED] 0xD742 (NOVALAKE_S) [09:50:33] [PASSED] 0xD743 (NOVALAKE_S) [09:50:33] [PASSED] 0xD744 (NOVALAKE_S) [09:50:33] [PASSED] 0xD745 (NOVALAKE_S) [09:50:33] [PASSED] 0x674C (CRESCENTISLAND) [09:50:33] [PASSED] 0xD750 (NOVALAKE_P) [09:50:33] [PASSED] 0xD751 (NOVALAKE_P) [09:50:33] [PASSED] 0xD752 (NOVALAKE_P) [09:50:33] [PASSED] 0xD753 (NOVALAKE_P) [09:50:33] [PASSED] 0xD754 (NOVALAKE_P) [09:50:33] [PASSED] 0xD755 (NOVALAKE_P) [09:50:33] [PASSED] 0xD756 (NOVALAKE_P) [09:50:33] [PASSED] 0xD757 (NOVALAKE_P) [09:50:33] [PASSED] 0xD75F (NOVALAKE_P) [09:50:33] =============== [PASSED] check_platform_desc =============== [09:50:33] ===================== [PASSED] xe_pci ====================== [09:50:33] =================== xe_rtp (2 subtests) ==================== [09:50:33] =============== xe_rtp_process_to_sr_tests ================ [09:50:33] [PASSED] coalesce-same-reg [09:50:33] [PASSED] no-match-no-add [09:50:33] [PASSED] match-or [09:50:33] [PASSED] match-or-xfail [09:50:33] [PASSED] no-match-no-add-multiple-rules [09:50:33] [PASSED] two-regs-two-entries [09:50:33] [PASSED] clr-one-set-other [09:50:33] [PASSED] set-field [09:50:33] [PASSED] conflict-duplicate stty: 'standard input': Inappropriate ioctl for device [09:50:33] [PASSED] conflict-not-disjoint [09:50:33] [PASSED] conflict-reg-type [09:50:33] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [09:50:33] ================== xe_rtp_process_tests =================== [09:50:33] [PASSED] active1 [09:50:33] [PASSED] active2 [09:50:33] [PASSED] active-inactive [09:50:33] [PASSED] inactive-active [09:50:33] [PASSED] inactive-1st_or_active-inactive [09:50:33] [PASSED] inactive-2nd_or_active-inactive [09:50:33] [PASSED] inactive-last_or_active-inactive [09:50:33] [PASSED] inactive-no_or_active-inactive [09:50:33] ============== [PASSED] xe_rtp_process_tests =============== [09:50:33] ===================== [PASSED] xe_rtp ====================== [09:50:33] ==================== xe_wa (1 subtest) ===================== [09:50:33] ======================== xe_wa_gt ========================= [09:50:33] [PASSED] TIGERLAKE B0 [09:50:33] [PASSED] DG1 A0 [09:50:33] [PASSED] DG1 B0 [09:50:33] [PASSED] ALDERLAKE_S A0 [09:50:33] [PASSED] ALDERLAKE_S B0 [09:50:33] [PASSED] ALDERLAKE_S C0 [09:50:33] [PASSED] ALDERLAKE_S D0 [09:50:33] [PASSED] ALDERLAKE_P A0 [09:50:33] [PASSED] ALDERLAKE_P B0 [09:50:33] [PASSED] ALDERLAKE_P C0 [09:50:33] [PASSED] ALDERLAKE_S RPLS D0 [09:50:33] [PASSED] ALDERLAKE_P RPLU E0 [09:50:33] [PASSED] DG2 G10 C0 [09:50:33] [PASSED] DG2 G11 B1 [09:50:33] [PASSED] DG2 G12 A1 [09:50:33] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0 [09:50:33] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0 [09:50:33] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0 [09:50:33] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0 [09:50:33] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0 [09:50:33] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1 [09:50:33] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0 [09:50:33] ==================== [PASSED] xe_wa_gt ===================== [09:50:33] ====================== [PASSED] xe_wa ====================== [09:50:33] ============================================================ [09:50:33] Testing complete. Ran 597 tests: passed: 579, skipped: 18 [09:50:33] Elapsed time: 36.026s total, 4.227s configuring, 31.182s building, 0.579s running + /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [09:50:33] Configuring KUnit Kernel ... Regenerating .config ... Populating config with: $ make ARCH=um O=.kunit olddefconfig [09:50:35] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [09:51:00] Starting KUnit Kernel (1/1)... [09:51:00] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [09:51:00] ============ drm_test_pick_cmdline (2 subtests) ============ [09:51:00] [PASSED] drm_test_pick_cmdline_res_1920_1080_60 [09:51:00] =============== drm_test_pick_cmdline_named =============== [09:51:00] [PASSED] NTSC [09:51:00] [PASSED] NTSC-J [09:51:00] [PASSED] PAL [09:51:00] [PASSED] PAL-M [09:51:00] =========== [PASSED] drm_test_pick_cmdline_named =========== [09:51:00] ============== [PASSED] drm_test_pick_cmdline ============== [09:51:00] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [09:51:00] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [09:51:00] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [09:51:00] =========== drm_validate_clone_mode (2 subtests) =========== [09:51:00] ============== drm_test_check_in_clone_mode =============== [09:51:00] [PASSED] in_clone_mode [09:51:00] [PASSED] not_in_clone_mode [09:51:00] ========== [PASSED] drm_test_check_in_clone_mode =========== [09:51:00] =============== drm_test_check_valid_clones =============== [09:51:00] [PASSED] not_in_clone_mode [09:51:00] [PASSED] valid_clone [09:51:00] [PASSED] invalid_clone [09:51:00] =========== [PASSED] drm_test_check_valid_clones =========== [09:51:00] ============= [PASSED] drm_validate_clone_mode ============= [09:51:00] ============= drm_validate_modeset (1 subtest) ============= [09:51:00] [PASSED] drm_test_check_connector_changed_modeset [09:51:00] ============== [PASSED] drm_validate_modeset =============== [09:51:00] ====== drm_test_bridge_get_current_state (2 subtests) ====== [09:51:00] [PASSED] drm_test_drm_bridge_get_current_state_atomic [09:51:00] [PASSED] drm_test_drm_bridge_get_current_state_legacy [09:51:00] ======== [PASSED] drm_test_bridge_get_current_state ======== [09:51:00] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [09:51:00] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [09:51:00] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [09:51:00] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy [09:51:00] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [09:51:00] ============== drm_bridge_alloc (2 subtests) =============== [09:51:00] [PASSED] drm_test_drm_bridge_alloc_basic [09:51:00] [PASSED] drm_test_drm_bridge_alloc_get_put [09:51:00] ================ [PASSED] drm_bridge_alloc ================= [09:51:00] ============= drm_cmdline_parser (40 subtests) ============= [09:51:00] [PASSED] drm_test_cmdline_force_d_only [09:51:00] [PASSED] drm_test_cmdline_force_D_only_dvi [09:51:00] [PASSED] drm_test_cmdline_force_D_only_hdmi [09:51:00] [PASSED] drm_test_cmdline_force_D_only_not_digital [09:51:00] [PASSED] drm_test_cmdline_force_e_only [09:51:00] [PASSED] drm_test_cmdline_res [09:51:00] [PASSED] drm_test_cmdline_res_vesa [09:51:00] [PASSED] drm_test_cmdline_res_vesa_rblank [09:51:00] [PASSED] drm_test_cmdline_res_rblank [09:51:00] [PASSED] drm_test_cmdline_res_bpp [09:51:00] [PASSED] drm_test_cmdline_res_refresh [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [09:51:00] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [09:51:00] [PASSED] drm_test_cmdline_res_margins_force_on [09:51:00] [PASSED] drm_test_cmdline_res_vesa_margins [09:51:00] [PASSED] drm_test_cmdline_name [09:51:00] [PASSED] drm_test_cmdline_name_bpp [09:51:00] [PASSED] drm_test_cmdline_name_option [09:51:00] [PASSED] drm_test_cmdline_name_bpp_option [09:51:00] [PASSED] drm_test_cmdline_rotate_0 [09:51:00] [PASSED] drm_test_cmdline_rotate_90 [09:51:00] [PASSED] drm_test_cmdline_rotate_180 [09:51:00] [PASSED] drm_test_cmdline_rotate_270 [09:51:00] [PASSED] drm_test_cmdline_hmirror [09:51:00] [PASSED] drm_test_cmdline_vmirror [09:51:00] [PASSED] drm_test_cmdline_margin_options [09:51:00] [PASSED] drm_test_cmdline_multiple_options [09:51:00] [PASSED] drm_test_cmdline_bpp_extra_and_option [09:51:00] [PASSED] drm_test_cmdline_extra_and_option [09:51:00] [PASSED] drm_test_cmdline_freestanding_options [09:51:00] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [09:51:00] [PASSED] drm_test_cmdline_panel_orientation [09:51:00] ================ drm_test_cmdline_invalid ================= [09:51:00] [PASSED] margin_only [09:51:00] [PASSED] interlace_only [09:51:00] [PASSED] res_missing_x [09:51:00] [PASSED] res_missing_y [09:51:00] [PASSED] res_bad_y [09:51:00] [PASSED] res_missing_y_bpp [09:51:00] [PASSED] res_bad_bpp [09:51:00] [PASSED] res_bad_refresh [09:51:00] [PASSED] res_bpp_refresh_force_on_off [09:51:00] [PASSED] res_invalid_mode [09:51:00] [PASSED] res_bpp_wrong_place_mode [09:51:00] [PASSED] name_bpp_refresh [09:51:00] [PASSED] name_refresh [09:51:00] [PASSED] name_refresh_wrong_mode [09:51:00] [PASSED] name_refresh_invalid_mode [09:51:00] [PASSED] rotate_multiple [09:51:00] [PASSED] rotate_invalid_val [09:51:00] [PASSED] rotate_truncated [09:51:00] [PASSED] invalid_option [09:51:00] [PASSED] invalid_tv_option [09:51:00] [PASSED] truncated_tv_option [09:51:00] ============ [PASSED] drm_test_cmdline_invalid ============= [09:51:00] =============== drm_test_cmdline_tv_options =============== [09:51:00] [PASSED] NTSC [09:51:00] [PASSED] NTSC_443 [09:51:00] [PASSED] NTSC_J [09:51:00] [PASSED] PAL [09:51:00] [PASSED] PAL_M [09:51:00] [PASSED] PAL_N [09:51:00] [PASSED] SECAM [09:51:00] [PASSED] MONO_525 [09:51:00] [PASSED] MONO_625 [09:51:00] =========== [PASSED] drm_test_cmdline_tv_options =========== [09:51:00] =============== [PASSED] drm_cmdline_parser ================ [09:51:00] ========== drmm_connector_hdmi_init (20 subtests) ========== [09:51:00] [PASSED] drm_test_connector_hdmi_init_valid [09:51:00] [PASSED] drm_test_connector_hdmi_init_bpc_8 [09:51:00] [PASSED] drm_test_connector_hdmi_init_bpc_10 [09:51:00] [PASSED] drm_test_connector_hdmi_init_bpc_12 [09:51:00] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [09:51:00] [PASSED] drm_test_connector_hdmi_init_bpc_null [09:51:00] [PASSED] drm_test_connector_hdmi_init_formats_empty [09:51:00] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [09:51:00] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [09:51:00] [PASSED] supported_formats=0x9 yuv420_allowed=1 [09:51:00] [PASSED] supported_formats=0x9 yuv420_allowed=0 [09:51:00] [PASSED] supported_formats=0x5 yuv420_allowed=1 [09:51:00] [PASSED] supported_formats=0x5 yuv420_allowed=0 [09:51:00] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [09:51:00] [PASSED] drm_test_connector_hdmi_init_null_ddc [09:51:00] [PASSED] drm_test_connector_hdmi_init_null_product [09:51:00] [PASSED] drm_test_connector_hdmi_init_null_vendor [09:51:00] [PASSED] drm_test_connector_hdmi_init_product_length_exact [09:51:00] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [09:51:00] [PASSED] drm_test_connector_hdmi_init_product_valid [09:51:00] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [09:51:00] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [09:51:00] [PASSED] drm_test_connector_hdmi_init_vendor_valid [09:51:00] ========= drm_test_connector_hdmi_init_type_valid ========= [09:51:00] [PASSED] HDMI-A [09:51:00] [PASSED] HDMI-B [09:51:00] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [09:51:00] ======== drm_test_connector_hdmi_init_type_invalid ======== [09:51:00] [PASSED] Unknown [09:51:00] [PASSED] VGA [09:51:00] [PASSED] DVI-I [09:51:00] [PASSED] DVI-D [09:51:00] [PASSED] DVI-A [09:51:00] [PASSED] Composite [09:51:00] [PASSED] SVIDEO [09:51:00] [PASSED] LVDS [09:51:00] [PASSED] Component [09:51:00] [PASSED] DIN [09:51:00] [PASSED] DP [09:51:00] [PASSED] TV [09:51:00] [PASSED] eDP [09:51:00] [PASSED] Virtual [09:51:00] [PASSED] DSI [09:51:00] [PASSED] DPI [09:51:00] [PASSED] Writeback [09:51:00] [PASSED] SPI [09:51:00] [PASSED] USB [09:51:00] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [09:51:00] ============ [PASSED] drmm_connector_hdmi_init ============= [09:51:00] ============= drmm_connector_init (3 subtests) ============= [09:51:00] [PASSED] drm_test_drmm_connector_init [09:51:00] [PASSED] drm_test_drmm_connector_init_null_ddc [09:51:00] ========= drm_test_drmm_connector_init_type_valid ========= [09:51:00] [PASSED] Unknown [09:51:00] [PASSED] VGA [09:51:00] [PASSED] DVI-I [09:51:00] [PASSED] DVI-D [09:51:00] [PASSED] DVI-A [09:51:00] [PASSED] Composite [09:51:00] [PASSED] SVIDEO [09:51:00] [PASSED] LVDS [09:51:00] [PASSED] Component [09:51:00] [PASSED] DIN [09:51:00] [PASSED] DP [09:51:00] [PASSED] HDMI-A [09:51:00] [PASSED] HDMI-B [09:51:00] [PASSED] TV [09:51:00] [PASSED] eDP [09:51:00] [PASSED] Virtual [09:51:00] [PASSED] DSI [09:51:00] [PASSED] DPI [09:51:00] [PASSED] Writeback [09:51:00] [PASSED] SPI [09:51:00] [PASSED] USB [09:51:00] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [09:51:00] =============== [PASSED] drmm_connector_init =============== [09:51:00] ========= drm_connector_dynamic_init (6 subtests) ========== [09:51:00] [PASSED] drm_test_drm_connector_dynamic_init [09:51:00] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [09:51:00] [PASSED] drm_test_drm_connector_dynamic_init_not_added [09:51:00] [PASSED] drm_test_drm_connector_dynamic_init_properties [09:51:00] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [09:51:00] [PASSED] Unknown [09:51:00] [PASSED] VGA [09:51:00] [PASSED] DVI-I [09:51:00] [PASSED] DVI-D [09:51:00] [PASSED] DVI-A [09:51:00] [PASSED] Composite [09:51:00] [PASSED] SVIDEO [09:51:00] [PASSED] LVDS [09:51:00] [PASSED] Component [09:51:00] [PASSED] DIN [09:51:00] [PASSED] DP [09:51:00] [PASSED] HDMI-A [09:51:00] [PASSED] HDMI-B [09:51:00] [PASSED] TV [09:51:00] [PASSED] eDP [09:51:00] [PASSED] Virtual [09:51:00] [PASSED] DSI [09:51:00] [PASSED] DPI [09:51:00] [PASSED] Writeback [09:51:00] [PASSED] SPI [09:51:00] [PASSED] USB [09:51:00] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [09:51:00] ======== drm_test_drm_connector_dynamic_init_name ========= [09:51:00] [PASSED] Unknown [09:51:00] [PASSED] VGA [09:51:00] [PASSED] DVI-I [09:51:00] [PASSED] DVI-D [09:51:00] [PASSED] DVI-A [09:51:00] [PASSED] Composite [09:51:00] [PASSED] SVIDEO [09:51:00] [PASSED] LVDS [09:51:00] [PASSED] Component [09:51:00] [PASSED] DIN [09:51:00] [PASSED] DP [09:51:00] [PASSED] HDMI-A [09:51:00] [PASSED] HDMI-B [09:51:00] [PASSED] TV [09:51:00] [PASSED] eDP [09:51:00] [PASSED] Virtual [09:51:00] [PASSED] DSI [09:51:00] [PASSED] DPI [09:51:00] [PASSED] Writeback [09:51:00] [PASSED] SPI [09:51:00] [PASSED] USB [09:51:00] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [09:51:00] =========== [PASSED] drm_connector_dynamic_init ============ [09:51:00] ==== drm_connector_dynamic_register_early (4 subtests) ===== [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [09:51:00] ====== [PASSED] drm_connector_dynamic_register_early ======= [09:51:00] ======= drm_connector_dynamic_register (7 subtests) ======== [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_on_list [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_no_init [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [09:51:00] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [09:51:00] ========= [PASSED] drm_connector_dynamic_register ========== [09:51:00] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [09:51:00] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [09:51:00] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [09:51:00] === [PASSED] drm_connector_attach_broadcast_rgb_property === [09:51:00] ========== drm_get_tv_mode_from_name (2 subtests) ========== [09:51:00] ========== drm_test_get_tv_mode_from_name_valid =========== [09:51:00] [PASSED] NTSC [09:51:00] [PASSED] NTSC-443 [09:51:00] [PASSED] NTSC-J [09:51:00] [PASSED] PAL [09:51:00] [PASSED] PAL-M [09:51:00] [PASSED] PAL-N [09:51:00] [PASSED] SECAM [09:51:00] [PASSED] Mono [09:51:00] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [09:51:00] [PASSED] drm_test_get_tv_mode_from_name_truncated [09:51:00] ============ [PASSED] drm_get_tv_mode_from_name ============ [09:51:00] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [09:51:00] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [09:51:00] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [09:51:00] [PASSED] VIC 96 [09:51:00] [PASSED] VIC 97 [09:51:00] [PASSED] VIC 101 [09:51:00] [PASSED] VIC 102 [09:51:00] [PASSED] VIC 106 [09:51:00] [PASSED] VIC 107 [09:51:00] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [09:51:00] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [09:51:00] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [09:51:00] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [09:51:00] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [09:51:00] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [09:51:00] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [09:51:00] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [09:51:00] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [09:51:00] [PASSED] Automatic [09:51:00] [PASSED] Full [09:51:00] [PASSED] Limited 16:235 [09:51:00] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [09:51:00] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [09:51:00] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [09:51:00] == drm_hdmi_connector_get_output_format_name (2 subtests) == [09:51:00] === drm_test_drm_hdmi_connector_get_output_format_name ==== [09:51:00] [PASSED] RGB [09:51:00] [PASSED] YUV 4:2:0 [09:51:00] [PASSED] YUV 4:2:2 [09:51:00] [PASSED] YUV 4:4:4 [09:51:00] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [09:51:00] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [09:51:00] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [09:51:00] ============= drm_damage_helper (21 subtests) ============== [09:51:00] [PASSED] drm_test_damage_iter_no_damage [09:51:00] [PASSED] drm_test_damage_iter_no_damage_fractional_src [09:51:00] [PASSED] drm_test_damage_iter_no_damage_src_moved [09:51:00] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [09:51:00] [PASSED] drm_test_damage_iter_no_damage_not_visible [09:51:00] [PASSED] drm_test_damage_iter_no_damage_no_crtc [09:51:00] [PASSED] drm_test_damage_iter_no_damage_no_fb [09:51:00] [PASSED] drm_test_damage_iter_simple_damage [09:51:00] [PASSED] drm_test_damage_iter_single_damage [09:51:00] [PASSED] drm_test_damage_iter_single_damage_intersect_src [09:51:00] [PASSED] drm_test_damage_iter_single_damage_outside_src [09:51:00] [PASSED] drm_test_damage_iter_single_damage_fractional_src [09:51:00] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [09:51:00] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [09:51:00] [PASSED] drm_test_damage_iter_single_damage_src_moved [09:51:00] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [09:51:00] [PASSED] drm_test_damage_iter_damage [09:51:00] [PASSED] drm_test_damage_iter_damage_one_intersect [09:51:00] [PASSED] drm_test_damage_iter_damage_one_outside [09:51:00] [PASSED] drm_test_damage_iter_damage_src_moved [09:51:00] [PASSED] drm_test_damage_iter_damage_not_visible [09:51:00] ================ [PASSED] drm_damage_helper ================ [09:51:00] ============== drm_dp_mst_helper (3 subtests) ============== [09:51:00] ============== drm_test_dp_mst_calc_pbn_mode ============== [09:51:00] [PASSED] Clock 154000 BPP 30 DSC disabled [09:51:00] [PASSED] Clock 234000 BPP 30 DSC disabled [09:51:00] [PASSED] Clock 297000 BPP 24 DSC disabled [09:51:00] [PASSED] Clock 332880 BPP 24 DSC enabled [09:51:00] [PASSED] Clock 324540 BPP 24 DSC enabled [09:51:00] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [09:51:00] ============== drm_test_dp_mst_calc_pbn_div =============== [09:51:00] [PASSED] Link rate 2000000 lane count 4 [09:51:00] [PASSED] Link rate 2000000 lane count 2 [09:51:00] [PASSED] Link rate 2000000 lane count 1 [09:51:00] [PASSED] Link rate 1350000 lane count 4 [09:51:00] [PASSED] Link rate 1350000 lane count 2 [09:51:00] [PASSED] Link rate 1350000 lane count 1 [09:51:00] [PASSED] Link rate 1000000 lane count 4 [09:51:00] [PASSED] Link rate 1000000 lane count 2 [09:51:00] [PASSED] Link rate 1000000 lane count 1 [09:51:00] [PASSED] Link rate 810000 lane count 4 [09:51:00] [PASSED] Link rate 810000 lane count 2 [09:51:00] [PASSED] Link rate 810000 lane count 1 [09:51:00] [PASSED] Link rate 540000 lane count 4 [09:51:00] [PASSED] Link rate 540000 lane count 2 [09:51:00] [PASSED] Link rate 540000 lane count 1 [09:51:00] [PASSED] Link rate 270000 lane count 4 [09:51:00] [PASSED] Link rate 270000 lane count 2 [09:51:00] [PASSED] Link rate 270000 lane count 1 [09:51:00] [PASSED] Link rate 162000 lane count 4 [09:51:00] [PASSED] Link rate 162000 lane count 2 [09:51:00] [PASSED] Link rate 162000 lane count 1 [09:51:00] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [09:51:00] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [09:51:00] [PASSED] DP_ENUM_PATH_RESOURCES with port number [09:51:00] [PASSED] DP_POWER_UP_PHY with port number [09:51:00] [PASSED] DP_POWER_DOWN_PHY with port number [09:51:00] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [09:51:00] [PASSED] DP_ALLOCATE_PAYLOAD with port number [09:51:00] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [09:51:00] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [09:51:00] [PASSED] DP_QUERY_PAYLOAD with port number [09:51:00] [PASSED] DP_QUERY_PAYLOAD with VCPI [09:51:00] [PASSED] DP_REMOTE_DPCD_READ with port number [09:51:00] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [09:51:00] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [09:51:00] [PASSED] DP_REMOTE_DPCD_WRITE with port number [09:51:00] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [09:51:00] [PASSED] DP_REMOTE_DPCD_WRITE with data array [09:51:00] [PASSED] DP_REMOTE_I2C_READ with port number [09:51:00] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [09:51:00] [PASSED] DP_REMOTE_I2C_READ with transactions array [09:51:00] [PASSED] DP_REMOTE_I2C_WRITE with port number [09:51:00] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [09:51:00] [PASSED] DP_REMOTE_I2C_WRITE with data array [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [09:51:00] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [09:51:00] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [09:51:00] ================ [PASSED] drm_dp_mst_helper ================ [09:51:00] ================== drm_exec (7 subtests) =================== [09:51:00] [PASSED] sanitycheck [09:51:00] [PASSED] test_lock [09:51:00] [PASSED] test_lock_unlock [09:51:00] [PASSED] test_duplicates [09:51:00] [PASSED] test_prepare [09:51:00] [PASSED] test_prepare_array [09:51:00] [PASSED] test_multiple_loops [09:51:00] ==================== [PASSED] drm_exec ===================== [09:51:00] =========== drm_format_helper_test (17 subtests) =========== [09:51:00] ============== drm_test_fb_xrgb8888_to_gray8 ============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [09:51:00] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [09:51:00] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [09:51:00] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [09:51:00] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [09:51:00] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [09:51:00] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [09:51:00] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [09:51:00] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [09:51:00] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [09:51:00] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [09:51:00] ============== drm_test_fb_xrgb8888_to_mono =============== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [09:51:00] ==================== drm_test_fb_swab ===================== [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ================ [PASSED] drm_test_fb_swab ================= [09:51:00] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [09:51:00] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [09:51:00] [PASSED] single_pixel_source_buffer [09:51:00] [PASSED] single_pixel_clip_rectangle [09:51:00] [PASSED] well_known_colors [09:51:00] [PASSED] destination_pitch [09:51:00] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [09:51:00] ================= drm_test_fb_clip_offset ================= [09:51:00] [PASSED] pass through [09:51:00] [PASSED] horizontal offset [09:51:00] [PASSED] vertical offset [09:51:00] [PASSED] horizontal and vertical offset [09:51:00] [PASSED] horizontal offset (custom pitch) [09:51:00] [PASSED] vertical offset (custom pitch) [09:51:00] [PASSED] horizontal and vertical offset (custom pitch) [09:51:00] ============= [PASSED] drm_test_fb_clip_offset ============= [09:51:00] =================== drm_test_fb_memcpy ==================== [09:51:00] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [09:51:00] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [09:51:00] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [09:51:00] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [09:51:00] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [09:51:00] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [09:51:00] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [09:51:00] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [09:51:00] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [09:51:00] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [09:51:00] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [09:51:00] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [09:51:00] =============== [PASSED] drm_test_fb_memcpy ================ [09:51:00] ============= [PASSED] drm_format_helper_test ============== [09:51:00] ================= drm_format (18 subtests) ================= [09:51:00] [PASSED] drm_test_format_block_width_invalid [09:51:00] [PASSED] drm_test_format_block_width_one_plane [09:51:00] [PASSED] drm_test_format_block_width_two_plane [09:51:00] [PASSED] drm_test_format_block_width_three_plane [09:51:00] [PASSED] drm_test_format_block_width_tiled [09:51:00] [PASSED] drm_test_format_block_height_invalid [09:51:00] [PASSED] drm_test_format_block_height_one_plane [09:51:00] [PASSED] drm_test_format_block_height_two_plane [09:51:00] [PASSED] drm_test_format_block_height_three_plane [09:51:00] [PASSED] drm_test_format_block_height_tiled [09:51:00] [PASSED] drm_test_format_min_pitch_invalid [09:51:00] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [09:51:00] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [09:51:00] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [09:51:00] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [09:51:00] [PASSED] drm_test_format_min_pitch_two_plane [09:51:00] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [09:51:00] [PASSED] drm_test_format_min_pitch_tiled [09:51:00] =================== [PASSED] drm_format ==================== [09:51:00] ============== drm_framebuffer (10 subtests) =============== [09:51:00] ========== drm_test_framebuffer_check_src_coords ========== [09:51:00] [PASSED] Success: source fits into fb [09:51:00] [PASSED] Fail: overflowing fb with x-axis coordinate [09:51:00] [PASSED] Fail: overflowing fb with y-axis coordinate [09:51:00] [PASSED] Fail: overflowing fb with source width [09:51:00] [PASSED] Fail: overflowing fb with source height [09:51:00] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [09:51:00] [PASSED] drm_test_framebuffer_cleanup [09:51:00] =============== drm_test_framebuffer_create =============== [09:51:00] [PASSED] ABGR8888 normal sizes [09:51:00] [PASSED] ABGR8888 max sizes [09:51:00] [PASSED] ABGR8888 pitch greater than min required [09:51:00] [PASSED] ABGR8888 pitch less than min required [09:51:00] [PASSED] ABGR8888 Invalid width [09:51:00] [PASSED] ABGR8888 Invalid buffer handle [09:51:00] [PASSED] No pixel format [09:51:00] [PASSED] ABGR8888 Width 0 [09:51:00] [PASSED] ABGR8888 Height 0 [09:51:00] [PASSED] ABGR8888 Out of bound height * pitch combination [09:51:00] [PASSED] ABGR8888 Large buffer offset [09:51:00] [PASSED] ABGR8888 Buffer offset for inexistent plane [09:51:00] [PASSED] ABGR8888 Invalid flag [09:51:00] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [09:51:00] [PASSED] ABGR8888 Valid buffer modifier [09:51:00] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [09:51:00] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] NV12 Normal sizes [09:51:00] [PASSED] NV12 Max sizes [09:51:00] [PASSED] NV12 Invalid pitch [09:51:00] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [09:51:00] [PASSED] NV12 different modifier per-plane [09:51:00] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [09:51:00] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] NV12 Modifier for inexistent plane [09:51:00] [PASSED] NV12 Handle for inexistent plane [09:51:00] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [09:51:00] [PASSED] YVU420 Normal sizes [09:51:00] [PASSED] YVU420 Max sizes [09:51:00] [PASSED] YVU420 Invalid pitch [09:51:00] [PASSED] YVU420 Different pitches [09:51:00] [PASSED] YVU420 Different buffer offsets/pitches [09:51:00] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [09:51:00] [PASSED] YVU420 Valid modifier [09:51:00] [PASSED] YVU420 Different modifiers per plane [09:51:00] [PASSED] YVU420 Modifier for inexistent plane [09:51:00] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [09:51:00] [PASSED] X0L2 Normal sizes [09:51:00] [PASSED] X0L2 Max sizes [09:51:00] [PASSED] X0L2 Invalid pitch [09:51:00] [PASSED] X0L2 Pitch greater than minimum required [09:51:00] [PASSED] X0L2 Handle for inexistent plane [09:51:00] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [09:51:00] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [09:51:00] [PASSED] X0L2 Valid modifier [09:51:00] [PASSED] X0L2 Modifier for inexistent plane [09:51:00] =========== [PASSED] drm_test_framebuffer_create =========== [09:51:00] [PASSED] drm_test_framebuffer_free [09:51:00] [PASSED] drm_test_framebuffer_init [09:51:00] [PASSED] drm_test_framebuffer_init_bad_format [09:51:00] [PASSED] drm_test_framebuffer_init_dev_mismatch [09:51:00] [PASSED] drm_test_framebuffer_lookup [09:51:00] [PASSED] drm_test_framebuffer_lookup_inexistent [09:51:00] [PASSED] drm_test_framebuffer_modifiers_not_supported [09:51:00] ================= [PASSED] drm_framebuffer ================= [09:51:00] ================ drm_gem_shmem (8 subtests) ================ [09:51:00] [PASSED] drm_gem_shmem_test_obj_create [09:51:00] [PASSED] drm_gem_shmem_test_obj_create_private [09:51:00] [PASSED] drm_gem_shmem_test_pin_pages [09:51:00] [PASSED] drm_gem_shmem_test_vmap [09:51:00] [PASSED] drm_gem_shmem_test_get_sg_table [09:51:00] [PASSED] drm_gem_shmem_test_get_pages_sgt [09:51:00] [PASSED] drm_gem_shmem_test_madvise [09:51:00] [PASSED] drm_gem_shmem_test_purge [09:51:00] ================== [PASSED] drm_gem_shmem ================== [09:51:00] === drm_atomic_helper_connector_hdmi_check (27 subtests) === [09:51:00] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [09:51:00] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [09:51:00] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [09:51:00] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [09:51:00] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [09:51:00] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [09:51:00] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [09:51:00] [PASSED] Automatic [09:51:00] [PASSED] Full [09:51:00] [PASSED] Limited 16:235 [09:51:00] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [09:51:00] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [09:51:00] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [09:51:00] [PASSED] drm_test_check_disable_connector [09:51:00] [PASSED] drm_test_check_hdmi_funcs_reject_rate [09:51:00] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [09:51:00] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [09:51:00] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [09:51:00] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [09:51:00] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [09:51:00] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [09:51:00] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [09:51:00] [PASSED] drm_test_check_output_bpc_dvi [09:51:00] [PASSED] drm_test_check_output_bpc_format_vic_1 [09:51:00] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [09:51:00] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [09:51:00] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [09:51:00] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [09:51:00] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [09:51:00] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [09:51:00] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [09:51:00] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [09:51:00] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [09:51:00] [PASSED] drm_test_check_broadcast_rgb_value [09:51:00] [PASSED] drm_test_check_bpc_8_value [09:51:00] [PASSED] drm_test_check_bpc_10_value [09:51:00] [PASSED] drm_test_check_bpc_12_value [09:51:00] [PASSED] drm_test_check_format_value [09:51:00] [PASSED] drm_test_check_tmds_char_value [09:51:00] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [09:51:00] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) = [09:51:00] [PASSED] drm_test_check_mode_valid [09:51:00] [PASSED] drm_test_check_mode_valid_reject [09:51:00] [PASSED] drm_test_check_mode_valid_reject_rate [09:51:00] [PASSED] drm_test_check_mode_valid_reject_max_clock [09:51:00] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [09:51:00] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) = [09:51:00] [PASSED] drm_test_check_infoframes [09:51:00] [PASSED] drm_test_check_reject_avi_infoframe [09:51:00] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8 [09:51:00] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10 [09:51:00] [PASSED] drm_test_check_reject_audio_infoframe [09:51:00] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes === [09:51:00] ================= drm_managed (2 subtests) ================= [09:51:00] [PASSED] drm_test_managed_release_action [09:51:00] [PASSED] drm_test_managed_run_action [09:51:00] =================== [PASSED] drm_managed =================== [09:51:00] =================== drm_mm (6 subtests) ==================== [09:51:00] [PASSED] drm_test_mm_init [09:51:00] [PASSED] drm_test_mm_debug [09:51:00] [PASSED] drm_test_mm_align32 [09:51:00] [PASSED] drm_test_mm_align64 [09:51:00] [PASSED] drm_test_mm_lowest [09:51:00] [PASSED] drm_test_mm_highest [09:51:00] ===================== [PASSED] drm_mm ====================== [09:51:00] ============= drm_modes_analog_tv (5 subtests) ============= [09:51:00] [PASSED] drm_test_modes_analog_tv_mono_576i [09:51:00] [PASSED] drm_test_modes_analog_tv_ntsc_480i [09:51:00] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [09:51:00] [PASSED] drm_test_modes_analog_tv_pal_576i [09:51:00] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [09:51:00] =============== [PASSED] drm_modes_analog_tv =============== [09:51:00] ============== drm_plane_helper (2 subtests) =============== [09:51:00] =============== drm_test_check_plane_state ================ [09:51:00] [PASSED] clipping_simple [09:51:00] [PASSED] clipping_rotate_reflect [09:51:00] [PASSED] positioning_simple [09:51:00] [PASSED] upscaling [09:51:00] [PASSED] downscaling [09:51:00] [PASSED] rounding1 [09:51:00] [PASSED] rounding2 [09:51:00] [PASSED] rounding3 [09:51:00] [PASSED] rounding4 [09:51:00] =========== [PASSED] drm_test_check_plane_state ============ [09:51:00] =========== drm_test_check_invalid_plane_state ============ [09:51:00] [PASSED] positioning_invalid [09:51:00] [PASSED] upscaling_invalid [09:51:00] [PASSED] downscaling_invalid [09:51:00] ======= [PASSED] drm_test_check_invalid_plane_state ======== [09:51:00] ================ [PASSED] drm_plane_helper ================= [09:51:00] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [09:51:00] ====== drm_test_connector_helper_tv_get_modes_check ======= [09:51:00] [PASSED] None [09:51:00] [PASSED] PAL [09:51:00] [PASSED] NTSC [09:51:00] [PASSED] Both, NTSC Default [09:51:00] [PASSED] Both, PAL Default [09:51:00] [PASSED] Both, NTSC Default, with PAL on command-line [09:51:00] [PASSED] Both, PAL Default, with NTSC on command-line [09:51:00] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [09:51:00] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [09:51:00] ================== drm_rect (9 subtests) =================== [09:51:00] [PASSED] drm_test_rect_clip_scaled_div_by_zero [09:51:00] [PASSED] drm_test_rect_clip_scaled_not_clipped [09:51:00] [PASSED] drm_test_rect_clip_scaled_clipped [09:51:00] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [09:51:00] ================= drm_test_rect_intersect ================= [09:51:00] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [09:51:00] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [09:51:00] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [09:51:00] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [09:51:00] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [09:51:00] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [09:51:00] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [09:51:00] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [09:51:00] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [09:51:00] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [09:51:00] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [09:51:00] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [09:51:00] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [09:51:00] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [09:51:00] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [09:51:00] ============= [PASSED] drm_test_rect_intersect ============= [09:51:00] ================ drm_test_rect_calc_hscale ================ [09:51:00] [PASSED] normal use [09:51:00] [PASSED] out of max range [09:51:00] [PASSED] out of min range [09:51:00] [PASSED] zero dst [09:51:00] [PASSED] negative src [09:51:00] [PASSED] negative dst [09:51:00] ============ [PASSED] drm_test_rect_calc_hscale ============ [09:51:00] ================ drm_test_rect_calc_vscale ================ [09:51:00] [PASSED] normal use [09:51:00] [PASSED] out of max range [09:51:00] [PASSED] out of min range [09:51:00] [PASSED] zero dst [09:51:00] [PASSED] negative src [09:51:00] [PASSED] negative dst stty: 'standard input': Inappropriate ioctl for device [09:51:00] ============ [PASSED] drm_test_rect_calc_vscale ============ [09:51:00] ================== drm_test_rect_rotate =================== [09:51:00] [PASSED] reflect-x [09:51:00] [PASSED] reflect-y [09:51:00] [PASSED] rotate-0 [09:51:00] [PASSED] rotate-90 [09:51:00] [PASSED] rotate-180 [09:51:00] [PASSED] rotate-270 [09:51:00] ============== [PASSED] drm_test_rect_rotate =============== [09:51:00] ================ drm_test_rect_rotate_inv ================= [09:51:00] [PASSED] reflect-x [09:51:00] [PASSED] reflect-y [09:51:00] [PASSED] rotate-0 [09:51:00] [PASSED] rotate-90 [09:51:00] [PASSED] rotate-180 [09:51:00] [PASSED] rotate-270 [09:51:00] ============ [PASSED] drm_test_rect_rotate_inv ============= [09:51:00] ==================== [PASSED] drm_rect ===================== [09:51:00] ============ drm_sysfb_modeset_test (1 subtest) ============ [09:51:00] ============ drm_test_sysfb_build_fourcc_list ============= [09:51:00] [PASSED] no native formats [09:51:00] [PASSED] XRGB8888 as native format [09:51:00] [PASSED] remove duplicates [09:51:00] [PASSED] convert alpha formats [09:51:00] [PASSED] random formats [09:51:00] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [09:51:00] ============= [PASSED] drm_sysfb_modeset_test ============== [09:51:00] ================== drm_fixp (2 subtests) =================== [09:51:00] [PASSED] drm_test_int2fixp [09:51:00] [PASSED] drm_test_sm2fixp [09:51:00] ==================== [PASSED] drm_fixp ===================== [09:51:00] ============================================================ [09:51:00] Testing complete. Ran 621 tests: passed: 621 [09:51:00] Elapsed time: 26.454s total, 1.749s configuring, 24.536s building, 0.136s running + /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [09:51:00] Configuring KUnit Kernel ... Regenerating .config ... Populating config with: $ make ARCH=um O=.kunit olddefconfig [09:51:01] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [09:51:11] Starting KUnit Kernel (1/1)... [09:51:11] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [09:51:11] ================= ttm_device (5 subtests) ================== [09:51:11] [PASSED] ttm_device_init_basic [09:51:11] [PASSED] ttm_device_init_multiple [09:51:11] [PASSED] ttm_device_fini_basic [09:51:11] [PASSED] ttm_device_init_no_vma_man [09:51:11] ================== ttm_device_init_pools ================== [09:51:11] [PASSED] No DMA allocations, no DMA32 required [09:51:11] [PASSED] DMA allocations, DMA32 required [09:51:11] [PASSED] No DMA allocations, DMA32 required [09:51:11] [PASSED] DMA allocations, no DMA32 required [09:51:11] ============== [PASSED] ttm_device_init_pools ============== [09:51:11] =================== [PASSED] ttm_device ==================== [09:51:11] ================== ttm_pool (8 subtests) =================== [09:51:11] ================== ttm_pool_alloc_basic =================== [09:51:11] [PASSED] One page [09:51:11] [PASSED] More than one page [09:51:11] [PASSED] Above the allocation limit [09:51:11] [PASSED] One page, with coherent DMA mappings enabled [09:51:11] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [09:51:11] ============== [PASSED] ttm_pool_alloc_basic =============== [09:51:11] ============== ttm_pool_alloc_basic_dma_addr ============== [09:51:11] [PASSED] One page [09:51:11] [PASSED] More than one page [09:51:11] [PASSED] Above the allocation limit [09:51:11] [PASSED] One page, with coherent DMA mappings enabled [09:51:11] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [09:51:11] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [09:51:11] [PASSED] ttm_pool_alloc_order_caching_match [09:51:11] [PASSED] ttm_pool_alloc_caching_mismatch [09:51:11] [PASSED] ttm_pool_alloc_order_mismatch [09:51:11] [PASSED] ttm_pool_free_dma_alloc [09:51:11] [PASSED] ttm_pool_free_no_dma_alloc [09:51:11] [PASSED] ttm_pool_fini_basic [09:51:11] ==================== [PASSED] ttm_pool ===================== [09:51:11] ================ ttm_resource (8 subtests) ================= [09:51:11] ================= ttm_resource_init_basic ================= [09:51:11] [PASSED] Init resource in TTM_PL_SYSTEM [09:51:11] [PASSED] Init resource in TTM_PL_VRAM [09:51:11] [PASSED] Init resource in a private placement [09:51:11] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [09:51:11] ============= [PASSED] ttm_resource_init_basic ============= [09:51:11] [PASSED] ttm_resource_init_pinned [09:51:11] [PASSED] ttm_resource_fini_basic [09:51:11] [PASSED] ttm_resource_manager_init_basic [09:51:11] [PASSED] ttm_resource_manager_usage_basic [09:51:11] [PASSED] ttm_resource_manager_set_used_basic [09:51:11] [PASSED] ttm_sys_man_alloc_basic [09:51:11] [PASSED] ttm_sys_man_free_basic [09:51:11] ================== [PASSED] ttm_resource =================== [09:51:11] =================== ttm_tt (15 subtests) =================== [09:51:11] ==================== ttm_tt_init_basic ==================== [09:51:11] [PASSED] Page-aligned size [09:51:11] [PASSED] Extra pages requested [09:51:11] ================ [PASSED] ttm_tt_init_basic ================ [09:51:11] [PASSED] ttm_tt_init_misaligned [09:51:11] [PASSED] ttm_tt_fini_basic [09:51:11] [PASSED] ttm_tt_fini_sg [09:51:11] [PASSED] ttm_tt_fini_shmem [09:51:11] [PASSED] ttm_tt_create_basic [09:51:11] [PASSED] ttm_tt_create_invalid_bo_type [09:51:11] [PASSED] ttm_tt_create_ttm_exists [09:51:11] [PASSED] ttm_tt_create_failed [09:51:11] [PASSED] ttm_tt_destroy_basic [09:51:11] [PASSED] ttm_tt_populate_null_ttm [09:51:11] [PASSED] ttm_tt_populate_populated_ttm [09:51:11] [PASSED] ttm_tt_unpopulate_basic [09:51:11] [PASSED] ttm_tt_unpopulate_empty_ttm [09:51:11] [PASSED] ttm_tt_swapin_basic [09:51:11] ===================== [PASSED] ttm_tt ====================== [09:51:11] =================== ttm_bo (14 subtests) =================== [09:51:11] =========== ttm_bo_reserve_optimistic_no_ticket =========== [09:51:11] [PASSED] Cannot be interrupted and sleeps [09:51:11] [PASSED] Cannot be interrupted, locks straight away [09:51:11] [PASSED] Can be interrupted, sleeps [09:51:11] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [09:51:11] [PASSED] ttm_bo_reserve_locked_no_sleep [09:51:11] [PASSED] ttm_bo_reserve_no_wait_ticket [09:51:11] [PASSED] ttm_bo_reserve_double_resv [09:51:11] [PASSED] ttm_bo_reserve_interrupted [09:51:11] [PASSED] ttm_bo_reserve_deadlock [09:51:11] [PASSED] ttm_bo_unreserve_basic [09:51:11] [PASSED] ttm_bo_unreserve_pinned [09:51:11] [PASSED] ttm_bo_unreserve_bulk [09:51:11] [PASSED] ttm_bo_fini_basic [09:51:11] [PASSED] ttm_bo_fini_shared_resv [09:51:11] [PASSED] ttm_bo_pin_basic [09:51:11] [PASSED] ttm_bo_pin_unpin_resource [09:51:11] [PASSED] ttm_bo_multiple_pin_one_unpin [09:51:11] ===================== [PASSED] ttm_bo ====================== [09:51:11] ============== ttm_bo_validate (22 subtests) =============== [09:51:11] ============== ttm_bo_init_reserved_sys_man =============== [09:51:11] [PASSED] Buffer object for userspace [09:51:11] [PASSED] Kernel buffer object [09:51:11] [PASSED] Shared buffer object [09:51:11] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [09:51:11] ============== ttm_bo_init_reserved_mock_man ============== [09:51:11] [PASSED] Buffer object for userspace [09:51:11] [PASSED] Kernel buffer object [09:51:11] [PASSED] Shared buffer object [09:51:11] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [09:51:11] [PASSED] ttm_bo_init_reserved_resv [09:51:11] ================== ttm_bo_validate_basic ================== [09:51:11] [PASSED] Buffer object for userspace [09:51:11] [PASSED] Kernel buffer object [09:51:11] [PASSED] Shared buffer object [09:51:11] ============== [PASSED] ttm_bo_validate_basic ============== [09:51:11] [PASSED] ttm_bo_validate_invalid_placement [09:51:11] ============= ttm_bo_validate_same_placement ============== [09:51:11] [PASSED] System manager [09:51:11] [PASSED] VRAM manager [09:51:11] ========= [PASSED] ttm_bo_validate_same_placement ========== [09:51:11] [PASSED] ttm_bo_validate_failed_alloc [09:51:11] [PASSED] ttm_bo_validate_pinned [09:51:11] [PASSED] ttm_bo_validate_busy_placement [09:51:11] ================ ttm_bo_validate_multihop ================= [09:51:11] [PASSED] Buffer object for userspace [09:51:11] [PASSED] Kernel buffer object [09:51:11] [PASSED] Shared buffer object [09:51:11] ============ [PASSED] ttm_bo_validate_multihop ============= [09:51:11] ========== ttm_bo_validate_no_placement_signaled ========== [09:51:11] [PASSED] Buffer object in system domain, no page vector [09:51:11] [PASSED] Buffer object in system domain with an existing page vector [09:51:11] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [09:51:11] ======== ttm_bo_validate_no_placement_not_signaled ======== [09:51:11] [PASSED] Buffer object for userspace [09:51:11] [PASSED] Kernel buffer object [09:51:11] [PASSED] Shared buffer object [09:51:11] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [09:51:11] [PASSED] ttm_bo_validate_move_fence_signaled [09:51:11] ========= ttm_bo_validate_move_fence_not_signaled ========= [09:51:11] [PASSED] Waits for GPU [09:51:11] [PASSED] Tries to lock straight away [09:51:11] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [09:51:11] [PASSED] ttm_bo_validate_swapout [09:51:11] [PASSED] ttm_bo_validate_happy_evict [09:51:11] [PASSED] ttm_bo_validate_all_pinned_evict [09:51:11] [PASSED] ttm_bo_validate_allowed_only_evict [09:51:11] [PASSED] ttm_bo_validate_deleted_evict [09:51:11] [PASSED] ttm_bo_validate_busy_domain_evict [09:51:11] [PASSED] ttm_bo_validate_evict_gutting [09:51:11] [PASSED] ttm_bo_validate_recrusive_evict stty: 'standard input': Inappropriate ioctl for device [09:51:11] ================= [PASSED] ttm_bo_validate ================= [09:51:11] ============================================================ [09:51:11] Testing complete. Ran 102 tests: passed: 102 [09:51:11] Elapsed time: 11.520s total, 1.693s configuring, 9.611s building, 0.179s running + cleanup ++ stat -c %u:%g /kernel + chown -R 1003:1003 /kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2026-04-01 0:39 UTC | newest] Thread overview: 25+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-31 9:20 [PATCH 0/5] drm/exec: drm_exec polishing Thomas Hellström 2026-03-31 9:20 ` [PATCH 1/5] drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse] Thomas Hellström 2026-03-31 9:29 ` Christian König 2026-03-31 9:20 ` [PATCH 2/5] drm/msm: Remove abuse of drm_exec internals Thomas Hellström 2026-03-31 9:30 ` Christian König 2026-03-31 9:36 ` Christian König 2026-03-31 19:08 ` Rob Clark 2026-03-31 19:52 ` Thomas Hellström 2026-03-31 20:39 ` Rob Clark 2026-03-31 9:20 ` [PATCH 3/5] drm/exec: Make the drm_exec_until_all_locked() macro more readable Thomas Hellström 2026-03-31 9:39 ` Christian König 2026-03-31 11:03 ` Thomas Hellström 2026-03-31 9:20 ` [PATCH 4/5] drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer Thomas Hellström 2026-03-31 9:44 ` Christian König 2026-03-31 10:13 ` Thomas Hellström 2026-03-31 11:09 ` Thomas Hellström 2026-03-31 11:59 ` Christian König 2026-03-31 9:20 ` [PATCH 5/5] drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket Thomas Hellström 2026-03-31 9:46 ` Christian König 2026-03-31 10:18 ` Thomas Hellström 2026-03-31 21:46 ` kernel test robot 2026-03-31 22:07 ` kernel test robot 2026-04-01 0:38 ` kernel test robot 2026-03-31 9:49 ` ✗ CI.checkpatch: warning for drm/exec: drm_exec polishing Patchwork 2026-03-31 9:51 ` ✓ CI.KUnit: success " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox