aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_kfd.h
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2016-02-09 13:30:04 +0200
committerOded Gabbay <oded.gabbay@gmail.com>2016-02-27 22:52:40 +0200
commit412c8f7de011cb4a16d8a983607263da58517723 (patch)
treed13173e76676decc7864832895b4592b0bb8b8b2 /drivers/gpu/drm/radeon/radeon_kfd.h
parentdrm/amdkfd: Track when module's init is complete (diff)
downloadlinux-dev-412c8f7de011cb4a16d8a983607263da58517723.tar.xz
linux-dev-412c8f7de011cb4a16d8a983607263da58517723.zip
drm/radeon: Return -EPROBE_DEFER when amdkfd not loaded
radeon must load only after amdkfd's loading has been completed. If that is not enforced, then radeon's call into amdkfd's functions will cause a kernel BUG. When radeon and amdkfd are built as kernel modules, that rule is enforced by the kernel's modules loading mechanism. When radeon and amdkfd are built inside the kernel image, that rule is enforced by ordering in the drm Makefile (amdkfd before radeon). Instead of using drm Makefile ordering, we can now use deferred loading as amdkfd now returns -EPROBE_DEFER in kgd2kfd_init() when it is not yet loaded. This patch defers radeon loading by propagating -EPROBE_DEFER to the kernel's drivers loading infrastructure. That will put radeon into the pending drivers list (see description in dd.c). Once amdkfd is loaded, a call to kgd2kfd_init() will return successfully and radeon will be able to load. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kfd.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kfd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kfd.h b/drivers/gpu/drm/radeon/radeon_kfd.h
index 1103f9082f6b..9df1fea8e971 100644
--- a/drivers/gpu/drm/radeon/radeon_kfd.h
+++ b/drivers/gpu/drm/radeon/radeon_kfd.h
@@ -33,7 +33,7 @@
struct radeon_device;
-bool radeon_kfd_init(void);
+int radeon_kfd_init(void);
void radeon_kfd_fini(void);
void radeon_kfd_suspend(struct radeon_device *rdev);