On Sat Jun 20, 2026 at 2:51 AM CEST, Danilo Krummrich wrote: > rust: drm: Add RegistrationGuard for drm_dev_enter/exit critical > sections
As also pointed out by Sashiko, I forgot to consider that constructing a RegistrationGuard still requires that the drm::Device has been registered at some point. Theoretically, this could be addressed in a way that it is still valid to construct a RegistrationGuard from a drm::Device<Normal> (e.g. by leveraging dev->unplugged with corresponding synchronization), but other than from IOCTLs there is no use-case for this guard. Since IOCTLs already carry the required invariant implicitly, I went with a separate Ioctl typestate. This and the fact that we can't let drivers infer any other typestate than Normal before the RegistrationGuard is in place, results in a few changes that are worth considering for review, so I decided to resend early.
