Closed eddyp closed 6 years ago
Can you please confirm that this actually compiles and that the module works - thanks.
mie., 9 mai 2018, 09:02 Simon Eisenmann notifications@github.com a scris:
Can you please confirm that this actually compiles and that the module works - thanks.
Hi,
First I wanted to understand if you'd be OK with merging this driver in the kernel.
I'll do the build testing and confirm.
I expect that after the merge I'll be able to do functional testing and provide any needed patches.
Sure - I merge if it works. So please check - I am very doubtful that it will though since this kernel tree is really old.
I can confirm with the patch above the kernel and the module builds:
eddy@feodora:~/usr/src/linux$ make ARCH=arm64 -j 9 modules SUBDIRS=drivers/staging/
CC [M] drivers/staging//zram/zram_drv.o
CC [M] drivers/staging//zram/zram_sysfs.o
CC [M] drivers/staging//fbtft/fbtft-core.o
CC [M] drivers/staging//fbtft/fbtft-sysfs.o
CC [M] drivers/staging//fbtft/fbtft-io.o
CC [M] drivers/staging//fbtft/fb_ili9486.o
CC [M] drivers/staging//fbtft/fbtft-bus.o
LD [M] drivers/staging//zram/zram.o
LD [M] drivers/staging//fbtft/fbtft.o
Building modules, stage 2.
MODPOST 5 modules
CC drivers/staging//android/ion/ion_test.mod.o
CC drivers/staging//android/ion/sunxi/ion-kernel-use-demo.mod.o
CC drivers/staging//fbtft/fb_ili9486.mod.o
CC drivers/staging//fbtft/fbtft.mod.o
CC drivers/staging//zram/zram.mod.o
LD [M] drivers/staging//fbtft/fb_ili9486.ko
LD [M] drivers/staging//android/ion/ion_test.ko
LD [M] drivers/staging//android/ion/sunxi/ion-kernel-use-demo.ko
LD [M] drivers/staging//fbtft/fbtft.ko
LD [M] drivers/staging//zram/zram.ko
eddy@feodora:~/usr/src/linux$ echo $?
0
eddy@feodora:~/usr/src/linux$ grep FB_TFT .config
CONFIG_FB_TFT=m
# CONFIG_FB_TFT_AGM1264K_FL is not set
# CONFIG_FB_TFT_BD663474 is not set
# CONFIG_FB_TFT_HX8340BN is not set
# CONFIG_FB_TFT_HX8347D is not set
# CONFIG_FB_TFT_HX8353D is not set
# CONFIG_FB_TFT_HX8357D is not set
# CONFIG_FB_TFT_ILI9163 is not set
# CONFIG_FB_TFT_ILI9320 is not set
# CONFIG_FB_TFT_ILI9325 is not set
# CONFIG_FB_TFT_ILI9340 is not set
# CONFIG_FB_TFT_ILI9341 is not set
# CONFIG_FB_TFT_ILI9481 is not set
CONFIG_FB_TFT_ILI9486=m
# CONFIG_FB_TFT_PCD8544 is not set
# CONFIG_FB_TFT_RA8875 is not set
# CONFIG_FB_TFT_S6D02A1 is not set
# CONFIG_FB_TFT_S6D1121 is not set
# CONFIG_FB_TFT_SH1106 is not set
# CONFIG_FB_TFT_SSD1289 is not set
# CONFIG_FB_TFT_SSD1305 is not set
# CONFIG_FB_TFT_SSD1306 is not set
# CONFIG_FB_TFT_SSD1331 is not set
# CONFIG_FB_TFT_SSD1351 is not set
# CONFIG_FB_TFT_ST7735R is not set
# CONFIG_FB_TFT_ST7789V is not set
# CONFIG_FB_TFT_TINYLCD is not set
# CONFIG_FB_TFT_TLS8204 is not set
# CONFIG_FB_TFT_UC1611 is not set
# CONFIG_FB_TFT_UC1701 is not set
# CONFIG_FB_TFT_UPD161704 is not set
# CONFIG_FB_TFT_WATTEROTT is not set
# CONFIG_FB_TFT_FBTFT_DEVICE is not set
eddy@feodora:~/usr/src/linux$ git show --oneline
7a263cb721fd (HEAD -> merge-fbtft-subtree-from-staging-testing, origin/merge-fbtft-subtree-from-staging-testing) spi: fix SPI_BIT_MASK so it always fits into 32-bits
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 28e440be1c07..c920c2f4dad5 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -309,7 +309,7 @@ struct spi_master {
/* bitmask of supported bits_per_word for transfers */
u32 bits_per_word_mask;
#define SPI_BPW_MASK(bits) BIT((bits) - 1)
-#define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0UL : (BIT(bits) - 1))
+#define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0U : (BIT(bits) - 1))
#define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - SPI_BIT_MASK(min - 1))
/* other constraints relevant to this driver */
Also, the kernel boots:
debian@pine64:~$ zgrep FB_TFT /proc/config.gz | grep ^CON
CONFIG_FB_TFT=m
CONFIG_FB_TFT_ILI9486=m
debian@pine64:~$ uname -a
Linux pine64 3.10.105pine64-bftft-0 #1 SMP PREEMPT Thu May 10 05:18:48 EEST 2018 aarch64 GNU/Linux
For the actual validation of the display working on the Pine, I need to do more work for which my time budget for this project has run out currently.
Cleaned up the last WIP commit message. Code is ready to merge.
@longsleep Just realized, I never confirmed the ili9486 module loads in the new kernel. It does, and, of course, warns it's a staging driver and the quality might be problematic, but the driver seems to be stable.
Nice thank you :+1:
This is a merge of the fbtft driver from Greg KH's staging-testing branch extracted from that tree with
git checkout staging-testing git subtree split -P drivers/staging/fbtft c296d5f9957^.. -b fbtft-subtree
Then merged with git checkout pine64-hacks git subtree add -P drivers/staging/fbtft fbtft-subtree git checkout -m merge-fbtft-subtree-from-staging-testing
The purpose of this is to enable the RPI 3.5 display sold by Kuman on Amazon: https://www.amazon.de/Kuman-Resolution-Interface-Bildschirm-Raspberry-pi/dp/B01CNLYL1C/ref=sr_1_4?srs=9092569031&ie=UTF8&qid=1525726856&sr=8-4&keywords=3.5+display