On 6/3/26 18:33, Srinivasan Shanmugam wrote: > Store the queue id (qid) in the queue object during creation. > > This keeps a stable queue identifier instead of relying on > doorbell_index.
Exactly that's the point why we don't store the queue id here, it is *NOT* a stable identifier and only suitable for the UAPI. Regards, Christian. > > Cc: Alex Deucher <[email protected]> > Cc: Christian König <[email protected]> > Signed-off-by: Srinivasan Shanmugam <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 ++ > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > index 93e9cef9856e..d5ea69e7a67c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > @@ -720,6 +720,8 @@ amdgpu_userq_create(struct drm_file *filp, union > drm_amdgpu_userq *args) > return r; > } > > + queue->qid = qid; > + > amdgpu_debugfs_userq_init(filp, queue, qid); > args->out.queue_id = qid; > return 0; > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h > b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h > index baafa066097e..185ba0d76aba 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h > @@ -54,6 +54,7 @@ struct amdgpu_usermode_queue { > uint64_t doorbell_handle; > uint64_t doorbell_index; > uint64_t flags; > + u32 qid; > struct amdgpu_mqd_prop *userq_prop; > struct amdgpu_userq_mgr *userq_mgr; > struct amdgpu_vm *vm;
