Blank the cover fbdev when off and add panel diagnostics
This commit is contained in:
1 parent
7c52d616e7
commit
90e6771700
11 files changed
+121
-11
No files matched your search
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
# Report the live state of the 2720 Flip external panel (/dev/fb1).
|
||||
# Intended for the physical gpio13/reset/DC sign-off: it never changes state.
|
||||
set -u
|
||||
|
||||
FB=/dev/fb1
|
||||
SYSFS=/sys/class/graphics/fb1
|
||||
FW=/lib/firmware/nokia,beatles-gc9305-ext-panel.bin
|
||||
COVERCTL=/usr/bin/bananarchy-coverctl
|
||||
|
||||
printf '=== Bananarchy cover display diagnostics ===\n'
|
||||
if [ -r /usr/share/bananarchy/lid-profile ]; then
|
||||
printf 'lid-profile : %s\n' "$(cat /usr/share/bananarchy/lid-profile)"
|
||||
else
|
||||
printf 'lid-profile : missing (not a flip build?)\n'
|
||||
fi
|
||||
if [ -e "$FB" ]; then
|
||||
printf 'framebuffer : %s present\n' "$FB"
|
||||
for attr in virtual_size bits_per_pixel stride; do
|
||||
if [ -r "$SYSFS/$attr" ]; then
|
||||
printf ' %-20s: %s\n' "$attr" "$(cat "$SYSFS/$attr")"
|
||||
else
|
||||
printf ' %-20s: missing\n' "$attr"
|
||||
fi
|
||||
done
|
||||
else
|
||||
printf 'framebuffer : %s ABSENT (panel-mipi-dbi did not probe)\n' "$FB"
|
||||
fi
|
||||
printf 'DRM cards : %s\n' "$(ls /dev/dri/card* 2>/dev/null | tr '\n' ' ')"
|
||||
printf 'fbdev nodes : %s\n' "$(ls /dev/fb* 2>/dev/null | tr '\n' ' ')"
|
||||
for mod in mux_core mux_gpio spi_mux panel_mipi_dbi; do
|
||||
if grep -q "^$mod " /proc/modules 2>/dev/null; then
|
||||
printf 'module %-20s: loaded\n' "$mod"
|
||||
else
|
||||
printf 'module %-20s: not loaded\n' "$mod"
|
||||
fi
|
||||
done
|
||||
if [ -r "$FW" ]; then
|
||||
printf 'panel firmware : %s (%s bytes)\n' "$FW" "$(wc -c < "$FW")"
|
||||
else
|
||||
printf 'panel firmware : %s MISSING\n' "$FW"
|
||||
fi
|
||||
printf 'mux select (lid-state): %s\n' "$(cat /run/bananarchy/lid-state 2>/dev/null || printf 'unknown')"
|
||||
if [ -x "$COVERCTL" ]; then
|
||||
printf 'daemon : %s\n' "$("$COVERCTL" STATUS 2>/dev/null || printf 'not answering')"
|
||||
else
|
||||
printf 'daemon : %s missing\n' "$COVERCTL"
|
||||
fi
|
||||
if command -v rc-service >/dev/null 2>&1; then
|
||||
rc-service bananarchy-cover-display status 2>&1 | sed 's/^/service : /'
|
||||
fi
|
||||
exit 0
|
||||
Binary file not shown.
Reference in new issue
Block a user