New: Kernel panic when trying use amdkfd driver on Kaveri
https://bugzilla.kernel.org/show_bug.cgi?id=89661
Bug ID: 89661
Summary: Kernel panic when trying use amdkfd driver on Kaveri
Product: Drivers
Version: 2.5
Kernel Version: 3.18.0 + drm-next branch
Hardware: x86-64
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: [email protected]
Reporter: [email protected]
Regression: No
The kernel I tried to use was 3.18.0 and I merged the drm-next branch fromgit://people.freedesktop.org/~airlied/linux
which includes the HSA driver amdkfd. CONFIG_HSA_AMD=y is set. When trying to boot the kernel, I get a kernel panic, as shown in the uploaded picture.
CPU is a A10-7800 Kaveri, Motherboard is ASRock FM2A88X Extreme6+.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #1 from Bernd Steinhauser <[email protected]> --- Created attachment 160441
--> https://bugzilla.kernel.org/attachment.cgi?id=160441&action=edit
Picture of the kernel panic output
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #2 from Michel Dänzer <[email protected]> --- Does it also happen with CONFIG_HSA_AMD=m?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
Oded Gabbay <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #3 from Oded Gabbay <[email protected]> --- Created attachment 160721
--> https://bugzilla.kernel.org/attachment.cgi?id=160721&action=edit
Print errors in case of NULL pointers and don't dereference them
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #4 from Oded Gabbay <[email protected]> --- Hi,
Please try the attached patch.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #5 from Bernd Steinhauser <[email protected]> --- (In reply to Michel Dänzer from comment #2)
Quoted 1 line
Does it also happen with
CONFIG_HSA_AMD=m?
Only tried CONFIG_HSA_AMD=n, not module, but this happens so early that I'm confident it does not matter.
Will try the patch, thanks.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #6 from Bernd Steinhauser <[email protected]> --- Tried the patch, exactly the same result.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #7 from Oded Gabbay <[email protected]> --- Created attachment 160751
--> https://bugzilla.kernel.org/attachment.cgi?id=160751&action=edit
More checks on pointers being used
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #8 from Oded Gabbay <[email protected]> --- Hi,
Three things, please:
1. Please try the attached patch. It tries to verify more pointers before using them.
2. You said CONFIG_HSA_AMD=y. What's the value of CONFIG_DRM_RADEON ? If its "m", could you change it to "y" ?
3. I would still like to ask if you could check with the following config:CONFIG_DRM_RADEON="m"CONFIG_HSA_AMD="m"
Thanks
Oded
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #9 from Oded Gabbay <[email protected]> ---
One more thing,
I'm trying to understand the exact tree you are using so we will look at the same code.
Did you just took drm-next, or did you manually merged between trees ? If you did a manual merge, could you try instead to just take drm-next ? It's already based on 3.18.0
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #10 from Oded Gabbay <[email protected]> ---
Hi,
So I managed to recreate the bug on my setup.
This is happening because you compiled all the modules inside the kernel. I need to address that, but for now, if you will compile them as "m", everything is supposed to work.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #11 from Bernd Steinhauser <[email protected]> --- Hm, ok. So should I still try the steps above? Because trying to use drm_radeon as a module would require me to do some testing with that setup before.
(In reply to Oded Gabbay from comment #8)
Quoted 2 lines
2. You said
CONFIG_HSA_AMD=y. What's the value ofCONFIG_DRM_RADEON? If its "m", could you change it to "y" ?
I'm using a static initrd (only a basic system, but doesn't contain any kernel modules), so all drivers necessary to start the system (including drm_radeon) are compiled in.
Regarding the tree:
I took plain 3.18 (b2776b) and then merged the drm-next branch from the repo mentioned above.
iirc, it was a fast forward.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #12 from Oded Gabbay <[email protected]> ---
As I said, there is definitely a bug when compiling both radeon and amdkfd inside the kernel.
I'm working on fixing it, but that could take a few days.
In the meantime, the only way to make it work without touching the code, is to either compile both drivers as modules or just radeon as module.
No need for further experiments.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
Oded Gabbay <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #160721|0 |1
is obsolete| |
Attachment #160751|0 |1
is obsolete| |--- Comment #13 from Oded Gabbay <[email protected]> --- Created attachment 160951
--> https://bugzilla.kernel.org/attachment.cgi?id=160951&action=edit
workaround for the module order problem
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #14 from Oded Gabbay <[email protected]> ---
I attached a new patch which should solve you the problem when compiling all the drivers into the kernel image.
This is a hacky workaround, so this is not the final solution, but it will help you continue with your setup, I hope.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
Oded Gabbay <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #160951|0 |1
is obsolete| |
--- Comment #15 from Oded Gabbay <[email protected]> --- Created attachment 160961
--> https://bugzilla.kernel.org/attachment.cgi?id=160961&action=edit
hacky workaround for module order problem
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #16 from Bernd Steinhauser <[email protected]> --- Thanks, I'll give it a try.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
--- Comment #17 from Bernd Steinhauser <[email protected]> --- Ok, it does now boot and seems to work.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 89661] Kernel panic when trying use amdkfd driver on Kaveri
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=89661
Bernd Steinhauser <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX--- Comment #18 from Bernd Steinhauser <[email protected]> --- At some point (didn't have a closer look), this was fixed and does now work as expected without workarounds.
(Tested: 4.5.1)
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel