[RPI4] Kernel panic when booting with Sensehat
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, linux, raspberry-pi
- Domain
- embedded-iot, operating-systems
Research direction
Start with drivers/video/fbdev/core/fbcon.c and the rpisense-fb module, then reproduce the boot with an RPi4 and Sense HAT connected but no HDMI cable. Trace the panic reported in sys_imageblit() and compare it with the supplied fbcon workaround. Done means the kernel boots reliably in this configuration without suppressing framebuffer console events as a workaround.
Written by the indexing model from the issue text.
Description
Checked on the last Raspbian release as of now - 2019-09-26 - and there's this kernel panic if the RPI4 is booted with RPI Sensehat connected, and no HDMI cable is attached. Also, hdmi_force_hotplug=1 will prevent the crash by creating /dev/fb0 before rpisense-fb.
Kernel panic happens when the rpisense-fb module is being loaded, but the crash point is actually in sys_imageblit(). Issue is reproducible with any rpi4 with a sensehat on it an Raspbian.
I can mitigate this by stopping fbcon from binding a console to the framebuffer created by rpisense-fb:
drivers/video/fbdev/core/fbcon.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index f7ac64d692b2..ff480d4d7144 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -3338,6 +3338,15 @@ static int fbcon_event_notify(struct notifier_block *self,
action == FB_EVENT_FB_UNREGISTERED))
goto done;
+ /* If no other framebuffer is availabe, then sensehat's
+ * will be used. It's an 8x8 pixels display, not meant for this.
+ * Ignore all events for rpi-sense fb and don't attach a console to it.
+ */
+ if (info && !strncmp(info->fix.id, "RPi-Sense FB", 12))
+ {
+ goto done;
+ }
+
This is just a workaround, the issue would need a proper fix.
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·