On Fri, Jan 27, 2023, at 11:17, Stanislaw Gruszka wrote: > On Fri, Jan 27, 2023 at 10:36:20AM +0100, Arnd Bergmann wrote: >> I think it will be necessary to establish a link hierarchy between drm.ko >> and drm_accel.ko to avoid circular dependencies like this, but until then >> the only way that both can be used is to have both subsystems built into >> the kernel. Enforce this using a Kconfig dependency. > > Hmm, it was discussed a bit before and conclusion was that accel will be > compiled in drm.ko to avoid circular dependencies. There should be > no drm_accel.ko module. Ok, got it. This does not sounds like a great solution as it ties the two modules closer together than most users want, but it should work as long as we control the dependencies for the individual drivers. >> diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig >> index 834863902e16..dd18d3b2028c 100644 >> --- a/drivers/accel/Kconfig >> +++ b/drivers/accel/Kconfig >> @@ -8,7 +8,7 @@ >> # >> menuconfig DRM_ACCEL >> bool "Compute Acceleration Framework" >> - depends on DRM >> + depends on DRM=y > > Would making ivpu Kconfig: > > depends on DRM > select DRM_ACCEL > > solve the problem and still allow to drm to be build as module ? Right, that should work, I'll send a v2 patch to add an "if DRM" around the entire drivers/accel/Kconfig file, which should have the effect. Arnd