diff options
author | Ben Goz | 2014-07-16 23:36:17 +0200 |
---|---|---|
committer | Oded Gabbay | 2014-07-16 23:36:17 +0200 |
commit | 6e99df5741b3332dcceb86915b2818af640c51f9 (patch) | |
tree | b4b70d3fda87cfd7d16ad39882b29b9dcc53a63d /drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |
parent | amdkfd: Add queue module (diff) | |
download | kernel-qcow2-linux-6e99df5741b3332dcceb86915b2818af640c51f9.tar.gz kernel-qcow2-linux-6e99df5741b3332dcceb86915b2818af640c51f9.tar.xz kernel-qcow2-linux-6e99df5741b3332dcceb86915b2818af640c51f9.zip |
amdkfd: Add mqd_manager module
The mqd_manager module handles MQD data structures.
MQD stands for Memory Queue Descriptor, which is used by the H/W to
keep the usermode queue state in memory.
v3:
Removed new typedefs
Removed pragma pack 4
Remove cik_mqds.h file
Changed lower_32/upper_32 calls to use linux macros
Used new gart allocation functions
Added documentation
v4:
Added missing initialization of the addr field in init_mqd()
Setting the hqd persistent.preload_req bit ON so that when queues switches
on/off, their context will kept and read from the mqd when the cp reassign
them, and thus the dispatched workload context kept consistent without any
interrupts.
v5:
Move amdkfd from drm/radeon/ to drm/amd/
Change format of mqd structure to match latest KV firmware
Add support for AQL queues creation to enable working with open-source HSA
runtime.
Various fixes
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_priv.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 5f6f13d1a20d..0eb20322f374 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -119,6 +119,11 @@ void kfd_chardev_exit(void); struct device *kfd_chardev(void); +enum kfd_preempt_type { + KFD_PREEMPT_TYPE_WAVEFRONT, + KFD_PREEMPT_TYPE_WAVEFRONT_RESET +}; + /** * enum kfd_queue_type * @@ -137,6 +142,11 @@ enum kfd_queue_type { KFD_QUEUE_TYPE_DIQ }; +enum kfd_queue_format { + KFD_QUEUE_FORMAT_PM4, + KFD_QUEUE_FORMAT_AQL +}; + /** * struct queue_properties * @@ -183,6 +193,7 @@ enum kfd_queue_type { */ struct queue_properties { enum kfd_queue_type type; + enum kfd_queue_format format; unsigned int queue_id; uint64_t queue_address; uint64_t queue_size; @@ -242,6 +253,17 @@ struct queue { struct kfd_dev *device; }; +/* + * Please read the kfd_mqd_manager.h description. + */ +enum KFD_MQD_TYPE { + KFD_MQD_TYPE_CIK_COMPUTE = 0, /* for no cp scheduling */ + KFD_MQD_TYPE_CIK_HIQ, /* for hiq */ + KFD_MQD_TYPE_CIK_CP, /* for cp queues and diq */ + KFD_MQD_TYPE_CIK_SDMA, /* for sdma queues */ + KFD_MQD_TYPE_MAX +}; + /* Data that is per-process-per device. */ struct kfd_process_device { /* |