diff options
author | Xihan Zhang <xihan.zhang@amd.com> | 2015-03-17 07:32:53 -0400 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-03-25 08:02:05 -0400 |
commit | cea405b172e3b1fd2cf9da5ec05c7d808d6af03d (patch) | |
tree | 02f0b670f9eb1ec27d2322bea19d70096ccdcec1 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |
parent | affa7d86441a9fe1ddd67f4ed551ed41313da561 (diff) |
drm/amdkfd: Add multiple kgd support
The current code can only support one kgd instance. We have to
support multiple kgd instances in one system. i.e two amdgpu or two
radeon or one amdgpu + one radeon or more than two kgd instances.
Signed-off-by: Xihan Zhang <xihan.zhang@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 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index b7bd7afd6fcf..f21fccebd75b 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |||
@@ -148,6 +148,11 @@ struct kfd_dev { | |||
148 | 148 | ||
149 | struct kgd2kfd_shared_resources shared_resources; | 149 | struct kgd2kfd_shared_resources shared_resources; |
150 | 150 | ||
151 | const struct kfd2kgd_calls *kfd2kgd; | ||
152 | struct mutex doorbell_mutex; | ||
153 | unsigned long doorbell_available_index[DIV_ROUND_UP( | ||
154 | KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)]; | ||
155 | |||
151 | void *gtt_mem; | 156 | void *gtt_mem; |
152 | uint64_t gtt_start_gpu_addr; | 157 | uint64_t gtt_start_gpu_addr; |
153 | void *gtt_start_cpu_ptr; | 158 | void *gtt_start_cpu_ptr; |
@@ -164,13 +169,12 @@ struct kfd_dev { | |||
164 | 169 | ||
165 | /* KGD2KFD callbacks */ | 170 | /* KGD2KFD callbacks */ |
166 | void kgd2kfd_exit(void); | 171 | void kgd2kfd_exit(void); |
167 | struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev); | 172 | struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, |
173 | struct pci_dev *pdev, const struct kfd2kgd_calls *f2g); | ||
168 | bool kgd2kfd_device_init(struct kfd_dev *kfd, | 174 | bool kgd2kfd_device_init(struct kfd_dev *kfd, |
169 | const struct kgd2kfd_shared_resources *gpu_resources); | 175 | const struct kgd2kfd_shared_resources *gpu_resources); |
170 | void kgd2kfd_device_exit(struct kfd_dev *kfd); | 176 | void kgd2kfd_device_exit(struct kfd_dev *kfd); |
171 | 177 | ||
172 | extern const struct kfd2kgd_calls *kfd2kgd; | ||
173 | |||
174 | enum kfd_mempool { | 178 | enum kfd_mempool { |
175 | KFD_MEMPOOL_SYSTEM_CACHEABLE = 1, | 179 | KFD_MEMPOOL_SYSTEM_CACHEABLE = 1, |
176 | KFD_MEMPOOL_SYSTEM_WRITECOMBINE = 2, | 180 | KFD_MEMPOOL_SYSTEM_WRITECOMBINE = 2, |