Kernel error from hdmi driver

Started by msx_23, July 08, 2021, 04:38:19 PM

Previous topic - Next topic

msx_23

Im using a A20-LIME board with debian buster image attached to a HDMI display (tested with different displays).

The problem is that after some time (mostly 2-5 minutes) I get a kernel panic related to sunxi-hdmi driver. And from what I can see the same kernel panic happens when I just unplug the hdmi while the board is running... The error message is:

[ 3103.057238] Unable to handle kernel NULL pointer dereference at virtual address 00000194
[ 3103.065496] pgd = c01640ca
[ 3103.068348] [00000194] *pgd=00000000
[ 3103.072016] Internal error: Oops: 5 [#1] SMP ARM
[ 3103.076653] Modules linked in: fuse rfkill axp20x_ac_power axp20x_adc axp20x_battery industrialio evdev at24 lima gpu_sched sun4i_drm_hdmi sun4i_ss sunxi_cedrus(C) libdes v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cpufreq_dt uio_pdrv_genirq uio sun4i_ts hwmon usb_f_acm u_serial g_serial libcomposite ip_tables x_tables pinctrl_axp209 spidev uas smsc
[ 3103.112224] CPU: 1 PID: 539 Comm: Xorg Tainted: G         C        5.10.23-olimex #115137
[ 3103.120393] Hardware name: Allwinner sun7i (A20) Family

[ 3103.125637] PC is at sun4i_hdmi_audio_destroy+0x20/0x44 [sun4i_drm_hdmi]
Message from sy[ 3103.132527] LR is at sun4i_hdmi_disable+0x30/0x68 [sun4i_drm_hdmi]
[ 3103.132539] pc : [<bf0e8700>]    lr : [<bf0e8c74>]    psr: 60070013
sl[ogd@a20-olinux 3103.132544] sp : c2929c10  ip : c2929c28  fp : c2929c24
ino at Mar 18 16[ 3103.132549] r10: c2c2dd80  r9 : c3410e40  r8 : bf0eb3d8
:36:15 ...
 ke[ 3103.132555] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : c2380840
rnel:[ 3103.0720[ 3103.132561] r3 : 00000000  r2 : 820f1053  r1 : bf0ebd00  r0 : 00000000
16] Internal err[ 3103.132569] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
or: Oops: 5 [#1][ 3103.132577] Control: 10c5387d  Table: 4294406a  DAC: 00000051
 SMP ARM
[ 3103.132589] Process Xorg (pid: 539, stack limit = 0x3332975a)
[ 3103.132596] Stack: (0xc2929c10 to 0xc292a000)
[ 3103.132613] 9c00:                                     c2380bd0 00000000 c2929c3c c2929c28
[ 3103.210129] 9c20: bf0e8c74 bf0e86ec c2380bd0 00000000 c2929c7c c2929c40 c0613e64 bf0e8c50
[ 3103.218305] 9c40: 00000000 c0ca1004 c0ca16a0 c2a50400 c0ca1550 c3410e40 c2a50400 c0b65ce0
[ 3103.226482] 9c60: 00000001 00000000 c9ab4040 000002d2 c2929c94 c2929c80 c0614b8c c0613a68
[ 3103.234655] 9c80: c3410e40 00000000 c2929cd4 c2929c98 c0615178 c0614b70 c0612f78 7bb9b811
[ 3103.242827] 9ca0: c3410e40 c0ca1004 c2929cd4 c3410e40 00000000 c2a50400 00000000 00000000
[ 3103.250999] 9cc0: c9ab4040 c0c0c0c0 c2929cf4 c2929cd8 c0616004 c06150d4 00000000 c3410e40
[ 3103.259170] 9ce0: c2a50400 00000000 c2929d14 c2929cf8 c0633284 c0615ecc 00000001 c3410e40
[ 3103.267342] 9d00: c2380840 00000000 c2929d3c c2929d18 c064c6a8 c063323c c2301380 c3410e40
[ 3103.275514] 9d20: c2929d64 c2380854 00000003 c2661f00 c2929db4 c2929d40 c063b4c8 c064c5cc
[ 3103.283685] 9d40: 00000001 00000000 00000000 00000000 c2380840 ffffe000 c0f04fc8 00000000
[ 3103.291856] 9d60: 00000000 c2897700 0000014d 00000003 00000000 00000000 c9dff068 c2a50518
[ 3103.300027] 9d80: 00000000 820f1053 ffffffff c0f04fc8 c2a50400 00000003 00000000 00000002
[ 3103.308198] 9da0: c06396e8 c2929e64 c2929df4 c2929db8 c0639740 c063b2e0 00000003 00000000
[ 3103.316370] 9dc0: 00000002 00000042 c0c0c0c0 c2929dd8 c0620a10 820f1053 c062251c c0f04fc8
[ 3103.324542] 9de0: c2661f00 00000000 c2929e2c c2929df8 c0620e70 c06396f4 00000000 820f1053
[ 3103.332714] 9e00: c2929e2c c0b5bd80 00000010 c0f04fc8 c06396e8 000000ab c2661f00 c2929e64
[ 3103.340879] 9e20: c2929f14 c2929e30 c06210c4 c0620dc4 0000e200 00000001 c0ca3f40 c02ea2a8
[ 3103.349051] 9e40: c2929e64 00000051 c2848e40 00000010 c01064ab c2929e64 bea6f8d8 00000010
[ 3103.357222] 9e60: 00000000 00000003 00000000 00000002 00000042 00000001 c2929ea4 c2929e88
[ 3103.365394] 9e80: c02d8a78 c010f894 00000254 c0f04fc8 0e419000 c02cdda8 c2929f2c c2929ea8
[ 3103.373566] 9ea0: c02cdda8 c011bacc 00000000 c02fe988 00000000 00000000 00000100 00000000
[ 3103.381738] 9ec0: 00000000 c03432e4 c2929ef4 c2929ed8 c03432e4 c019d82c c01064ab c0f04fc8
[ 3103.389909] 9ee0: c01064ab 820f1053 c2929f04 c01064ab c0f04fc8 c2848e41 c2848e40 c0100264
[ 3103.398081] 9f00: c2928000 0000000b c2929fa4 c2929f18 c03364f8 c0620ec0 00000000 c01146a4
[ 3103.406253] 9f20: c2929f74 c2929f30 c01146a4 bea6f8d8 00000000 d499b481 00000001 0000001c
[ 3103.414425] 9f40: c2929dfc 00000000 00000004 c0f0af50 00000007 c011456c 0e41941c c2929fb0
[ 3103.422597] 9f60: 0f9be718 00000000 c2929fac c2929f78 c0114aa4 820f1053 00000000 00000003
[ 3103.430769] 9f80: bea6f8d8 c01064ab 00000036 c0100264 c2928000 00000036 00000000 c2929fa8
[ 3103.438940] 9fa0: c0100060 c03362e4 00000003 bea6f8d8 0000000b c01064ab bea6f8d8 e8945d00
[ 3103.447112] 9fc0: 00000003 bea6f8d8 c01064ab 00000036 0f6e58d8 0f9be718 00000000 00000000
[ 3103.455284] 9fe0: b205508c bea6f8bc b203ee9b b1d7af08 40070030 0000000b 00000000 00000000
[ 3103.463449] Backtrace:
[ 3103.465920] [<bf0e86e0>] (sun4i_hdmi_audio_destroy [sun4i_drm_hdmi]) from [<bf0e8c74>] (sun4i_hdmi_disable+0x30/0x68 [sun4i_drm_hdmi])
[ 3103.477992]  r5:00000000 r4:c2380bd0
[ 3103.481588] [<bf0e8c44>] (sun4i_hdmi_disable [sun4i_drm_hdmi]) from [<c0613e64>] (drm_atomic_helper_commit_modeset_disables+0x408/0x4c0)
[ 3103.493831]  r5:00000000 r4:c2380bd0
[ 3103.497414] [<c0613a5c>] (drm_atomic_helper_commit_modeset_disables) from [<c0614b8c>] (drm_atomic_helper_commit_tail_rpm+0x28/0x7c)
[ 3103.509314]  r10:000002d2 r9:c9ab4040 r8:00000000 r7:00000001 r6:c0b65ce0 r5:c2a50400
[ 3103.517134]  r4:c3410e40
[ 3103.519674] [<c0614b64>] (drm_atomic_helper_commit_tail_rpm) from [<c0615178>] (commit_tail+0xb0/0x1d0)
[ 3103.529056]  r5:00000000 r4:c3410e40
[ 3103.532637] [<c06150c8>] (commit_tail) from [<c0616004>] (drm_atomic_helper_commit+0x144/0x168)
[ 3103.541330]  r10:c0c0c0c0 r9:c9ab4040 r8:00000000 r7:00000000 r6:c2a50400 r5:00000000
[ 3103.549150]  r4:c3410e40
[ 3103.551691] [<c0615ec0>] (drm_atomic_helper_commit) from [<c0633284>] (drm_atomic_commit+0x54/0x60)
[ 3103.560731]  r7:00000000 r6:c2a50400 r5:c3410e40 r4:00000000
[ 3103.566400] [<c0633230>] (drm_atomic_commit) from [<c064c6a8>] (drm_atomic_connector_commit_dpms+0xe8/0x104)
[ 3103.576218]  r7:00000000 r6:c2380840 r5:c3410e40 r4:00000001
[ 3103.581885] [<c064c5c0>] (drm_atomic_connector_commit_dpms) from [<c063b4c8>] (drm_mode_obj_set_property_ioctl+0x1f4/0x448)
[ 3103.593007]  r9:c2661f00 r8:00000003 r7:c2380854 r6:c2929d64 r5:c3410e40 r4:c2301380
[ 3103.600749] [<c063b2d4>] (drm_mode_obj_set_property_ioctl) from [<c0639740>] (drm_connector_property_set_ioctl+0x58/0x74)
[ 3103.611696]  r10:c2929e64 r9:c06396e8 r8:00000002 r7:00000000 r6:00000003 r5:c2a50400
[ 3103.619516]  r4:c0f04fc8
[ 3103.622061] [<c06396e8>] (drm_connector_property_set_ioctl) from [<c0620e70>] (drm_ioctl_kernel+0xb8/0xfc)
[ 3103.631705]  r7:00000000 r6:c2661f00 r4:c0f04fc8
[ 3103.636326] [<c0620db8>] (drm_ioctl_kernel) from [<c06210c4>] (drm_ioctl+0x210/0x400)
[ 3103.644152]  r10:c2929e64 r9:c2661f00 r8:000000ab r7:c06396e8 r6:c0f04fc8 r5:00000010
[ 3103.651971]  r4:c0b5bd80
[ 3103.654515] [<c0620eb4>] (drm_ioctl) from [<c03364f8>] (sys_ioctl+0x220/0xa0c)
[ 3103.661735]  r10:0000000b r9:c2928000 r8:c0100264 r7:c2848e40 r6:c2848e41 r5:c0f04fc8
[ 3103.669555]  r4:c01064ab
[ 3103.672096] [<c03362d8>] (sys_ioctl) from [<c0100060>] (ret_fast_syscall+0x0/0x54)
[ 3103.679656] Exception stack(0xc2929fa8 to 0xc2929ff0)
[ 3103.684706] 9fa0:                   00000003 bea6f8d8 0000000b c01064ab bea6f8d8 e8945d00
[ 3103.692878] 9fc0: 00000003 bea6f8d8 c01064ab 00000036 0f6e58d8 0f9be718 00000000 00000000
[ 3103.701048] 9fe0: b205508c bea6f8bc b203ee9b b1d7af08
[ 3103.706100]  r10:00000036 r9:c2928000 r8:c0100264 r7:00000036 r6:c01064ab r5:bea6f8d8
[ 3103.713919]  r4:00000003
[ 3103.716459] Code: e8bd4000 e590344c e1a04000 e1a00003 (e5935194)
[ 3103.722714] ---[ end trace ae98a3246670fee0 ]---

After the error the board still runs but HDMI connection is broken (frozen image) and needs a reboot


Now I have 2 questions:

1. Is it possible to bring the hdmi output back without resetting the board, e.g. by reloading the driver somehow.

2. This seems to be a driver bug, how can I resolve that?

msx_23

Actually, this seems to have to do with my previous problem:

https://www.olimex.com/forum/index.php?topic=8282.0

Because I disabled the automatic screen setting in the script olinuxino-display in order to rotate the screen. When I turn it back on (like in the default debian image), there is no kernel error when I unplug the hdmi. But like in the mentioned thread then I canĀ“t rotate the screen anymore.

Has somebody a solution or any kind of hint?

JohnS

I suppose if it's a kernel driver fault then whoever maintains that driver, failing them try linux-sunxi ML?

John