Drive the 2720 Flip cover panel through the kernel panel driver
Autonomous testing (clean reboot, kernel SPI statistics, kHz GPIO sweeps, CS0/CS1 register reads, battery/ALS/hwmon checks, host webcam differential imaging) showed all twelve userspace PROBE cases delivered complete, error-free SPI traffic while the cover stayed dark. The QUP5 pinctrl group has one CS line and gpio110 (the kernel panel-mipi-dbi-spi driver's D/C) is shared behind the gpio13 bus switch, so no userspace D/C framing can work. backend = kernel is now the default. While the flip is closed the compiled cover daemon claims only gpio13 (mux) and gpio23 (cover reset), switches the bus to the cover and forces a DPMS off/on cycle through bananarchy-cover-dpms.sh reinit; mipi_dbi_enable() then replays the kernel's firmware init sequence onto the external panel with CS0 and gpio110 D/C. The cover UI is rendered as a 240x240 XR24 damage rect at the top of /dev/fb0 using the fbdev stride, which makes mipi_dbi set a 240x240 address window. The main backlight and keypad stay at 0, so only the outer panel can light. On open the mux returns to the internal panel and the lid daemon requests a reinit after an 80 ms settle. Live verification: closed -> backend=kernel-dark (DPMS off); BUTTON -> backend=kernel, dpms=On, gpio13 high, 172800 non-zero bytes of cover UI in /dev/fb0, kernel spi0.0 +460899 bytes and userspace spi0.1 +0, zero SPI errors; BLANK -> kernel-dark/DPMS off; LID OPEN -> mux=free, gpio13 low. Main backlight and keypad stayed at 0 throughout. All spidev/8-bit/9-bit paths, PROBE, bananarchy-cover-probe.sh and backend = fb|spidev|none remain as runtime rollback paths. New host test scripts/test-cover-kernel.py plus check-rebuild.sh guards. Rebuilt the a1108/dejavu nokia-beatles image and pinned the verified hash ce0542321990a8cff8ab122c0a47c0684fcc7e3d5f6fc97e74b3b0ea4c4826b5 in check-rebuild.sh. e2fsck -fn passed on both partitions, debugfs confirms the rebuilt daemons, helper and config byte-for-byte, and the bootfs sync, boot image check, artifact sync, host tests and rebuild preflight all pass. Limitation: Xorg shares /dev/fb0, so its repaints can still overwrite part of the cover UI; a dedicated override-redirect cover compositor is next. Physical illumination is still unverified from the host.
This commit is contained in:
1 parent
5f8b7c88ac
commit
c939687138
15 files changed
+468
-21
No files matched your search
@@ -41,6 +41,7 @@ else
|
||||
fi
|
||||
printf 'DRM cards : %s\n' "$(ls /dev/dri/card* 2>/dev/null | tr '\n' ' ')"
|
||||
printf 'main panel dpms : %s\n' "$(cat /sys/class/drm/card0-SPI-1/dpms 2>/dev/null || printf 'unknown')"
|
||||
printf 'main fbdev : %s\n' "$(cat /sys/class/graphics/fb0/virtual_size 2>/dev/null || printf 'absent')"
|
||||
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 spidev; do
|
||||
if grep -q "^$mod " /proc/modules 2>/dev/null; then
|
||||
@@ -61,7 +62,7 @@ if [ -r /sys/kernel/debug/gpio ]; then
|
||||
fi
|
||||
if [ -r "$CONF" ]; then
|
||||
printf 'backend config :\n'
|
||||
grep -E '^(backend|spi_device|spi_mux_gpio|spi_dc_gpio|spi_reset_gpio|mux_open_level|mux_closed_level|dc_command_level|dc_data_level|reset_assert_level|reset_idle_level|spi_speed_hz|spi_word_bits) ' "$CONF" | sed 's/^/ /'
|
||||
grep -E '^(backend|main_fb_device|kernel_dpms_helper|spi_device|spi_mux_gpio|spi_dc_gpio|spi_reset_gpio|mux_open_level|mux_closed_level|dc_command_level|dc_data_level|reset_assert_level|reset_idle_level|spi_speed_hz|spi_word_bits) ' "$CONF" | sed 's/^/ /'
|
||||
fi
|
||||
if [ -x "$COVERCTL" ]; then
|
||||
printf 'daemon : %s\n' "$("$COVERCTL" STATUS 2>/dev/null || printf 'not answering')"
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Replay the kernel panel-mipi-dbi-spi init sequence onto whichever GC9305 is
|
||||
# currently behind the gpio13 bus switch. A DPMS off/on cycle makes
|
||||
# mipi_dbi_enable() rerun the firmware command stack with CS0 and gpio110 D/C;
|
||||
# with the mux on the cover that initialises the 240x240 external panel.
|
||||
set -u
|
||||
export DISPLAY="${DISPLAY:-:0}"
|
||||
case "${1:-}" in
|
||||
reinit)
|
||||
xset dpms force off >/dev/null 2>&1 || true
|
||||
sleep 0.08
|
||||
xset dpms force on >/dev/null 2>&1 || true
|
||||
;;
|
||||
on)
|
||||
xset dpms force on >/dev/null 2>&1 || true
|
||||
;;
|
||||
off)
|
||||
xset dpms force off >/dev/null 2>&1 || true
|
||||
;;
|
||||
*)
|
||||
printf 'Usage: %s [reinit|on|off]\n' "${0##*/}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user