From be29d62b9461107475cde1ea29d3d664ea712925 Mon Sep 17 00:00:00 2001 From: adamthiede Date: Wed, 10 Jun 2026 06:00:22 -0500 Subject: [PATCH] device-sqfmi-beepy: update display driver for 6.18 Part-of: --- device/downstream/device-sqfmi-beepy/APKBUILD | 10 +- .../device-sqfmi-beepy-modules.post-install | 2 +- ...displaydriver-compile-on-new-kernels.patch | 98 ------------------- 3 files changed, 5 insertions(+), 105 deletions(-) delete mode 100644 device/downstream/device-sqfmi-beepy/displaydriver-compile-on-new-kernels.patch diff --git a/device/downstream/device-sqfmi-beepy/APKBUILD b/device/downstream/device-sqfmi-beepy/APKBUILD index 67711ce37..7e425ef00 100644 --- a/device/downstream/device-sqfmi-beepy/APKBUILD +++ b/device/downstream/device-sqfmi-beepy/APKBUILD @@ -2,7 +2,7 @@ maintainer="Adam Thiede " pkgname=device-sqfmi-beepy pkgdesc="SQFMI Beepy" -pkgver=4 +pkgver=5 pkgrel=0 _kbdmodname=beepy-kbd @@ -10,8 +10,8 @@ _kbdmodver=2.11 _kbdcommit="e65472734decd59450e2448d1218c4f69babcea8" _dispmodname=sharp-drm -_dispmodver=1.5 -_dispcommit="181a5c5b9dd6fecc66cf4d18a94f4a83277b8ca4" +_dispmodver=1.6 +_dispcommit="b8e7a86e962541b5d741c8fcc18152305279f118" _overlaycommit="910b9f59c2bbe5e7f33725370ceff0a4c18777af" @@ -36,7 +36,6 @@ source=" $pkgname-$_kbdcommit.tar.gz::https://github.com/ardangelo/beepberry-keyboard-driver/archive/$_kbdcommit.tar.gz $pkgname-$_overlaycommit.tar.gz::https://github.com/ardangelo/beepy-symbol-overlay/archive/$_overlaycommit.tar.gz $pkgname-$_dispcommit.tar.gz::https://github.com/ardangelo/sharp-drm-driver/archive/$_dispcommit.tar.gz - displaydriver-compile-on-new-kernels.patch keyboard-driver-compiler-warnings.patch symbol-overlay.patch " @@ -148,8 +147,7 @@ sha512sums=" 2b387eeb9afddef25a9bb757ec4481c446e213cd1da88291c5b0af0e631bc0bd224588fe6cecb79620bc58820eefa37d0a234ed1b417af2946af48d8f3254d38 usercfg.txt d3060bcbca3e90aa26c8a8d6772d8b07116e0cc4f0ae97d44d896434510493367966f23bb86d82f9719723b3bc7ee6b7a9e4b93b5185822b32ffaf4ee0411813 device-sqfmi-beepy-e65472734decd59450e2448d1218c4f69babcea8.tar.gz 442703affd913e0bdbbfe5d5eedd49a8b743832702a6fb8e96d49530dd172a7bcdbc36d908b93c61cb455824c85be8ffaa2c67506ae72827e874129f0ba6f912 device-sqfmi-beepy-910b9f59c2bbe5e7f33725370ceff0a4c18777af.tar.gz -b966c2cae09c3ac12d522700f37b4fa669eb884be9a2d9b4dae78e4baf8e333fa207228f944f00ee7967f8e3d17671b518744fd08187e32d4671bdd05fba8e00 device-sqfmi-beepy-181a5c5b9dd6fecc66cf4d18a94f4a83277b8ca4.tar.gz -d26333b6eff7219622fc98bdddc288f901911c72a06a7284f9443153de91b9ee51070c5d822ee74923835057497aa6d0c9c9ed533c1e62770beb01aa5eb45ead displaydriver-compile-on-new-kernels.patch +ab3b5ee73040c03fa2e5481b893a8ff9be808cd1b27f538ed45df18dada09aa14ead8fbf3fa18863ef9f44d8703fff182a2e5e3107511d728864bba8f31ae292 device-sqfmi-beepy-b8e7a86e962541b5d741c8fcc18152305279f118.tar.gz 8aa27fbd0ec58bf9a77fa105568e31c58355f4f1a33d9e932950b08fe9dd134beaaf3a7350357a3b471d96c2ceee17460c514f81083832dd97486586772873b5 keyboard-driver-compiler-warnings.patch fc3c720c5c8af33f2bfd8a745340547c29effc458df761cacfa9e6bed7e09f5f5ecea98e5a6c25d630cefc2a4b3e31016d42839c640759cd715bcb81d9560f38 symbol-overlay.patch " diff --git a/device/downstream/device-sqfmi-beepy/device-sqfmi-beepy-modules.post-install b/device/downstream/device-sqfmi-beepy/device-sqfmi-beepy-modules.post-install index 70bfea8db..47d5c0ab8 100644 --- a/device/downstream/device-sqfmi-beepy/device-sqfmi-beepy-modules.post-install +++ b/device/downstream/device-sqfmi-beepy/device-sqfmi-beepy-modules.post-install @@ -6,7 +6,7 @@ dispdir=/usr/src/sharp-drm kbddir=/usr/src/beepy-kbd # force use of rpi kernel in Makefiles -KERNELRELEASE=$(find /lib/modules -type d -iname '*-rpi' -mindepth 1 -maxdepth 1 -exec basename {} \;|sort|tail -n1) +KERNELERLEASE=$(cat /usr/share/kernel/rpi/kernel.release) dtc -@ -I dts -O dtb -W no-unit_address_vs_reg -o $dispdir/sharp-drm.dtbo $dispdir/sharp-drm.dts /usr/bin/make -C $kdir M=$dispdir diff --git a/device/downstream/device-sqfmi-beepy/displaydriver-compile-on-new-kernels.patch b/device/downstream/device-sqfmi-beepy/displaydriver-compile-on-new-kernels.patch deleted file mode 100644 index 3faa6a8f5..000000000 --- a/device/downstream/device-sqfmi-beepy/displaydriver-compile-on-new-kernels.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0e241e03f2821d26e37dfa39df529a2c4113be1e Mon Sep 17 00:00:00 2001 -From: Kiboneu <-> -Date: Tue, 22 Apr 2025 01:44:29 -0400 -Subject: [PATCH 1/2] Convert to fbdev-ttm (kernel 6.11+) and use - drm_format_conv_state (kernel 6.8+) - ---- - sharp-drm-driver/src/drm_iface.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/sharp-drm-driver/src/drm_iface.c b/sharp-drm-driver/src/drm_iface.c -index 8c57910..e62b7e0 100644 ---- a/sharp-drm-driver/src/drm_iface.c -+++ b/sharp-drm-driver/src/drm_iface.c -@@ -32,7 +32,10 @@ - #include - #include - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) -+// https://github.com/torvalds/linux/commit/aae4682e5d66c1e1dc181fa341652e037237f144 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) -+#include -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) - #include - #endif - -@@ -262,6 +265,11 @@ static int sharp_memory_clip_mono_tagged(struct sharp_memory_panel* panel, size_ - struct drm_gem_dma_object *dma_obj; - struct iosys_map dst, vmap; - -+ // https://github.com/torvalds/linux/commit/4cd24d4b1a9548f42cdb7f449edc6f869a8ae730 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) -+ struct drm_format_conv_state fmtcnv_state = DRM_FORMAT_CONV_STATE_INIT; -+#endif -+ - // Get GEM memory manager - dma_obj = drm_fb_dma_get_gem_obj(fb, 0); - -@@ -274,8 +282,13 @@ static int sharp_memory_clip_mono_tagged(struct sharp_memory_panel* panel, size_ - // Initialize destination (buf) and source (video) - iosys_map_set_vaddr(&dst, buf); - iosys_map_set_vaddr(&vmap, dma_obj->vaddr); -+ - // DMA `clip` into `buf` and convert to 8-bit grayscale -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) -+ drm_fb_xrgb8888_to_gray8(&dst, NULL, &vmap, fb, clip, &fmtcnv_state); -+#else - drm_fb_xrgb8888_to_gray8(&dst, NULL, &vmap, fb, clip); -+#endif - - // End DMA area - drm_gem_fb_end_cpu_access(fb, DMA_FROM_DEVICE); -@@ -292,6 +305,9 @@ static int sharp_memory_clip_mono_tagged(struct sharp_memory_panel* panel, size_ - (clip->x2 - clip->x1), (clip->y2 - clip->y1), clip->y1); - - // Success -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) -+ drm_format_conv_state_release(&fmtcnv_state); -+#endif - return 0; - } - -@@ -598,7 +614,12 @@ int drm_probe(struct spi_device *spi) - - // fbdev setup - spi_set_drvdata(spi, drm); -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) -+ drm_ttm_setup(drm, 0); -+#else - drm_fbdev_generic_setup(drm, 0); -+#endif - - printk(KERN_INFO "sharp_memory: successful probe\n"); - - -From ea98230f3b1ff9da993c85c8aa958d338bdd1847 Mon Sep 17 00:00:00 2001 -From: Kiboneu <-> -Date: Tue, 22 Apr 2025 01:48:12 -0400 -Subject: [PATCH 2/2] Fix typo: s/drm_ttm_setup/drm_fbdev_ttm_setup - ---- - sharp-drm-driver/src/drm_iface.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sharp-drm-driver/src/drm_iface.c b/sharp-drm-driver/src/drm_iface.c -index e62b7e0..cecd0f9 100644 ---- a/sharp-drm-driver/src/drm_iface.c -+++ b/sharp-drm-driver/src/drm_iface.c -@@ -616,7 +616,7 @@ int drm_probe(struct spi_device *spi) - spi_set_drvdata(spi, drm); - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) -- drm_ttm_setup(drm, 0); -+ drm_fbdev_ttm_setup(drm, 0); - #else - drm_fbdev_generic_setup(drm, 0); - #endif