On 16/06/2024 11:12, Geert Uytterhoeven wrote:
On Sun, Jun 16, 2024 at 11:08 AM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
On Sat, Jun 15, 2024 at 12:55 PM kernel test robot <lkp@xxxxxxxxx> wrote:
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[cannot apply to linus/master v6.10-rc3 next-20240613]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Geert-Uytterhoeven/drm-panic-Fix-uninitialized-drm_scanout_buffer-set_pixel-crash/20240614-032053
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/3121082eb4beb461773ebb6f656ed9b4286967ee.1718305355.git.geert%2Brenesas%40glider.be
patch subject: [PATCH v2 5/7] drm/panic: Convert to drm_fb_clip_offset()
config: x86_64-randconfig-003-20240615 (https://download.01.org/0day-ci/archive/20240615/202406151811.yEIZ6203-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/202406151811.yEIZ6203-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406151811.yEIZ6203-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
depmod: ERROR: Cycle detected: drm -> drm_kms_helper -> drm
depmod: ERROR: Found 2 modules in dependency cycles!
Oops, so DRM core cannot call any of the helpers, and DRM_PANIC
selecting DRM_KMS_HELPER was wrong in the first place?
Q: So how does this work with DRM_PANIC calling
drm_fb_helper_emergency_disable()?
A: drm_fb_helper_emergency_disable() is a dummy if
!CONFIG_DRM_FBDEV_EMULATION, so I guess no one tried to build
a failing randconfig with CONFIG_DRM_FBDEV_EMULATION=y yet.
drm_fb_helper_emergency_disable() is part of the series
https://patchwork.freedesktop.org/series/132720/
which, after discussing it on IRC with sima and Javier, is not a good
solution, and is abandoned.
I think the "select DRM_KMS_HELPER" is a leftover from earlier version
of drm_panic, that used the color conversion function from
drm_kms_helper, but that has changed in v10 and later.
drm_panic is called from the drm_core code, so in fact it can't depends
on the kms helper.
I don't see a good solution to workaround this circular dependency,
maybe depends on DRM_KMS_HELPER being built-in ? (so that means drm_core
will also be built-in). But that means platform that build drm core as
module, won't be able to use drm_panic.
There are a few of them in the kernel tree:
rg -l CONFIG_DRM=m
arch/powerpc/configs/85xx/stx_gp3_defconfig
arch/powerpc/configs/ppc6xx_defconfig
arch/powerpc/configs/skiroot_defconfig
arch/powerpc/configs/pmac32_defconfig
arch/mips/configs/ci20_defconfig
arch/arc/configs/axs101_defconfig
arch/arc/configs/axs103_smp_defconfig
arch/riscv/configs/defconfig
arch/parisc/configs/generic-32bit_defconfig
arch/arm/configs/davinci_all_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/configs/pxa_defconfig
arch/arm64/configs/defconfig
Gr{oetje,eeting}s,
Geert
--
Jocelyn