diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2015-06-12 14:35:14 -0400 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2015-07-20 02:16:47 -0400 |
commit | 130e0371b7d454bb4a861253c822b9f911ad5d19 (patch) | |
tree | a2ec6267c5d4eff7caf1caa469e61402c3c0cd29 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
parent | 22801f76fa59870aed2c0b8a4eb6c8d6993347ae (diff) |
drm/amdgpu: Add H/W agnostic amdgpu <--> amdkfd interface
This patch adds an interface file between amdgpu and amdkfd. This
interface file is H/W agnostic, thus containing functions that
operate the same for any AMD APU/GPU H/W generation.
The functions in this interface mirror (some) of the functions in
radeon_kfd.c (the radeon<-->amdkfd interface file). The main functions
are:
- amdgpu_amdkfd_init - initialize the amdkfd module
- amdgpu_amdkfd_load_interface - load the H/W interface according to the
currently probed device
- amdgpu_amdkfd_device_probe - probe the device in amdkfd
- amdgpu_amdkfd_device_init - initialize the device in amdkfd
- amdgpu_amdkfd_interrupt - call the ISR of amdkfd
- amdgpu_amdkfd_suspend - suspend callback from amdgpu
- amdgpu_amdkfd_resume - resume callback from amdgpu
This patch also modifies the relevant amdgpu files, to use this new
interface.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 56da962231fc..115906f5fda0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include "amdgpu.h" | 44 | #include "amdgpu.h" |
45 | #include "amdgpu_irq.h" | 45 | #include "amdgpu_irq.h" |
46 | 46 | ||
47 | #include "amdgpu_amdkfd.h" | ||
48 | |||
47 | /* | 49 | /* |
48 | * KMS wrapper. | 50 | * KMS wrapper. |
49 | * - 3.0.0 - initial driver | 51 | * - 3.0.0 - initial driver |
@@ -527,12 +529,15 @@ static int __init amdgpu_init(void) | |||
527 | driver->num_ioctls = amdgpu_max_kms_ioctl; | 529 | driver->num_ioctls = amdgpu_max_kms_ioctl; |
528 | amdgpu_register_atpx_handler(); | 530 | amdgpu_register_atpx_handler(); |
529 | 531 | ||
532 | amdgpu_amdkfd_init(); | ||
533 | |||
530 | /* let modprobe override vga console setting */ | 534 | /* let modprobe override vga console setting */ |
531 | return drm_pci_init(driver, pdriver); | 535 | return drm_pci_init(driver, pdriver); |
532 | } | 536 | } |
533 | 537 | ||
534 | static void __exit amdgpu_exit(void) | 538 | static void __exit amdgpu_exit(void) |
535 | { | 539 | { |
540 | amdgpu_amdkfd_fini(); | ||
536 | drm_pci_exit(driver, pdriver); | 541 | drm_pci_exit(driver, pdriver); |
537 | amdgpu_unregister_atpx_handler(); | 542 | amdgpu_unregister_atpx_handler(); |
538 | } | 543 | } |