]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: Init amdkfd only if it was compiled
authorOded Gabbay <oded.gabbay@amd.com>
Mon, 22 Dec 2014 09:19:23 +0000 (11:19 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Mon, 29 Dec 2014 12:46:00 +0000 (14:46 +0200)
commit31e8c7d00afb999168d47c4c3f2cc83097816b45
tree064ba3938f0fd90a51b2d3dbdd3954c5ed57cec8
parent5a9a29b41816bd028fd54df8fda191ecb5dcab76
drm/radeon: Init amdkfd only if it was compiled

This patch changes the radeon_kfd_init(), which is used to initialize the
interface between radeon and amdkfd, so the interface will be initialized only
if amdkfd was build, either as module or inside the kernel image.

In the modules case, the symbol_request() will be used (same as old code). In
the in-image compilation case, a direct call to kgd2kfd_init() will be done.
For other cases, radeon_kfd_init() will just return false.

This patch is necessary because in case of the following specific
configuration: kernel 32-bit, no modules support, random kernel base and no
hibernation, the symbol_request() doesn't work as expected - it doesn't return
NULL if the symbol doesn't exists - which makes the kernel panic.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
drivers/gpu/drm/radeon/radeon_kfd.c