Part Number: AM3352
Hi,
I am facing a issue regarding the SGX530 kernel module. I have a custom AM335x board and I am using Yocto "Thud" as a build environment. The kernel (4.19.19) is built from the Poky linux-yocto recipe with adjustments for the device tree based on the am335x-evm.dts device tree.
To make use of the SGX530 GPU, I have ported the relevant device tree changes and platform quirks from the "ti-linux-4.19.y" branch of https://git.ti.com/ti-linux-kernel/ti-linux-kernel into my device tree. That allowed me to build the kernel- and userspace drivers for the GPU.
Everything seems to work fine (i.e. Qt applications using the eglfs backend are rendered with hardware acceleration), but when the pvrsrvkm kernel module is initializing a kernel exception is thrown:
... [ 0.168456] l4_wkup_cm:clk:0010:0: failed to disable ... [ 7.998927] gfx_l3_cm:clk:0000:0: failed to enable [ 8.004006] ------------[ cut here ]------------ [ 8.008887] WARNING: CPU: 0 PID: 92 at drivers/clk/clk.c:828 clk_core_disable+0x3c/0x1f0 [ 8.017383] gfx_l3_cm:clk:0000:0 already disabled [ 8.022321] Modules linked in: pvrsrvkm(O+) tilcdc(+) drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm drm_panel_orientation_quirks spidev rtc_omap ti_am335x_tscadc [ 8.042385] CPU: 0 PID: 92 Comm: udevd Tainted: G O 4.19.19-yocto-standard #1 [ 8.051243] Hardware name: Generic AM33XX (Flattened Device Tree) [ 8.057684] [<c0110c90>] (unwind_backtrace) from [<c010cd54>] (show_stack+0x20/0x24) [ 8.065843] [<c010cd54>] (show_stack) from [<c0721b38>] (dump_stack+0x20/0x28) [ 8.073460] [<c0721b38>] (dump_stack) from [<c0132030>] (__warn+0xec/0x104) [ 8.080785] [<c0132030>] (__warn) from [<c013209c>] (warn_slowpath_fmt+0x54/0x74) [ 8.088654] [<c013209c>] (warn_slowpath_fmt) from [<c0454de0>] (clk_core_disable+0x3c/0x1f0) [ 8.097525] [<c0454de0>] (clk_core_disable) from [<c0454fbc>] (clk_core_disable_lock+0x28/0x34) [ 8.106667] [<c0454fbc>] (clk_core_disable_lock) from [<c0454ff4>] (clk_disable+0x2c/0x30) [ 8.115363] [<c0454ff4>] (clk_disable) from [<c0120ba0>] (_disable_clocks+0x28/0x80) [ 8.123508] [<c0120ba0>] (_disable_clocks) from [<c0123410>] (omap_hwmod_deassert_hardreset+0x10c/0x15c) [ 8.133475] [<c0123410>] (omap_hwmod_deassert_hardreset) from [<c0123f48>] (omap_device_deassert_hardreset+0x48/0x58) [ 8.145016] [<c0123f48>] (omap_device_deassert_hardreset) from [<bf13d168>] (PVRSRVDrmProbe+0x3c/0xc8 [pvrsrvkm]) [ 8.156027] [<bf13d168>] (PVRSRVDrmProbe [pvrsrvkm]) from [<c04b1630>] (platform_drv_probe+0x58/0xa4) [ 8.165727] [<c04b1630>] (platform_drv_probe) from [<c04af4b8>] (really_probe+0x1e8/0x2b0) [ 8.174418] [<c04af4b8>] (really_probe) from [<c04af85c>] (driver_probe_device+0x154/0x170) [ 8.183195] [<c04af85c>] (driver_probe_device) from [<c04af914>] (__driver_attach+0x9c/0xd8) [ 8.192063] [<c04af914>] (__driver_attach) from [<c04ad6f4>] (bus_for_each_dev+0x74/0xb0) [ 8.200657] [<c04ad6f4>] (bus_for_each_dev) from [<c04aee84>] (driver_attach+0x28/0x30) [ 8.209068] [<c04aee84>] (driver_attach) from [<c04ae910>] (bus_add_driver+0x184/0x1ec) [ 8.217481] [<c04ae910>] (bus_add_driver) from [<c04b0478>] (driver_register+0xbc/0x100) [ 8.225988] [<c04b0478>] (driver_register) from [<c04b1578>] (__platform_driver_register+0x40/0x54) [ 8.235677] [<c04b1578>] (__platform_driver_register) from [<bf17e030>] (PVRSRVDrmInit+0x30/0x1000 [pvrsrvkm]) [ 8.246370] [<bf17e030>] (PVRSRVDrmInit [pvrsrvkm]) from [<c01034c8>] (do_one_initcall+0x84/0x170) [ 8.255799] [<c01034c8>] (do_one_initcall) from [<c0194494>] (do_init_module+0x6c/0x1f4) [ 8.264305] [<c0194494>] (do_init_module) from [<c01963b4>] (load_module+0x1cc4/0x1e00) [ 8.272719] [<c01963b4>] (load_module) from [<c0196714>] (sys_finit_module+0xa4/0xc4) [ 8.280949] [<c0196714>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [ 8.289534] Exception stack(0xce68bfa8 to 0xce68bff0) [ 8.294845] bfa0: 00000000 0047f380 00000008 b6eef418 00000000 00000000 [ 8.303438] bfc0: 00000000 0047f380 be92a8ec 0000017b 00000000 00450464 00000000 0047f380 [ 8.312026] bfe0: be92a808 be92a7f8 b6ee75ac b6e6af50 [ 8.317330] ---[ end trace ad59f82dec5deb2e ]--- [ 8.387918] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 8.394897] [drm] No driver support for vblank timestamp query. [ 8.657966] Console: switching to colour frame buffer device 60x34 [ 8.741666] tilcdc 4830e000.lcdc: fb0: DRM emulated frame buffer device [ 8.823188] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0 [ 9.160591] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.sgx on minor 1 ...
I think that it is caused by the omap_device_deassert_hardreset call during the platform driver initialization, that tries to reset the gfx_l3_cm clock - which the kernel also fails to enable previously. And I also noticed in the kernel log that the l4_wkup_cm clock also fails to disable during boot. So I checked the clock definitions in the device tree whether I have changes compared to the TI kernel. But my am33xx-clocks.dtsi file is the same as in the TI kernel.
What other device tree entry could cause such an issue? Or am I missing something else?