drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file
Subsystems (2)
PATCH 1/1 drm/amdgpu: add kernel DOC for ioctls in amdgpu_cs.c file
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 142 +++++++++++++++++++++++++ 1 file changed, 142 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +142 -0
@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; } +/** +* DOC: amdgpu_cs_ioctl +* +* This ioctl processes user space command submission chunks, +* return a fence sequence number associated to a amdgpu fence. +* +* In data structure: +* +* __u32 ctx_id: +* Integer ID, created via DRM_AMDGPU_CTX ioctl call when user space +* command submission context created. It will be used as ID for later +* command submission context. +* +* __u32 bo_list_handle: +* Handle of resources list associated with this CS, created via +* DRM_AMDGPU_BO_LIST ioctl call before command submission, and +* the BOs in the list will be validated. +* +* __u32 num_chunks: +* Number of chunks, their types include: +* AMDGPU_CHUNK_ID_IB +* The data will be filled into IB buffer, and mappped to a HW ring. +* +* AMDGPU_CHUNK_ID_FENCE +* The data will be used to find user fence BO and its offset. +* +* AMDGPU_CHUNK_ID_DEPENDENCIES +* AMDGPU_CHUNK_ID_SYNCOBJ_IN +* AMDGPU_CHUNK_ID_SYNCOBJ_OUT +* These will be parsed as fence dependencies in given requirement, +* and will be remembered and to be synced later. +* +* __u32 _pad: +* +* __u64 chunks: +* Point to the CS chunks. +* +* amdgpu_cs_submit() function will be called to initialize a scheduler +* job, and associate it to a HW ring, add a new fence to the context, +* and then push the job to the queue for scheduler to process, +* it will return fence sequence number to user space. +* +*/ int amdgpu_cs_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {struct amdgpu_device *adev = dev->dev_private;
@@ -1272,6 +1315,38 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)return r; } +/** +* DOC: amdgpu_cs_wait_ioctl +* +* This ioctl checks a user space fence associated to a amdgpu fence whether +* it's signaled or waits to be signaled till timeout with kernel dma fence. +* Once signaled, the associated CS is completed. +* +* In data structure: +* +* __u64 handle: +* The fence sequence number from amdgpu_cs_ioctl returned. +* +* __u64 timeout: +* Absolute timeout to wait. +* +* __u32 ip_type: +* __u32 ip_instance: +* __u32 ring: +* Map user space ring to a kernel HW ring, then use the seq(handle) to +* find the amdgpu fence, that will be checked and waited. +* +* __u32 ctx_id: +* ID for command submission context +* +* Out data: +* +* __u64 status: +* 0 CS completed +* 1 CS busy +* +*/ +/** * amdgpu_cs_wait_ioctl - wait for a command submission to finish *
@@ -1358,6 +1433,37 @@ static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev,return fence; } +/** +* DOC: amdgpu_cs_fence_to_handle_ioctl +* +* This ioctl converts a user space fence into a fence object handle or fd, +* or file fd based on the purpose in “what”, since using handles or fd will +* be more efficient than ioctl call from user space to check signaled. +* +* In data structure: +* +* struct drm_amdgpu_fence fence: +* User space fence structured with ctx_id, ip_type, ip_instance, ring, seq_no +* +* __u32 what: +* Types of handle to convert include: +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ +* It is required to return a process-dependent handle for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD +* It is required to return a process-independent fd for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD +* It is required to return a process-independent fd to a sync file +* +* __u32 pad +* +* Out data: +* __u32 handle: +* Handle to be returned to user space +* +*/ int amdgpu_cs_fence_to_handle_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {
@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,return r; } +/** +* DOC: amdgpu_cs_wait_fences_ioctl +* +* This ioctl checks either all fences or any fence from multiple fences +* to be signaled or waits to be signaled till timeout. So it's used to +* check and wait multiple CS to be completed. +* +* In data structure: +* +* __u64 fences +* Point to the multiple fences +* +* __u32 fence_count +* number of fences +* +* __u32 wait_all +* ways to wait either wait_all or wait_any +* +* __u64 timeout_ns +* Absolute timeout to wait +* +* The function will extract user space fences based on pointer and counts, +* then mapping them amdgpu fences and check if they are signaled or wait +* to timeout. +* +* Out data: +* +*__u32 status +* 0 CS completed +* 1 CS busy +* +*__u32 first_signaled; +* First signaled fence index +* +*/ +/** * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to finish *
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Alex Deucher
Reviewed-byQuoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>
A few comments below about readability. With those fixed:
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 142 +++++++++++++++++++++++++ 1 file changed, 142 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1223
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; } +/** +* DOC: amdgpu_cs_ioctl +* +* This ioctl processes user space command submission chunks,
Maybe give an overview of why we use the ioctl. Something like:
The CS (Command Submission) ioctl is used to submit command buffers to the kernel for scheduling on hw queues. The chunk interface gives us the flexibility to add new features to the ioctl by simply adding a new chunk type.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1231
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +8
-0+* return a fence sequence number associated to a amdgpu fence. +* +* In data structure: +* +* __u32 ctx_id: +* Integer ID, created via DRM_AMDGPU_CTX ioctl call when user space +* command submission context created. It will be used as ID for later +* command submission context.
Required for all command submissions. The kernel uses this to track dependencies and guilt for command submissions that lead to an engine lock up.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1236
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0+* +* __u32 bo_list_handle: +* Handle of resources list associated with this CS, created via +* DRM_AMDGPU_BO_LIST ioctl call before command submission, and +* the BOs in the list will be validated.
to make sure they are resident when the command buffer executes.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1242
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0+* +* __u32 num_chunks: +* Number of chunks, their types include: +* AMDGPU_CHUNK_ID_IB +* The data will be filled into IB buffer, and mappped to a HW ring. +*
Expand this a bit. E.g.,
An IB (Indirect Buffer) is a stand alone command buffer that can be scheduled fetching for execution on a hw queue.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1245
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-0+* AMDGPU_CHUNK_ID_FENCE +* The data will be used to find user fence BO and its offset. +*
Expand this a bit. E.g., add something like:
Allows user space to specify their own fences within the command stream.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1255
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +10
-0+* AMDGPU_CHUNK_ID_DEPENDENCIES +* AMDGPU_CHUNK_ID_SYNCOBJ_IN +* AMDGPU_CHUNK_ID_SYNCOBJ_OUT +* These will be parsed as fence dependencies in given requirement, +* and will be remembered and to be synced later. +* +* __u32 _pad: +* +* __u64 chunks: +* Point to the CS chunks.
Pointer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1258
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-0+* +* amdgpu_cs_submit() function will be called to initialize a scheduler +* job, and associate it to a HW ring, add a new fence to the context,
associate it with a
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4
-0+* and then push the job to the queue for scheduler to process, +* it will return fence sequence number to user space. +* +*/ int amdgpu_cs_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {struct amdgpu_device *adev = dev->dev_private;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · line 1322
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0@@ -1272,6 +1315,38 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)return r; } +/** +* DOC: amdgpu_cs_wait_ioctl +* +* This ioctl checks a user space fence associated to a amdgpu fence whether +* it's signaled or waits to be signaled till timeout with kernel dma fence.
This reads sort of oddly. how about:
The CS (Command Submission) wait ioctl waits for the specified fence on the specified hw queue to signal or for the timeout, whichever comes first.
Quoted 31 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +27
-0+* Once signaled, the associated CS is completed. +* +* In data structure: +* +* __u64 handle: +* The fence sequence number from amdgpu_cs_ioctl returned. +* +* __u64 timeout: +* Absolute timeout to wait. +* +* __u32 ip_type: +* __u32 ip_instance: +* __u32 ring: +* Map user space ring to a kernel HW ring, then use the seq(handle) to +* find the amdgpu fence, that will be checked and waited. +* +* __u32 ctx_id: +* ID for command submission context +* +* Out data: +* +* __u64 status: +* 0 CS completed +* 1 CS busy +* +*/ +/** * amdgpu_cs_wait_ioctl - wait for a command submission to finish *
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev, · line 1441
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0@@ -1358,6 +1433,37 @@ static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev,return fence; } +/** +* DOC: amdgpu_cs_fence_to_handle_ioctl +* +* This ioctl converts a user space fence into a fence object handle or fd, +* or file fd based on the purpose in “what”, since using handles or fd will +* be more efficient than ioctl call from user space to check signaled.
This reads sort of oddly. how about:
The CS (Command Submission) fence to handle ioctl converts a CS fence into a drm sync object as specified in the what parameter.
Quoted 29 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +25
-0+* +* In data structure: +* +* struct drm_amdgpu_fence fence: +* User space fence structured with ctx_id, ip_type, ip_instance, ring, seq_no +* +* __u32 what: +* Types of handle to convert include: +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ +* It is required to return a process-dependent handle for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD +* It is required to return a process-independent fd for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD +* It is required to return a process-independent fd to a sync file +* +* __u32 pad +* +* Out data: +* __u32 handle: +* Handle to be returned to user space +* +*/ int amdgpu_cs_fence_to_handle_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1638
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,return r; } +/** +* DOC: amdgpu_cs_wait_fences_ioctl +* +* This ioctl checks either all fences or any fence from multiple fences +* to be signaled or waits to be signaled till timeout. So it's used to +* check and wait multiple CS to be completed.
This reads sort of oddly. how about:
The CS (Command Submission) wait fences ioctl is an extended version of the CS wait ioctl that allows the user to specify multiple fences and wait for all or any of them to signal or for the timeout, whichever comes first.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1643
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0+* +* In data structure: +* +* __u64 fences +* Point to the multiple fences
Pointer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1656
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +13
-0+* +* __u32 fence_count +* number of fences +* +* __u32 wait_all +* ways to wait either wait_all or wait_any +* +* __u64 timeout_ns +* Absolute timeout to wait +* +* The function will extract user space fences based on pointer and counts, +* then mapping them amdgpu fences and check if they are signaled or wait +* to timeout.
This reads sort of oddly. how about:
This function extracts fences based on pointer and count specified and waits for them to signal or timeout.
Quoted 18 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +12
-1+* +* Out data: +* +*__u32 status +* 0 CS completed +* 1 CS busy +* +*__u32 first_signaled; +* First signaled fence index +* +*/ +/** * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to finish * -- 2.17.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_ObP8Wg69Pr20t+Wb1ggFTt70BcTciWq7EtoAceR=BqYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 7 lines · Alex Deucher
Quoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>A few comments below about readability. With those fixed:
Reviewed-by Alex Deucher <[email protected]>
Thanks for the reviews, I will update it accordingly.
Leo
Quoted 232 lines
Quoted 10 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 142 +++++++++++++++++++++++++ 1 file changed, 142 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1223
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; } +/** +* DOC: amdgpu_cs_ioctl +* +* This ioctl processes user space command submission chunks, Maybe give an overview of why we use the ioctl. Something like:
The CS (Command Submission) ioctl is used to submit command buffers to the kernel for scheduling on hw queues. The chunk interface gives us the flexibility to add new features to the ioctl by simply adding a new chunk type.drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1231
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +8
-0+* return a fence sequence number associated to a amdgpu fence. +* +* In data structure: +* +* __u32 ctx_id: +* Integer ID, created via DRM_AMDGPU_CTX ioctl call when user space +* command submission context created. It will be used as ID for later +* command submission context. Required for all command submissions. The kernel uses this to track dependencies and guilt for command submissions that lead to an engine lock up.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1236
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0+* +* __u32 bo_list_handle: +* Handle of resources list associated with this CS, created via +* DRM_AMDGPU_BO_LIST ioctl call before command submission, and +* the BOs in the list will be validated. to make sure they are resident when the command buffer executes.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1242
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0+* +* __u32 num_chunks: +* Number of chunks, their types include: +* AMDGPU_CHUNK_ID_IB +* The data will be filled into IB buffer, and mappped to a HW ring. +* Expand this a bit. E.g.,
An IB (Indirect Buffer) is a stand alone command buffer that can be scheduled fetching for execution on a hw queue.drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1245
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-0+* AMDGPU_CHUNK_ID_FENCE +* The data will be used to find user fence BO and its offset. +* Expand this a bit. E.g., add something like:
Allows user space to specify their own fences within the command stream.drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1255
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +10
-0+* AMDGPU_CHUNK_ID_DEPENDENCIES +* AMDGPU_CHUNK_ID_SYNCOBJ_IN +* AMDGPU_CHUNK_ID_SYNCOBJ_OUT +* These will be parsed as fence dependencies in given requirement, +* and will be remembered and to be synced later. +* +* __u32 _pad: +* +* __u64 chunks: +* Point to the CS chunks. Pointer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1258
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-0+* +* amdgpu_cs_submit() function will be called to initialize a scheduler +* job, and associate it to a HW ring, add a new fence to the context, associate it with a
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4
-0+* and then push the job to the queue for scheduler to process, +* it will return fence sequence number to user space. +* +*/ int amdgpu_cs_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {struct amdgpu_device *adev = dev->dev_private;drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · line 1322
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0@@ -1272,6 +1315,38 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)return r; } +/** +* DOC: amdgpu_cs_wait_ioctl +* +* This ioctl checks a user space fence associated to a amdgpu fence whether +* it's signaled or waits to be signaled till timeout with kernel dma fence. This reads sort of oddly. how about:
The CS (Command Submission) wait ioctl waits for the specified fence on the specified hw queue to signal or for the timeout, whichever comes first.Quoted 31 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +27
-0+* Once signaled, the associated CS is completed. +* +* In data structure: +* +* __u64 handle: +* The fence sequence number from amdgpu_cs_ioctl returned. +* +* __u64 timeout: +* Absolute timeout to wait. +* +* __u32 ip_type: +* __u32 ip_instance: +* __u32 ring: +* Map user space ring to a kernel HW ring, then use the seq(handle) to +* find the amdgpu fence, that will be checked and waited. +* +* __u32 ctx_id: +* ID for command submission context +* +* Out data: +* +* __u64 status: +* 0 CS completed +* 1 CS busy +* +*/ +/** * amdgpu_cs_wait_ioctl - wait for a command submission to finish * drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev, · line 1441
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0@@ -1358,6 +1433,37 @@ static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev,return fence; } +/** +* DOC: amdgpu_cs_fence_to_handle_ioctl +* +* This ioctl converts a user space fence into a fence object handle or fd, +* or file fd based on the purpose in “what”, since using handles or fd will +* be more efficient than ioctl call from user space to check signaled. This reads sort of oddly. how about:
The CS (Command Submission) fence to handle ioctl converts a CS fence into a drm sync object as specified in the what parameter.Quoted 29 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +25
-0+* +* In data structure: +* +* struct drm_amdgpu_fence fence: +* User space fence structured with ctx_id, ip_type, ip_instance, ring, seq_no +* +* __u32 what: +* Types of handle to convert include: +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ +* It is required to return a process-dependent handle for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD +* It is required to return a process-independent fd for a sync object +* +* AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD +* It is required to return a process-independent fd to a sync file +* +* __u32 pad +* +* Out data: +* __u32 handle: +* Handle to be returned to user space +* +*/ int amdgpu_cs_fence_to_handle_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1638
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +6
-0@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,return r; } +/** +* DOC: amdgpu_cs_wait_fences_ioctl +* +* This ioctl checks either all fences or any fence from multiple fences +* to be signaled or waits to be signaled till timeout. So it's used to +* check and wait multiple CS to be completed. This reads sort of oddly. how about:
The CS (Command Submission) wait fences ioctl is an extended version of the CS wait ioctl that allows the user to specify multiple fences and wait for all or any of them to signal or for the timeout, whichever comes first.drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1643
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-0+* +* In data structure: +* +* __u64 fences +* Point to the multiple fences Pointer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1656
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +13
-0+* +* __u32 fence_count +* number of fences +* +* __u32 wait_all +* ways to wait either wait_all or wait_any +* +* __u64 timeout_ns +* Absolute timeout to wait +* +* The function will extract user space fences based on pointer and counts, +* then mapping them amdgpu fences and check if they are signaled or wait +* to timeout. This reads sort of oddly. how about:
This function extracts fences based on pointer and count specified and waits for them to signal or timeout.Quoted 18 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +12
-1+* +* Out data: +* +*__u32 status +* 0 CS completed +* 1 CS busy +* +*__u32 first_signaled; +* First signaled fence index +* +*/ +/** * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to finish * -- 2.17.0
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>
This isn't enough to actually make this part of the generated documentation. It needs to be hooked up to a *.rst file for that.
I'm adding an amdgpu.rst file in
https://patchwork.freedesktop.org/series/44035/ , where you could hook it up accordingly.
Please check that generating the documentation (e.g. with make htmldocs) doesn't produce any warnings about amdgpu_cs.c, and that the result looks good in Documentation/output/gpu/amdgpu.html . The documentation format itself is documented in Documentation/output/doc-guide/index.html .
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1221
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; } +/** +* DOC: amdgpu_cs_ioctl
DOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
Quoted 33 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +29
-0@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,return r; } +/** +* DOC: amdgpu_cs_wait_fences_ioctl +* +* This ioctl checks either all fences or any fence from multiple fences +* to be signaled or waits to be signaled till timeout. So it's used to +* check and wait multiple CS to be completed. +* +* In data structure: +* +* __u64 fences +* Point to the multiple fences +* +* __u32 fence_count +* number of fences +* +* __u32 wait_all +* ways to wait either wait_all or wait_any +* +* __u64 timeout_ns +* Absolute timeout to wait +* +* The function will extract user space fences based on pointer and counts, +* then mapping them amdgpu fences and check if they are signaled or wait +* to timeout. +* +* Out data: +* +*__u32 status +* 0 CS completed
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1671
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +7
-0+* 1 CS busy +* +*__u32 first_signaled; +* First signaled fence index +* +*/ +/** * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to finish *
Any reason for not adding the above to the existing function documentation comment here?
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 4df023fd-bac7-8369-43d7-db329ecb980a-otUistvHUpPR7s880joybQ@public.gmane.org
Quoted 8 lines · Michel Dänzer
Quoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>This isn't enough to actually make this part of the generated documentation. It needs to be hooked up to a *.rst file for that.
Quoted 9 lines
I'm adding an
amdgpu.rstfile in
https://patchwork.freedesktop.org/series/44035/ , where you could hook it up accordingly.Please check that generating the documentation (e.g. with make htmldocs) doesn't produce any warnings about
amdgpu_cs.c, and that the result looks good inDocumentation/output/gpu/amdgpu.html. The documentation format itself is documented inDocumentation/output/doc-guide/index.html.
I will take a look this.
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; }
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1221
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2
-0+/** +* DOC: amdgpu_cs_ioctl DOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Quoted 37 lines
Quoted 37 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +33
-0@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,return r; } +/** +* DOC: amdgpu_cs_wait_fences_ioctl +* +* This ioctl checks either all fences or any fence from multiple fences +* to be signaled or waits to be signaled till timeout. So it's used to +* check and wait multiple CS to be completed. +* +* In data structure: +* +* __u64 fences +* Point to the multiple fences +* +* __u32 fence_count +* number of fences +* +* __u32 wait_all +* ways to wait either wait_all or wait_any +* +* __u64 timeout_ns +* Absolute timeout to wait +* +* The function will extract user space fences based on pointer and counts, +* then mapping them amdgpu fences and check if they are signaled or wait +* to timeout. +* +* Out data: +* +*__u32 status +* 0 CS completed +* 1 CS busy +* +*__u32 first_signaled; +* First signaled fence index
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev, · line 1671
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-0+* +*/ +/** * amdgpu_cs_wait_fences_ioctl - wait for multiple command submissions to finish * Any reason for not adding the above to the existing function documentation comment here?
Yes. It's used by close source Vulkan, where it might be lack of BO fence dependencies implementations like we do in Mesa.
Leo
Quoted 2 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): a672ddb7-136b-ca31-a0cb-382b412ecac4-5C7GfCeVMHo@public.gmane.org
Quoted 35 lines · Leo Liu
Quoted 8 lines · Michel Dänzer
Quoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>This isn't enough to actually make this part of the generated documentation. It needs to be hooked up to a *.rst file for that.
Quoted 9 lines
I'm adding an
amdgpu.rstfile in
https://patchwork.freedesktop.org/series/44035/ , where you could hook it up accordingly.Please check that generating the documentation (e.g. with make htmldocs) doesn't produce any warnings about
amdgpu_cs.c, and that the result looks good inDocumentation/output/gpu/amdgpu.html. The documentation format itself is documented inDocumentation/output/doc-guide/index.html.I will take a look this.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0Quoted 9 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; }+/**
+ * DOC:amdgpu_cs_ioctlDOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
Quoted 52 lines
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Quoted 49 lines
Quoted 39 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1524,6 +1630,42 @@ static int amdgpu_cs_wait_any_fence(structamdgpu_device *adev, return r; }+/**
+ * DOC:amdgpu_cs_wait_fences_ioctl
+ *
+ * This ioctl checks either all fences or any fence from multiple fences
+ * to be signaled or waits to be signaled till timeout. So it's used to
+ * check and wait multiple CS to be completed.
+ *
+ * In data structure:
+ *
+ *__u64fences
+ * Point to the multiple fences
+ *
+ *__u32fence_count
+ * number of fences
+ *
+ *__u32wait_all
+ * ways to wait eitherwait_allorwait_any
+ *
+ *__u64timeout_ns
+ * Absolute timeout to wait
+ *
+ * The function will extract user space fences based on pointer and counts,
+ * then mapping them amdgpu fences and check if they are signaled or wait
+ * to timeout.
+ *
+ * Out data:
+ *
+*__u32status
+ * 0 CS completed
+ * 1 CS busy
+ *Quoted 8 lines
+
*__u32first_signaled;
+ * First signaled fence index
+ *
+ */
+
/**
*amdgpu_cs_wait_fences_ioctl- wait for multiple command submissions to finish *Any reason for not adding the above to the existing function documentation comment here?
The existing is the function document, I am adding kernel doc for this ioctl.
Leo
Quoted 11 lines
Yes. It's used by close source Vulkan, where it might be lack of BO fence dependencies implementations like we do in Mesa.
Leo
Quoted 2 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 17 lines · Leo Liu
Quoted 16 lines · Michel Dänzer
Quoted 11 lines · Leo Liu
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; }+/**
+ * DOC:amdgpu_cs_ioctlDOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
Quoted 3 lines
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Data structures should be documented in comments directly above their definitions, per Documentation/output/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation . What an ioctl does should be described in the function documentation comment above its implementation, as described above.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 3290de06-a110-a80e-d423-ced432893e43-otUistvHUpPR7s880joybQ@public.gmane.org
Quoted 17 lines · Michel Dänzer
Quoted 16 lines · Leo Liu
Quoted 15 lines · Michel Dänzer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct · line 1221
Quoted 11 lines · Leo Liu
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; } +/** +* DOC: amdgpu_cs_ioctl DOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
Quoted 8 lines
Quoted 3 lines
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Data structures should be documented in comments directly above their definitions, per Documentation/output/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation . What an ioctl does should be described in the function documentation comment above its implementation, as described above.
Then what do you think the kernel doc for ioctl should do?
Leo
Quoted 2 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 35e956ae-c151-b26c-fbb0-9f0fd75e353e-5C7GfCeVMHo@public.gmane.org
Quoted 21 lines · Leo Liu
Quoted 20 lines · Michel Dänzer
Quoted 19 lines · Leo Liu
Quoted 15 lines · Michel Dänzer
Quoted 11 lines · Leo Liu
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; }+/**
+ * DOC:amdgpu_cs_ioctlDOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Quoted 7 lines
Quoted 6 lines
Data structures should be documented in comments directly above their definitions, per Documentation/output/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation
. What an ioctl does should be described in the function documentation comment above its implementation, as described above.
Then what do you think the kernel doc for ioctl should do?
The data structure should be documented in a comment above its definition, and what the ioctl does should be documented in a comment above the function implementing it. The source files need to be hooked up to the amdgpu.rst file.
Does that answer your question?
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): f7e7fc54-63a6-a36e-af23-ff246eeb5fcb-otUistvHUpPR7s880joybQ@public.gmane.org
Quoted 28 lines · Michel Dänzer
Quoted 27 lines · Leo Liu
Quoted 26 lines · Michel Dänzer
Quoted 16 lines · Leo Liu
Quoted 15 lines · Michel Dänzer
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct · line 1221
Quoted 11 lines · Leo Liu
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; } +/** +* DOC: amdgpu_cs_ioctl DOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
Quoted 3 lines
This doc is not for the functions, it's like something in commit message about the details of in/out data, and what is the functionality for this ioctl.
Data structures should be documented in comments directly above their definitions, per Documentation/output/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation
. What an ioctl does should be described in the function documentation comment above its implementation, as described above.
Quoted 7 lines
Quoted 1 line
Then what do you think the kernel doc for ioctl should do?
The data structure should be documented in a comment above its definition, and what the ioctl does should be documented in a comment above the function implementing it. The source files need to be hooked up to the
amdgpu.rstfile.Does that answer your question?
Sort of. It tells me what should not be in the kernel DOC. I will put those details about data and functionalities where they should be. And focus on what the ioctl is used for for the kernel DOC section.
Thanks Michel, the information is helpful.
Leo
Quoted 2 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 5c0b7f2a-906b-961f-092c-f64c3f14f95a-5C7GfCeVMHo@public.gmane.org
Quoted 38 lines · Leo Liu
Quoted 37 lines · Michel Dänzer
Quoted 23 lines · Leo Liu
Quoted 22 lines · Michel Dänzer
Quoted 21 lines · Leo Liu
Quoted 15 lines · Michel Dänzer
Quoted 11 lines · Leo Liu
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, return 0; }+/**
+ * DOC:amdgpu_cs_ioctlDOC comments shouldn't be used for functions, see Documentation/output/doc-guide/kernel-doc.html#function-documentation
This doc is not for the functions, it's like something in commit message
about the details of in/out data, and what is the functionality for this
ioctl.Quoted 8 lines
Quoted 7 lines
Data structures should be documented in comments directly above their definitions, per Documentation/output/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation
. What an ioctl does should be described in the function documentation comment above its implementation, as described above.
Then what do you think the kernel doc for ioctl should do?
The data structure should be documented in a comment above its definition, and what the ioctl does should be documented in a comment above the function implementing it. The source files need to be hooked up to the
amdgpu.rstfile.
Quoted 4 lines
Quoted 1 line
Does that answer your question?
Sort of. It tells me what should not be in the kernel DOC. I will put those details about data and functionalities where they should be. And focus on what the ioctl is used for for the kernel DOC section.
I'm afraid I don't see DOC comments being useful for documenting ioctls. They're for general/overview kind of documentation. For ioctls, the data structure and function documentation comments should be sufficient. You can reference a data structure in a function documentation comment like this:
/**
* amdgpu_cs_ioctl - ...
* @...: ...
*
* ...
*
* The userspace parameters for this ioctl are passed in via
* &drm_amdgpu_cs.
*
* Returns:
* ...
*/
See e.g. the documentation about i915_gem_get/set_tiling_ioctl in drivers/gpu/drm/i915/i915_gem_tiling.c.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Michel Dänzer
Quoted 3 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Quoted 8 lines
Quoted 1 line
Signed-off-by Leo Liu <[email protected]>This isn't enough to actually make this part of the generated documentation. It needs to be hooked up to a *.rst file for that.
I'm adding an
amdgpu.rstfile in
https://patchwork.freedesktop.org/series/44035/ , where you could hook it up accordingly.
Michel, have you submitted this one? So we can hook up the files gradually. I do not see the patches in this list.
Sam
Quoted 7 lines
Please check that generating the documentation (e.g. with make htmldocs) doesn't produce any warnings about
amdgpu_cs.c, and that the result looks good inDocumentation/output/gpu/amdgpu.html. The documentation format itself is documented inDocumentation/output/doc-guide/index.html.
[...]
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 4d5dac06-d400-af89-f224-9b5920407460-5C7GfCeVMHo@public.gmane.org
I can see them now.
Sam
Quoted 11 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Samuel Li
Sent: Friday, June 01, 2018 5:10 PM
To: Michel Dänzer <[email protected]>; Liu, Leo <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: add kernel DOC for ioctls inamdgpu_cs.cfile
Quoted 10 lines
Quoted 9 lines · Michel Dänzer
Quoted 4 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>This isn't enough to actually make this part of the generated documentation. It needs to be hooked up to a *.rst file for that.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 42 lines · Leo Liu
There are four ioctls in this files, and DOC gives details of data structures for each of ioctls, and their functionalities.
Signed-off-by Leo Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 142 +++++++++++++++++++++++++ 1 file changed, 142 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +26
-0@@ -1217,6 +1217,49 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,return 0 ; } +/** +* DOC: amdgpu_cs_ioctl +* +* This ioctl processes user space command submission chunks, +* return a fence sequence number associated to a amdgpu fence. +* +* In data structure: +* +* __u32 ctx_id: +* Integer ID, created via DRM_AMDGPU_CTX ioctl call when user space +* command submission context created. It will be used as ID for later +* command submission context. +* +* __u32 bo_list_handle: +* Handle of resources list associated with this CS, created via +* DRM_AMDGPU_BO_LIST ioctl call before command submission, and +* the BOs in the list will be validated. +* +* __u32 num_chunks: +* Number of chunks, their types include: +* AMDGPU_CHUNK_ID_IB +* The data will be filled into IB buffer, and mappped to a HW ring. +* +* AMDGPU_CHUNK_ID_FENCE +* The data will be used to find user fence BO and its offset. +*
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · line 1255
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +10
-0+* AMDGPU_CHUNK_ID_DEPENDENCIES +* AMDGPU_CHUNK_ID_SYNCOBJ_IN +* AMDGPU_CHUNK_ID_SYNCOBJ_OUT +* These will be parsed as fence dependencies in given requirement, +* and will be remembered and to be synced later. +* +* __u32 _pad: +* +* __u64 chunks: +* Point to the CS chunks.
BTW, this kind of formatting isn't preserved in the generated documentation, so it probably won't look as intended.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx