Skip to content
Snippets Groups Projects
  • Shashank Sharma's avatar
    3cd2230b
    drm/amdgpu: add new IOCTL for usermode queue · 3cd2230b
    Shashank Sharma authored
    
    This patch adds:
    - A new IOCTL function to create and destroy
    - A new structure to keep all the user queue data in one place.
    - A function to generate unique index for the queue.
    
    V1: Worked on review comments from RFC patch series:
      - Alex: Keep a list of queues, instead of single queue per process.
      - Christian: Use the queue manager instead of global ptrs,
               Don't keep the queue structure in amdgpu_ctx
    
    V2: Worked on review comments:
     - Christian:
       - Formatting of text
       - There is no need for queuing of userqueues, with idr in place
     - Alex:
       - Remove use_doorbell, its unnecessary
       - Reuse amdgpu_mqd_props for saving mqd fields
    
     - Code formatting and re-arrangement
    
    V3:
     - Integration with doorbell manager
    
    V4:
     - Accommodate MQD union related changes in UAPI (Alex)
     - Do not set the queue size twice (Bas)
    
    V5:
     - Remove wrapper functions for queue indexing (Christian)
     - Do not save the queue id/idr in queue itself (Christian)
     - Move the idr allocation in the IP independent generic space
      (Christian)
    
    V6:
     - Check the validity of input IP type (Christian)
    
    V7:
     - Move uq_func from uq_mgr to adev (Alex)
     - Add missing free(queue) for error cases (Yifan)
    
    V9:
     - Rebase
    
    V10: Addressed review comments from Christian, and added R-B:
     - Do not initialize the local variable
     - Convert DRM_ERROR to DEBUG.
    
    V11:
      - check the input flags to be zero (Alex)
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Christian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarChristian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    3cd2230b
    History
    drm/amdgpu: add new IOCTL for usermode queue
    Shashank Sharma authored
    
    This patch adds:
    - A new IOCTL function to create and destroy
    - A new structure to keep all the user queue data in one place.
    - A function to generate unique index for the queue.
    
    V1: Worked on review comments from RFC patch series:
      - Alex: Keep a list of queues, instead of single queue per process.
      - Christian: Use the queue manager instead of global ptrs,
               Don't keep the queue structure in amdgpu_ctx
    
    V2: Worked on review comments:
     - Christian:
       - Formatting of text
       - There is no need for queuing of userqueues, with idr in place
     - Alex:
       - Remove use_doorbell, its unnecessary
       - Reuse amdgpu_mqd_props for saving mqd fields
    
     - Code formatting and re-arrangement
    
    V3:
     - Integration with doorbell manager
    
    V4:
     - Accommodate MQD union related changes in UAPI (Alex)
     - Do not set the queue size twice (Bas)
    
    V5:
     - Remove wrapper functions for queue indexing (Christian)
     - Do not save the queue id/idr in queue itself (Christian)
     - Move the idr allocation in the IP independent generic space
      (Christian)
    
    V6:
     - Check the validity of input IP type (Christian)
    
    V7:
     - Move uq_func from uq_mgr to adev (Alex)
     - Add missing free(queue) for error cases (Yifan)
    
    V9:
     - Rebase
    
    V10: Addressed review comments from Christian, and added R-B:
     - Do not initialize the local variable
     - Convert DRM_ERROR to DEBUG.
    
    V11:
      - check the input flags to be zero (Alex)
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Christian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarChristian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>