Eek - sorry, I had already pushed this since it had been reviewed a while ago and I just forgot to push it afterwards. This being said though - I'm a little confused here myself. This is correct - drm_client_register was getting called too early, I wonder if I ran into this before I had moved around the order of stuff in the KMS init stuff for rust. I will check today and if it fixes the issue, I'll look at just sending out a revert for review.
On Tue, 2024-09-17 at 09:32 +0200, Jocelyn Falempe wrote:
On 17/09/2024 01:00, Lyude Paul wrote:
It turns out that if you happen to have a kernel config where CONFIG_DRM_PANIC is disabled and spinlock debugging is enabled, along with KMS being enabled - we'll end up trying to acquire an uninitialized spin_lock with drm_panic_lock() when we try to do a commit:
The raw spinlock should be initialized in drm_dev_init() [1] regardless of DRM_PANIC being enabled or not.
From the call trace, it looks like you are calling drm_client_register() before calling drm_dev_register(), and that's probably the root cause.
I didn't find a doc saying drm_dev_register() should be done before drm_client_register(), but all drivers are doing it this way.
Can you try to do that in rvkms, and see if it fixes this error ?
Best regards,