forked from Minki/linux
drm/amdkfd: Add gtt sa related data to kfd_dev struct
This patch adds new fields to kfd_dev struct that are necessary for the new kfd gtt sa module Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alexey Skidanov <Alexey.skidanov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ceae881bfa
commit
36b5c08f09
@ -111,6 +111,13 @@ struct kfd_device_info {
|
|||||||
uint16_t mqd_size_aligned;
|
uint16_t mqd_size_aligned;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct kfd_mem_obj {
|
||||||
|
uint32_t range_start;
|
||||||
|
uint32_t range_end;
|
||||||
|
uint64_t gpu_addr;
|
||||||
|
uint32_t *cpu_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
struct kfd_dev {
|
struct kfd_dev {
|
||||||
struct kgd_dev *kgd;
|
struct kgd_dev *kgd;
|
||||||
|
|
||||||
@ -136,6 +143,14 @@ struct kfd_dev {
|
|||||||
|
|
||||||
struct kgd2kfd_shared_resources shared_resources;
|
struct kgd2kfd_shared_resources shared_resources;
|
||||||
|
|
||||||
|
void *gtt_mem;
|
||||||
|
uint64_t gtt_start_gpu_addr;
|
||||||
|
void *gtt_start_cpu_ptr;
|
||||||
|
void *gtt_sa_bitmap;
|
||||||
|
struct mutex gtt_sa_lock;
|
||||||
|
unsigned int gtt_sa_chunk_size;
|
||||||
|
unsigned int gtt_sa_num_of_chunks;
|
||||||
|
|
||||||
void *interrupt_ring;
|
void *interrupt_ring;
|
||||||
size_t interrupt_ring_size;
|
size_t interrupt_ring_size;
|
||||||
atomic_t interrupt_ring_rptr;
|
atomic_t interrupt_ring_rptr;
|
||||||
@ -163,12 +178,6 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd);
|
|||||||
|
|
||||||
extern const struct kfd2kgd_calls *kfd2kgd;
|
extern const struct kfd2kgd_calls *kfd2kgd;
|
||||||
|
|
||||||
struct kfd_mem_obj {
|
|
||||||
void *bo;
|
|
||||||
uint64_t gpu_addr;
|
|
||||||
uint32_t *cpu_ptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum kfd_mempool {
|
enum kfd_mempool {
|
||||||
KFD_MEMPOOL_SYSTEM_CACHEABLE = 1,
|
KFD_MEMPOOL_SYSTEM_CACHEABLE = 1,
|
||||||
KFD_MEMPOOL_SYSTEM_WRITECOMBINE = 2,
|
KFD_MEMPOOL_SYSTEM_WRITECOMBINE = 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user