Lines Matching refs:kgd
85 static inline struct amdgpu_device *get_amdgpu_device(struct kgd_dev *kgd) in get_amdgpu_device() argument
87 return (struct amdgpu_device *)kgd; in get_amdgpu_device()
90 static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe, in lock_srbm() argument
93 struct amdgpu_device *adev = get_amdgpu_device(kgd); in lock_srbm()
100 static void unlock_srbm(struct kgd_dev *kgd) in unlock_srbm() argument
102 struct amdgpu_device *adev = get_amdgpu_device(kgd); in unlock_srbm()
108 static void acquire_queue(struct kgd_dev *kgd, uint32_t pipe_id, in acquire_queue() argument
111 struct amdgpu_device *adev = get_amdgpu_device(kgd); in acquire_queue()
116 lock_srbm(kgd, mec, pipe, queue_id, 0); in acquire_queue()
119 static void release_queue(struct kgd_dev *kgd) in release_queue() argument
121 unlock_srbm(kgd); in release_queue()
124 static void kgd_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, in kgd_program_sh_mem_settings() argument
130 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_program_sh_mem_settings()
132 lock_srbm(kgd, 0, 0, 0, vmid); in kgd_program_sh_mem_settings()
139 unlock_srbm(kgd); in kgd_program_sh_mem_settings()
142 static int kgd_set_pasid_vmid_mapping(struct kgd_dev *kgd, u32 pasid, in kgd_set_pasid_vmid_mapping() argument
145 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_set_pasid_vmid_mapping()
168 static int kgd_init_interrupts(struct kgd_dev *kgd, uint32_t pipe_id) in kgd_init_interrupts() argument
170 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_init_interrupts()
177 lock_srbm(kgd, mec, pipe, 0, 0); in kgd_init_interrupts()
182 unlock_srbm(kgd); in kgd_init_interrupts()
210 static int kgd_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id, in kgd_hqd_load() argument
215 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_load()
223 acquire_queue(kgd, pipe_id, queue_id); in kgd_hqd_load()
242 release_queue(kgd); in kgd_hqd_load()
244 acquire_queue(kgd, pipe_id, queue_id); in kgd_hqd_load()
251 release_queue(kgd); in kgd_hqd_load()
256 static int kgd_hqd_dump(struct kgd_dev *kgd, in kgd_hqd_dump() argument
260 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_dump()
274 acquire_queue(kgd, pipe_id, queue_id); in kgd_hqd_dump()
284 release_queue(kgd); in kgd_hqd_dump()
292 static int kgd_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, in kgd_hqd_sdma_load() argument
295 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_sdma_load()
348 static int kgd_hqd_sdma_dump(struct kgd_dev *kgd, in kgd_hqd_sdma_dump() argument
352 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_sdma_dump()
375 static bool kgd_hqd_is_occupied(struct kgd_dev *kgd, uint64_t queue_address, in kgd_hqd_is_occupied() argument
378 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_is_occupied()
383 acquire_queue(kgd, pipe_id, queue_id); in kgd_hqd_is_occupied()
393 release_queue(kgd); in kgd_hqd_is_occupied()
397 static bool kgd_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd) in kgd_hqd_sdma_is_occupied() argument
399 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_sdma_is_occupied()
415 static int kgd_hqd_destroy(struct kgd_dev *kgd, void *mqd, in kgd_hqd_destroy() argument
420 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_destroy()
429 acquire_queue(kgd, pipe_id, queue_id); in kgd_hqd_destroy()
507 release_queue(kgd); in kgd_hqd_destroy()
513 release_queue(kgd); in kgd_hqd_destroy()
517 static int kgd_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, in kgd_hqd_sdma_destroy() argument
520 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_hqd_sdma_destroy()
554 static int kgd_address_watch_disable(struct kgd_dev *kgd) in kgd_address_watch_disable() argument
556 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_address_watch_disable()
574 static int kgd_address_watch_execute(struct kgd_dev *kgd, in kgd_address_watch_execute() argument
580 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_address_watch_execute()
605 static int kgd_wave_control_execute(struct kgd_dev *kgd, in kgd_wave_control_execute() argument
609 struct amdgpu_device *adev = get_amdgpu_device(kgd); in kgd_wave_control_execute()
630 static uint32_t kgd_address_watch_get_offset(struct kgd_dev *kgd, in kgd_address_watch_get_offset() argument
637 static bool get_atc_vmid_pasid_mapping_info(struct kgd_dev *kgd, in get_atc_vmid_pasid_mapping_info() argument
641 struct amdgpu_device *adev = (struct amdgpu_device *) kgd; in get_atc_vmid_pasid_mapping_info()
649 static void set_scratch_backing_va(struct kgd_dev *kgd, in set_scratch_backing_va() argument
652 struct amdgpu_device *adev = (struct amdgpu_device *) kgd; in set_scratch_backing_va()
654 lock_srbm(kgd, 0, 0, 0, vmid); in set_scratch_backing_va()
656 unlock_srbm(kgd); in set_scratch_backing_va()
659 static void set_vm_context_page_table_base(struct kgd_dev *kgd, uint32_t vmid, in set_vm_context_page_table_base() argument
662 struct amdgpu_device *adev = get_amdgpu_device(kgd); in set_vm_context_page_table_base()
679 static uint32_t read_vmid_from_vmfault_reg(struct kgd_dev *kgd) in read_vmid_from_vmfault_reg() argument
681 struct amdgpu_device *adev = get_amdgpu_device(kgd); in read_vmid_from_vmfault_reg()