linux-stable/drivers/gpu
Oded Gabbay 412c8f7de0 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>
2016-02-27 22:52:40 +02:00
..
drm drm/radeon: Return -EPROBE_DEFER when amdkfd not loaded 2016-02-27 22:52:40 +02:00
host1x gpu: host1x: Add Tegra210 support 2015-12-14 10:50:33 +01:00
ipu-v3 Merge branch 'patchwork' into v4l_for_linus 2016-01-11 11:13:27 -02:00
vga vga_switcheroo: Add support for switching only the DDC 2016-02-09 11:21:07 +01:00
Makefile