drm/vc4: Set `fbdev_probe` in `struct vc5_drm_driver`
Subsystems (3)
Maíra Canal
reviewerPATCH 1/1 drm/vc4: Set `fbdev_probe` in `struct vc5_drm_driver`
Currently, when booting the RPi 4B, we get a NULL pointer dereference:
[ 7.642883] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 [ 7.642926] Mem abort info: [ 7.642938] ESR = 0x0000000096000044 [ 7.642951] EC = 0x25: DABT (current EL), IL = 32 bits [ 7.642968] SET = 0, FnV = 0 [ 7.642981] EA = 0, S1PTW = 0 [ 7.642993] FSC = 0x04: level 0 translation fault [ 7.643007] Data abort info: [ 7.643017] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 7.643032] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 7.643046] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 7.643063] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107487000 [ 7.643081] [0000000000000038] pgd=0000000000000000, p4d=0000000000000000 [ 7.643113] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 7.643131] Modules linked in: snd_bcm2835(C) [...] vc4 v3d [...] drm_shmem_helper drm_dma_helper drm_kms_helper drm [...] ipv6 [ 7.643377] CPU: 1 UID: 0 PID: 48 Comm: kworker/u16:2 Tainted: G C 6.12.0-rc1-00310-g2c34a5464007 #185 [ 7.643407] Tainted: [C]=CRAP [ 7.643419] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 7.643438] Workqueue: events_unbound deferred_probe_work_func [ 7.643477] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 7.643499] pc : __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.643616] lr : __drm_fb_helper_initial_config_and_unlock+0x374/0x588 [drm_kms_helper] [ 7.643710] sp : ffff8000806c3900 [ 7.643724] x29: ffff8000806c3950 x28: ffff431b01a3ec14 x27: 0000000000000010 [ 7.643758] x26: ffff431b0369f000 x25: 0000000036314752 x24: ffff431b003b6200 [ 7.643790] x23: ffff431b0369f000 x22: 00000000000002d0 x21: ffff431b003b6030 [ 7.643821] x20: ffff431b003b6030 x19: ffff431b003b6000 x18: ffff431b002e6e48 [ 7.643852] x17: 0000000000000001 x16: ffffb19c2f10614c x15: 0000000000000000 [ 7.643882] x14: 0000000000000000 x13: ffff431b003b62f0 x12: 0000000000000500 [ 7.643913] x11: 0000000000000000 x10: 0000000000000000 x9 : 005d6e6f6362665b [ 7.643945] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 7.643975] x5 : ffffb19bcb45c59c x4 : 0000000000001e00 x3 : ffffb19bcb420c20 [ 7.644005] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff431b003b6000 [ 7.644036] Call trace: [ 7.644049] __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.644149] drm_fb_helper_initial_config+0x34/0x4c [drm_kms_helper] [ 7.644240] drm_fbdev_client_hotplug+0x74/0xc8 [drm_kms_helper] [ 7.644331] drm_client_register+0x58/0xa0 [drm] [ 7.644571] drm_fbdev_client_setup+0xc4/0x17c [drm_kms_helper] [ 7.644664] drm_client_setup_with_fourcc+0x28/0x60 [drm_kms_helper] [ 7.644755] vc4_drm_bind+0x218/0x264 [vc4] [ 7.644855] try_to_bring_up_aggregate_device+0x168/0x1b4 [ 7.644884] __component_add+0xb8/0x158 [ 7.644905] component_add+0x14/0x20 [ 7.644925] vc4_hvs_dev_probe+0x1c/0x28 [vc4] [ 7.645019] platform_probe+0xa8/0xd0 [ 7.645045] really_probe+0x128/0x2c8 [ 7.645065] __driver_probe_device+0xa0/0x128 [ 7.645086] driver_probe_device+0x3c/0x1f8 [ 7.645106] __device_attach_driver+0x118/0x140 [ 7.645127] bus_for_each_drv+0xf4/0x14c [ 7.645145] __device_attach+0xfc/0x194 [ 7.645164] device_initial_probe+0x14/0x20 [ 7.645184] bus_probe_device+0x94/0x100 [ 7.645202] deferred_probe_work_func+0x88/0xc4 [ 7.645223] process_scheduled_works+0x194/0x2c4 [ 7.645246] worker_thread+0x290/0x39c [ 7.645265] kthread+0xfc/0x184 [ 7.645289] ret_from_fork+0x10/0x20 [ 7.645317] Code: f2ac6c49 aa1303e0 f2cdcde9 f2e00ba9 (f9001d09) [ 7.645338] ---[ end trace 0000000000000000 ]---
This happens because commit 45903624e9fc ("drm/vc4: Run DRM default client setup") only added DRM_FBDEV_DMA_DRIVER_OPS to struct vc4_drm_driver and didn't add it to struct vc5_drm_driver. The struct vc4_drm_driver is used in RPi 0-3, as VC4 is also a render node in those RPis. But RPi 4 and 5 use V3D as the render node and VC4 as modeset node and therefore, use struct vc5_drm_driver.
This commit adds DRM_FBDEV_DMA_DRIVER_OPS to struct vc5_drm_driver, ensuring that fbdev_probe exists for all VC4 generations.
--- drivers/gpu/drm/vc4/vc4_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/vc4/vc4_drv.c +1 -0
@@ -238,6 +238,7 @@ const struct drm_driver vc5_drm_driver = {#endif DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (vc5_dumb_create), +DRM_FBDEV_DMA_DRIVER_OPS , .fops = &vc4_drm_fops,
Signature · 1 line
2.46.2
Hi
Am 09.10.24 um 02:40 schrieb Maíra Canal:
Quoted 72 lines
Currently, when booting the RPi 4B, we get a NULL pointer dereference:
[ 7.642883] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 [ 7.642926] Mem abort info: [ 7.642938] ESR = 0x0000000096000044 [ 7.642951] EC = 0x25: DABT (current EL), IL = 32 bits [ 7.642968] SET = 0, FnV = 0 [ 7.642981] EA = 0, S1PTW = 0 [ 7.642993] FSC = 0x04: level 0 translation fault [ 7.643007] Data abort info: [ 7.643017] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 7.643032] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 7.643046] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 7.643063] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107487000 [ 7.643081] [0000000000000038] pgd=0000000000000000, p4d=0000000000000000 [ 7.643113] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 7.643131] Modules linked in: snd_bcm2835(C) [...] vc4 v3d [...] drm_shmem_helper drm_dma_helper drm_kms_helper drm [...] ipv6 [ 7.643377] CPU: 1 UID: 0 PID: 48 Comm: kworker/u16:2 Tainted: G C 6.12.0-rc1-00310-g2c34a5464007 #185 [ 7.643407] Tainted: [C]=CRAP [ 7.643419] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 7.643438] Workqueue: events_unbound deferred_probe_work_func [ 7.643477] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 7.643499] pc : __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.643616] lr : __drm_fb_helper_initial_config_and_unlock+0x374/0x588 [drm_kms_helper] [ 7.643710] sp : ffff8000806c3900 [ 7.643724] x29: ffff8000806c3950 x28: ffff431b01a3ec14 x27: 0000000000000010 [ 7.643758] x26: ffff431b0369f000 x25: 0000000036314752 x24: ffff431b003b6200 [ 7.643790] x23: ffff431b0369f000 x22: 00000000000002d0 x21: ffff431b003b6030 [ 7.643821] x20: ffff431b003b6030 x19: ffff431b003b6000 x18: ffff431b002e6e48 [ 7.643852] x17: 0000000000000001 x16: ffffb19c2f10614c x15: 0000000000000000 [ 7.643882] x14: 0000000000000000 x13: ffff431b003b62f0 x12: 0000000000000500 [ 7.643913] x11: 0000000000000000 x10: 0000000000000000 x9 : 005d6e6f6362665b [ 7.643945] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 7.643975] x5 : ffffb19bcb45c59c x4 : 0000000000001e00 x3 : ffffb19bcb420c20 [ 7.644005] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff431b003b6000 [ 7.644036] Call trace: [ 7.644049] __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.644149] drm_fb_helper_initial_config+0x34/0x4c [drm_kms_helper] [ 7.644240] drm_fbdev_client_hotplug+0x74/0xc8 [drm_kms_helper] [ 7.644331] drm_client_register+0x58/0xa0 [drm] [ 7.644571] drm_fbdev_client_setup+0xc4/0x17c [drm_kms_helper] [ 7.644664] drm_client_setup_with_fourcc+0x28/0x60 [drm_kms_helper] [ 7.644755] vc4_drm_bind+0x218/0x264 [vc4] [ 7.644855] try_to_bring_up_aggregate_device+0x168/0x1b4 [ 7.644884] __component_add+0xb8/0x158 [ 7.644905] component_add+0x14/0x20 [ 7.644925] vc4_hvs_dev_probe+0x1c/0x28 [vc4] [ 7.645019] platform_probe+0xa8/0xd0 [ 7.645045] really_probe+0x128/0x2c8 [ 7.645065] __driver_probe_device+0xa0/0x128 [ 7.645086] driver_probe_device+0x3c/0x1f8 [ 7.645106] __device_attach_driver+0x118/0x140 [ 7.645127] bus_for_each_drv+0xf4/0x14c [ 7.645145] __device_attach+0xfc/0x194 [ 7.645164] device_initial_probe+0x14/0x20 [ 7.645184] bus_probe_device+0x94/0x100 [ 7.645202] deferred_probe_work_func+0x88/0xc4 [ 7.645223] process_scheduled_works+0x194/0x2c4 [ 7.645246] worker_thread+0x290/0x39c [ 7.645265] kthread+0xfc/0x184 [ 7.645289] ret_from_fork+0x10/0x20 [ 7.645317] Code: f2ac6c49 aa1303e0 f2cdcde9 f2e00ba9 (f9001d09) [ 7.645338] ---[ end trace 0000000000000000 ]---This happens because commit
45903624e9fc("drm/vc4: Run DRM default client setup") only addedDRM_FBDEV_DMA_DRIVER_OPStostruct vc4_drm_driverand didn't add it tostruct vc5_drm_driver. Thestruct vc4_drm_driveris used in RPi 0-3, as VC4 is also a render node in those RPis. But RPi 4 and 5 use V3D as the render node and VC4 as modeset node and therefore, usestruct vc5_drm_driver.
Quoted 5 lines
This commit adds
DRM_FBDEV_DMA_DRIVER_OPStostruct vc5_drm_driver, ensuring thatfbdev_probeexists for all VC4 generations.Fixes 45903624e9fc ("drm/vc4: Run DRM default client setup")Signed-off-by Maíra Canal <[email protected]>
Sorry for forgetting about this.
Best regards
Thomas
Quoted 16 lines
--- drivers/gpu/drm/vc4/vc4_drv.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/vc4/vc4_drv.c +1
-0@@ -238,6 +238,7 @@ const struct drm_driver vc5_drm_driver = {#endif DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (vc5_dumb_create), +DRM_FBDEV_DMA_DRIVER_OPS , .fops = &vc4_drm_fops,
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Maxime Ripard
maintainerQuoted 75 lines · Thomas Zimmermann
Hi
Am 09.10.24 um 02:40 schrieb Maíra Canal:
Quoted 72 lines
Currently, when booting the RPi 4B, we get a NULL pointer dereference:
[ 7.642883] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 [ 7.642926] Mem abort info: [ 7.642938] ESR = 0x0000000096000044 [ 7.642951] EC = 0x25: DABT (current EL), IL = 32 bits [ 7.642968] SET = 0, FnV = 0 [ 7.642981] EA = 0, S1PTW = 0 [ 7.642993] FSC = 0x04: level 0 translation fault [ 7.643007] Data abort info: [ 7.643017] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 7.643032] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 7.643046] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 7.643063] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107487000 [ 7.643081] [0000000000000038] pgd=0000000000000000, p4d=0000000000000000 [ 7.643113] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 7.643131] Modules linked in: snd_bcm2835(C) [...] vc4 v3d [...] drm_shmem_helper drm_dma_helper drm_kms_helper drm [...] ipv6 [ 7.643377] CPU: 1 UID: 0 PID: 48 Comm: kworker/u16:2 Tainted: G C 6.12.0-rc1-00310-g2c34a5464007 #185 [ 7.643407] Tainted: [C]=CRAP [ 7.643419] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 7.643438] Workqueue: events_unbound deferred_probe_work_func [ 7.643477] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 7.643499] pc : __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.643616] lr : __drm_fb_helper_initial_config_and_unlock+0x374/0x588 [drm_kms_helper] [ 7.643710] sp : ffff8000806c3900 [ 7.643724] x29: ffff8000806c3950 x28: ffff431b01a3ec14 x27: 0000000000000010 [ 7.643758] x26: ffff431b0369f000 x25: 0000000036314752 x24: ffff431b003b6200 [ 7.643790] x23: ffff431b0369f000 x22: 00000000000002d0 x21: ffff431b003b6030 [ 7.643821] x20: ffff431b003b6030 x19: ffff431b003b6000 x18: ffff431b002e6e48 [ 7.643852] x17: 0000000000000001 x16: ffffb19c2f10614c x15: 0000000000000000 [ 7.643882] x14: 0000000000000000 x13: ffff431b003b62f0 x12: 0000000000000500 [ 7.643913] x11: 0000000000000000 x10: 0000000000000000 x9 : 005d6e6f6362665b [ 7.643945] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 7.643975] x5 : ffffb19bcb45c59c x4 : 0000000000001e00 x3 : ffffb19bcb420c20 [ 7.644005] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff431b003b6000 [ 7.644036] Call trace: [ 7.644049] __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.644149] drm_fb_helper_initial_config+0x34/0x4c [drm_kms_helper] [ 7.644240] drm_fbdev_client_hotplug+0x74/0xc8 [drm_kms_helper] [ 7.644331] drm_client_register+0x58/0xa0 [drm] [ 7.644571] drm_fbdev_client_setup+0xc4/0x17c [drm_kms_helper] [ 7.644664] drm_client_setup_with_fourcc+0x28/0x60 [drm_kms_helper] [ 7.644755] vc4_drm_bind+0x218/0x264 [vc4] [ 7.644855] try_to_bring_up_aggregate_device+0x168/0x1b4 [ 7.644884] __component_add+0xb8/0x158 [ 7.644905] component_add+0x14/0x20 [ 7.644925] vc4_hvs_dev_probe+0x1c/0x28 [vc4] [ 7.645019] platform_probe+0xa8/0xd0 [ 7.645045] really_probe+0x128/0x2c8 [ 7.645065] __driver_probe_device+0xa0/0x128 [ 7.645086] driver_probe_device+0x3c/0x1f8 [ 7.645106] __device_attach_driver+0x118/0x140 [ 7.645127] bus_for_each_drv+0xf4/0x14c [ 7.645145] __device_attach+0xfc/0x194 [ 7.645164] device_initial_probe+0x14/0x20 [ 7.645184] bus_probe_device+0x94/0x100 [ 7.645202] deferred_probe_work_func+0x88/0xc4 [ 7.645223] process_scheduled_works+0x194/0x2c4 [ 7.645246] worker_thread+0x290/0x39c [ 7.645265] kthread+0xfc/0x184 [ 7.645289] ret_from_fork+0x10/0x20 [ 7.645317] Code: f2ac6c49 aa1303e0 f2cdcde9 f2e00ba9 (f9001d09) [ 7.645338] ---[ end trace 0000000000000000 ]---This happens because commit
45903624e9fc("drm/vc4: Run DRM default client setup") only addedDRM_FBDEV_DMA_DRIVER_OPStostruct vc4_drm_driverand didn't add it tostruct vc5_drm_driver. Thestruct vc4_drm_driveris used in RPi 0-3, as VC4 is also a render node in those RPis. But RPi 4 and 5 use V3D as the render node and VC4 as modeset node and therefore, usestruct vc5_drm_driver.
Quoted 7 lines
Quoted 5 lines
This commit adds
DRM_FBDEV_DMA_DRIVER_OPStostruct vc5_drm_driver, ensuring thatfbdev_probeexists for all VC4 generations.Fixes 45903624e9fc ("drm/vc4: Run DRM default client setup")Signed-off-by Maíra Canal <[email protected]>Reviewed-by Thomas Zimmermann <[email protected]>
It's the third time it was sent:
https://lore.kernel.org/dri-devel/[email protected]/
https://lore.kernel.org/dri-devel/[email protected]/
Maxime
Dave Stevenson
maintainerQuoted 83 lines · Maxime Ripard
Quoted 81 lines · Thomas Zimmermann
Hi
Am 09.10.24 um 02:40 schrieb Maíra Canal:
Quoted 77 lines
Currently, when booting the RPi 4B, we get a NULL pointer dereference:
[ 7.642883] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 [ 7.642926] Mem abort info: [ 7.642938] ESR = 0x0000000096000044 [ 7.642951] EC = 0x25: DABT (current EL), IL = 32 bits [ 7.642968] SET = 0, FnV = 0 [ 7.642981] EA = 0, S1PTW = 0 [ 7.642993] FSC = 0x04: level 0 translation fault [ 7.643007] Data abort info: [ 7.643017] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 7.643032] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 7.643046] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 7.643063] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107487000 [ 7.643081] [0000000000000038] pgd=0000000000000000, p4d=0000000000000000 [ 7.643113] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 7.643131] Modules linked in: snd_bcm2835(C) [...] vc4 v3d [...] drm_shmem_helper drm_dma_helper drm_kms_helper drm [...] ipv6 [ 7.643377] CPU: 1 UID: 0 PID: 48 Comm: kworker/u16:2 Tainted: G C 6.12.0-rc1-00310-g2c34a5464007 #185 [ 7.643407] Tainted: [C]=CRAP [ 7.643419] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 7.643438] Workqueue: events_unbound deferred_probe_work_func [ 7.643477] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 7.643499] pc : __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.643616] lr : __drm_fb_helper_initial_config_and_unlock+0x374/0x588 [drm_kms_helper] [ 7.643710] sp : ffff8000806c3900 [ 7.643724] x29: ffff8000806c3950 x28: ffff431b01a3ec14 x27: 0000000000000010 [ 7.643758] x26: ffff431b0369f000 x25: 0000000036314752 x24: ffff431b003b6200 [ 7.643790] x23: ffff431b0369f000 x22: 00000000000002d0 x21: ffff431b003b6030 [ 7.643821] x20: ffff431b003b6030 x19: ffff431b003b6000 x18: ffff431b002e6e48 [ 7.643852] x17: 0000000000000001 x16: ffffb19c2f10614c x15: 0000000000000000 [ 7.643882] x14: 0000000000000000 x13: ffff431b003b62f0 x12: 0000000000000500 [ 7.643913] x11: 0000000000000000 x10: 0000000000000000 x9 : 005d6e6f6362665b [ 7.643945] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 7.643975] x5 : ffffb19bcb45c59c x4 : 0000000000001e00 x3 : ffffb19bcb420c20 [ 7.644005] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff431b003b6000 [ 7.644036] Call trace: [ 7.644049] __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.644149] drm_fb_helper_initial_config+0x34/0x4c [drm_kms_helper] [ 7.644240] drm_fbdev_client_hotplug+0x74/0xc8 [drm_kms_helper] [ 7.644331] drm_client_register+0x58/0xa0 [drm] [ 7.644571] drm_fbdev_client_setup+0xc4/0x17c [drm_kms_helper] [ 7.644664] drm_client_setup_with_fourcc+0x28/0x60 [drm_kms_helper] [ 7.644755] vc4_drm_bind+0x218/0x264 [vc4] [ 7.644855] try_to_bring_up_aggregate_device+0x168/0x1b4 [ 7.644884] __component_add+0xb8/0x158 [ 7.644905] component_add+0x14/0x20 [ 7.644925] vc4_hvs_dev_probe+0x1c/0x28 [vc4] [ 7.645019] platform_probe+0xa8/0xd0 [ 7.645045] really_probe+0x128/0x2c8 [ 7.645065] __driver_probe_device+0xa0/0x128 [ 7.645086] driver_probe_device+0x3c/0x1f8 [ 7.645106] __device_attach_driver+0x118/0x140 [ 7.645127] bus_for_each_drv+0xf4/0x14c [ 7.645145] __device_attach+0xfc/0x194 [ 7.645164] device_initial_probe+0x14/0x20 [ 7.645184] bus_probe_device+0x94/0x100 [ 7.645202] deferred_probe_work_func+0x88/0xc4 [ 7.645223] process_scheduled_works+0x194/0x2c4 [ 7.645246] worker_thread+0x290/0x39c [ 7.645265] kthread+0xfc/0x184 [ 7.645289] ret_from_fork+0x10/0x20 [ 7.645317] Code: f2ac6c49 aa1303e0 f2cdcde9 f2e00ba9 (f9001d09) [ 7.645338] ---[ end trace 0000000000000000 ]---This happens because commit
45903624e9fc("drm/vc4: Run DRM default client setup") only addedDRM_FBDEV_DMA_DRIVER_OPStostruct vc4_drm_driverand didn't add it tostruct vc5_drm_driver. Thestruct vc4_drm_driveris used in RPi 0-3, as VC4 is also a render node in those RPis. But RPi 4 and 5 use V3D as the render node and VC4 as modeset node and therefore, usestruct vc5_drm_driver.This commit adds
DRM_FBDEV_DMA_DRIVER_OPStostruct vc5_drm_driver, ensuring thatfbdev_probeexists for all VC4 generations.Fixes 45903624e9fc ("drm/vc4: Run DRM default client setup")Signed-off-by Maíra Canal <[email protected]>
Quoted 6 lines
Quoted 1 line
Reviewed-by Thomas Zimmermann <[email protected]>It's the third time it was sent:
https://lore.kernel.org/dri-devel/[email protected]/
https://lore.kernel.org/dri-devel/[email protected]/
It is. No one responded to my version. I can merge Marek's vc4 change with my R-b, or now Maira's with Thomas and mine.
But both the other two submissions also included a patch so that drm_fb_helper handled the error more cleanly [1 and 2]. I'm still new to maintainership, but I don't believe I'm in a position to merge either of those.
Dave
[1] https://lore.kernel.org/dri-devel/[email protected]/
[2] https://lore.kernel.org/dri-devel/[email protected]/
Maíra Canal
reviewerHi Dave,
Quoted 91 lines · Dave Stevenson
Quoted 83 lines · Maxime Ripard
Quoted 81 lines · Thomas Zimmermann
Hi
Am 09.10.24 um 02:40 schrieb Maíra Canal:
Quoted 77 lines
Currently, when booting the RPi 4B, we get a NULL pointer dereference:
[ 7.642883] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 [ 7.642926] Mem abort info: [ 7.642938] ESR = 0x0000000096000044 [ 7.642951] EC = 0x25: DABT (current EL), IL = 32 bits [ 7.642968] SET = 0, FnV = 0 [ 7.642981] EA = 0, S1PTW = 0 [ 7.642993] FSC = 0x04: level 0 translation fault [ 7.643007] Data abort info: [ 7.643017] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000 [ 7.643032] CM = 0, WnR = 1, TnD = 0, TagAccess = 0 [ 7.643046] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 7.643063] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107487000 [ 7.643081] [0000000000000038] pgd=0000000000000000, p4d=0000000000000000 [ 7.643113] Internal error: Oops: 0000000096000044 [#1] PREEMPT SMP [ 7.643131] Modules linked in: snd_bcm2835(C) [...] vc4 v3d [...] drm_shmem_helper drm_dma_helper drm_kms_helper drm [...] ipv6 [ 7.643377] CPU: 1 UID: 0 PID: 48 Comm: kworker/u16:2 Tainted: G C 6.12.0-rc1-00310-g2c34a5464007 #185 [ 7.643407] Tainted: [C]=CRAP [ 7.643419] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 7.643438] Workqueue: events_unbound deferred_probe_work_func [ 7.643477] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 7.643499] pc : __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.643616] lr : __drm_fb_helper_initial_config_and_unlock+0x374/0x588 [drm_kms_helper] [ 7.643710] sp : ffff8000806c3900 [ 7.643724] x29: ffff8000806c3950 x28: ffff431b01a3ec14 x27: 0000000000000010 [ 7.643758] x26: ffff431b0369f000 x25: 0000000036314752 x24: ffff431b003b6200 [ 7.643790] x23: ffff431b0369f000 x22: 00000000000002d0 x21: ffff431b003b6030 [ 7.643821] x20: ffff431b003b6030 x19: ffff431b003b6000 x18: ffff431b002e6e48 [ 7.643852] x17: 0000000000000001 x16: ffffb19c2f10614c x15: 0000000000000000 [ 7.643882] x14: 0000000000000000 x13: ffff431b003b62f0 x12: 0000000000000500 [ 7.643913] x11: 0000000000000000 x10: 0000000000000000 x9 : 005d6e6f6362665b [ 7.643945] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 7.643975] x5 : ffffb19bcb45c59c x4 : 0000000000001e00 x3 : ffffb19bcb420c20 [ 7.644005] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff431b003b6000 [ 7.644036] Call trace: [ 7.644049] __drm_fb_helper_initial_config_and_unlock+0x40c/0x588 [drm_kms_helper] [ 7.644149] drm_fb_helper_initial_config+0x34/0x4c [drm_kms_helper] [ 7.644240] drm_fbdev_client_hotplug+0x74/0xc8 [drm_kms_helper] [ 7.644331] drm_client_register+0x58/0xa0 [drm] [ 7.644571] drm_fbdev_client_setup+0xc4/0x17c [drm_kms_helper] [ 7.644664] drm_client_setup_with_fourcc+0x28/0x60 [drm_kms_helper] [ 7.644755] vc4_drm_bind+0x218/0x264 [vc4] [ 7.644855] try_to_bring_up_aggregate_device+0x168/0x1b4 [ 7.644884] __component_add+0xb8/0x158 [ 7.644905] component_add+0x14/0x20 [ 7.644925] vc4_hvs_dev_probe+0x1c/0x28 [vc4] [ 7.645019] platform_probe+0xa8/0xd0 [ 7.645045] really_probe+0x128/0x2c8 [ 7.645065] __driver_probe_device+0xa0/0x128 [ 7.645086] driver_probe_device+0x3c/0x1f8 [ 7.645106] __device_attach_driver+0x118/0x140 [ 7.645127] bus_for_each_drv+0xf4/0x14c [ 7.645145] __device_attach+0xfc/0x194 [ 7.645164] device_initial_probe+0x14/0x20 [ 7.645184] bus_probe_device+0x94/0x100 [ 7.645202] deferred_probe_work_func+0x88/0xc4 [ 7.645223] process_scheduled_works+0x194/0x2c4 [ 7.645246] worker_thread+0x290/0x39c [ 7.645265] kthread+0xfc/0x184 [ 7.645289] ret_from_fork+0x10/0x20 [ 7.645317] Code: f2ac6c49 aa1303e0 f2cdcde9 f2e00ba9 (f9001d09) [ 7.645338] ---[ end trace 0000000000000000 ]---This happens because commit
45903624e9fc("drm/vc4: Run DRM default client setup") only addedDRM_FBDEV_DMA_DRIVER_OPStostruct vc4_drm_driverand didn't add it tostruct vc5_drm_driver. Thestruct vc4_drm_driveris used in RPi 0-3, as VC4 is also a render node in those RPis. But RPi 4 and 5 use V3D as the render node and VC4 as modeset node and therefore, usestruct vc5_drm_driver.This commit adds
DRM_FBDEV_DMA_DRIVER_OPStostruct vc5_drm_driver, ensuring thatfbdev_probeexists for all VC4 generations.Fixes 45903624e9fc ("drm/vc4: Run DRM default client setup")Signed-off-by Maíra Canal <[email protected]>Quoted 6 lines
Quoted 1 line
Reviewed-by Thomas Zimmermann <[email protected]>It's the third time it was sent:
https://lore.kernel.org/dri-devel/[email protected]/
https://lore.kernel.org/dri-devel/[email protected]/
Quoted 7 lines
It is. No one responded to my version. I can merge Marek's vc4 change with my R-b, or now Maira's with Thomas and mine.
But both the other two submissions also included a patch so thatdrm_fb_helperhandled the error more cleanly [1 and 2]. I'm still new to maintainership, but I don't believe I'm in a position to merge either of those.
I'm sorry, those patches went unnoticed by me. For me, the priority would be to fix RPi 4 display as soon as possible. As you were the first one to send the fix, you can apply the fix to drm-misc-next with my R-b. I won't R-b the second patch, as I believe Thomas has more experience with fbdev.
Best Regards,
- Maíra
Quoted 4 lines
Dave
[1] https://lore.kernel.org/dri-devel/[email protected]/
[2] https://lore.kernel.org/dri-devel/[email protected]/