drm/amdgpu: Add kfd2kgd APIs for dumping HQDs
This can be used by KFD for debugging features, such as dumping HQDs in debugfs. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:

committed by
Oded Gabbay

parent
fdcba29c5d
commit
80c195f5c2
@@ -131,6 +131,12 @@ struct tile_config {
|
||||
* @hqd_sdma_load: Loads the SDMA mqd structure to a H/W SDMA hqd slot.
|
||||
* used only for no HWS mode.
|
||||
*
|
||||
* @hqd_dump: Dumps CPC HQD registers to an array of address-value pairs.
|
||||
* Array is allocated with kmalloc, needs to be freed with kfree by caller.
|
||||
*
|
||||
* @hqd_sdma_dump: Dumps SDMA HQD registers to an array of address-value pairs.
|
||||
* Array is allocated with kmalloc, needs to be freed with kfree by caller.
|
||||
*
|
||||
* @hqd_is_occupies: Checks if a hqd slot is occupied.
|
||||
*
|
||||
* @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot.
|
||||
@@ -187,6 +193,14 @@ struct kfd2kgd_calls {
|
||||
int (*hqd_sdma_load)(struct kgd_dev *kgd, void *mqd,
|
||||
uint32_t __user *wptr, struct mm_struct *mm);
|
||||
|
||||
int (*hqd_dump)(struct kgd_dev *kgd,
|
||||
uint32_t pipe_id, uint32_t queue_id,
|
||||
uint32_t (**dump)[2], uint32_t *n_regs);
|
||||
|
||||
int (*hqd_sdma_dump)(struct kgd_dev *kgd,
|
||||
uint32_t engine_id, uint32_t queue_id,
|
||||
uint32_t (**dump)[2], uint32_t *n_regs);
|
||||
|
||||
bool (*hqd_is_occupied)(struct kgd_dev *kgd, uint64_t queue_address,
|
||||
uint32_t pipe_id, uint32_t queue_id);
|
||||
|
||||
|
Reference in New Issue
Block a user