linux/drivers/gpu/drm/amd
Oded Gabbay efb1c6582e drm/amdgpu: Return -EPROBE_DEFER when amdkfd not loaded
amdgpu must load only after amdkfd's loading has been completed. If that
is not enforced, then amdgpu's call into amdkfd's functions will cause a
kernel BUG.

When amdgpu and amdkfd are built as kernel modules, that rule is enforced
by the kernel's modules loading mechanism. When amdgpu and amdkfd are
built inside the kernel image, that rule is enforced by ordering in the
drm Makefile (amdkfd before amdgpu).

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 amdgpu loading by propagating -EPROBE_DEFER to the
kernel's drivers loading infrastructure. That will put amdgpu into the
pending drivers list (see description in dd.c). Once amdkfd is loaded,
a call to kgd2kfd_init() will return successfully and amdgpu will be able
to load.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-27 22:52:40 +02:00
..
acp drm/amd: add pm domain for ACP IP sub blocks 2016-02-10 14:17:09 -05:00
amdgpu drm/amdgpu: Return -EPROBE_DEFER when amdkfd not loaded 2016-02-27 22:52:40 +02:00
amdkfd drm/amdkfd: Track when module's init is complete 2016-02-27 22:52:40 +02:00
include drm/amdkfd: Track when module's init is complete 2016-02-27 22:52:40 +02:00
powerplay drm/amd/powerplay: add powerplay valid check to avoid null point. 2016-02-10 16:21:12 -05:00
scheduler drm/amdgpu: drop a dummy wakeup scheduler 2016-02-10 14:17:02 -05:00