您尚未登录。

楼主 #1 2020-05-15 00:06:08

晓枫VS枯叶
会员
注册时间: 2020-05-03
已发帖子: 12
积分: 2

tiny200 framebuffer配置问题

在内核dts里面添加了framebuffer的配置,如下:

	simplefb_lcd: framebuffer-lcd0 {
			compatible = "allwinner,simple-framebuffer",
				     "simple-framebuffer";
			allwinner,pipeline = "de_be0-lcd0";
			clocks = <&ccu CLK_BUS_LCD>, <&ccu CLK_BUS_DE_BE>,
				 <&ccu CLK_TCON>, <&ccu CLK_DE_BE>,
				 <&ccu CLK_DRAM_DE_BE>;
			status = "okay";
		};

内核启动时输出的log显示simple-framebuffer配置失败,log如下:

U-Boot SPL 2019.04 (May 14 2020 - 22:33:18 +0800)
DRAM: 64 MiB
SPL: Unsupported Boot Device!
Trying to boot from sunxi SPI


U-Boot 2019.04 (May 14 2020 - 22:33:18 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lotlab ACT Monitor
DRAM:  64 MiB
Setting up a 800x480 lcd console (overscan 0x0)
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x50000, size 0x10000
SF: 65536 bytes @ 0x50000 Read: OK
device 0 offset 0x60000, size 0x300000
SF: 3145728 bytes @ 0x60000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff4e4 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.4 (jack-marks@ubuntu) (gcc version 9.3.0 (Buildroot 2020.02.1)) #1 Thu May 14 23:33:35 HKT 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS1,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs init=/sbin/mnt_overlay
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 55788K/64036K available (5120K kernel code, 188K rwdata, 736K rodata, 1024K init, 213K bss, 8248K reserved, 0K cma-reserved)
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from 0xc0700a8c with crng_init=0
[    0.000046] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000102] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000552] Console: colour dummy device 80x30
[    0.000663] Calibrating delay loop... 334.23 BogoMIPS (lpj=1671168)
[    0.050244] pid_max: default: 32768 minimum: 301
[    0.050399] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050435] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051906] CPU: Testing write buffer coherency: ok
[    0.054317] Setting up static identity map for 0x80100000 - 0x8010003c
[    0.056525] devtmpfs: initialized
[    0.074730] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.074780] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.074884] pinctrl core: initialized pinctrl subsystem
[    0.078003] NET: Registered protocol family 16
[    0.080100] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.086533] cpuidle: using governor menu
[    0.146982] SCSI subsystem initialized
[    0.147268] usbcore: registered new interface driver usbfs
[    0.147428] usbcore: registered new interface driver hub
[    0.147635] usbcore: registered new device driver usb
[    0.148006] videodev: Linux video capture interface: v2.00
[    0.154404] clocksource: Switched to clocksource timer
[    0.156593] simple-framebuffer chosen:framebuffer@83e89000: No memory resource
[    0.156673] simple-framebuffer: probe of chosen:framebuffer@83e89000 failed with error -22
[    0.218390] NET: Registered protocol family 2
[    0.222532] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.222591] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.222632] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.222671] TCP: Hash tables configured (established 1024 bind 1024)
[    0.223003] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.223063] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.223403] NET: Registered protocol family 1
[    0.231769] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.233723] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.233772] ntfs: driver 2.1.32 [Flags: R/O].
[    0.233805] jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
[    0.234233] fuse: init (API version 7.31)
[    0.241573] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.309906] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.310595] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.313630] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    0.392547] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.433690] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.438704] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.460001] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 25, base_baud = 6250000) is a 16550A
[    0.838081] printk: console [ttyS1] enabled
[    0.866302] 1c25800.serial: ttyS2 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A
[    0.886348] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.911650] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.930369] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.935293] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.941637] Creating 5 MTD partitions on "spi0.0":
[    0.946520] 0x000000000000-0x000000050000 : "u-boot"
[    0.962018] 0x000000050000-0x000000060000 : "dtb"
[    0.977518] 0x000000060000-0x000000380000 : "kernel"
[    0.993392] 0x000000380000-0x000000f80000 : "rootfs"
[    1.011339] 0x000000f80000-0x000001000000 : "overlay"
[    1.028275] usbcore: registered new interface driver uas
[    1.033698] usbcore: registered new interface driver usb-storage
[    1.039945] usbcore: registered new interface driver ums-alauda
[    1.048403] usbcore: registered new interface driver ums-cypress
[    1.054618] usbcore: registered new interface driver ums-datafab
[    1.060698] usbcore: registered new interface driver ums_eneub6250
[    1.067054] usbcore: registered new interface driver ums-freecom
[    1.073131] usbcore: registered new interface driver ums-isd200
[    1.079218] usbcore: registered new interface driver ums-jumpshot
[    1.085475] usbcore: registered new interface driver ums-karma
[    1.091419] usbcore: registered new interface driver ums-onetouch
[    1.099947] usbcore: registered new interface driver ums-realtek
[    1.106163] usbcore: registered new interface driver ums-sddr09
[    1.112162] usbcore: registered new interface driver ums-sddr55
[    1.118266] usbcore: registered new interface driver ums-usbat
[    1.130031] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin PA2 already requested by 1c25400.serial; cannot claim for 1c24800.rtp
[    1.141373] suniv-f1c100s-pinctrl 1c20800.pinctrl: pin-2 (1c24800.rtp) status -22
[    1.148918] suniv-f1c100s-pinctrl 1c20800.pinctrl: could not request pin 2 (PA2) from group PA2  on device 1c20800.pinctrl
[    1.159973] sun4i-ts 1c24800.rtp: Error applying setting, reverse things back
[    1.167186] sun4i-ts: probe of 1c24800.rtp failed with error -22
[    1.173373] uvcvideo: Unable to create debugfs directory
[    1.178907] usbcore: registered new interface driver uvcvideo
[    1.184721] USB Video Class driver (1.1.1)
[    1.188817] gspca_main: v2.14.0 registered
[    1.196678] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.208575] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.248503] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.258844] usbcore: registered new interface driver usbhid
[    1.264550] usbhid: USB HID core driver
[    1.269140] Initializing XFRM netlink socket
[    1.273499] NET: Registered protocol family 17
[    1.278145] NET: Registered protocol family 15
[    1.295360] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.311432] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[    1.324542] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0633e4c)
[    1.335228] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0632ab4)
[    1.342887] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.349572] [drm] No driver support for vblank timestamp query.
[    1.360986] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.374239] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[    1.384788] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.398363] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.404152] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.420283] hub 1-0:1.0: USB hub found
[    1.424217] hub 1-0:1.0: 1 port detected
[    1.438113] random: fast init done
[    1.448189] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.457779] devtmpfs: mounted
[    1.464849] Freeing unused kernel memory: 1024K
[    1.469485] Run /sbin/mnt_overlay as init process
[    1.686254] random: crng init done
[    2.217634] overlayfs: upper fs does not support tmpfile.
[    2.223103] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
Starting syslogd: OK
Starting demo: main: All ok!
OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: The framebuffer device was opened successfully.
800x480, 16bpp
The framebuffer device was mapped to memory successfully.
OK
Starting network: OK

Welcome to Buildroot
root login: 

其中配置失败如下:

[    0.156593] simple-framebuffer chosen:framebuffer@83e89000: No memory resource
[    0.156673] simple-framebuffer: probe of chosen:framebuffer@83e89000 failed with error -22

请问下这里的framebuffer不需要启动吗?
开机后lcd已经显示正常,强行改了drm驱动把32bpp改成了16bpp,由于tiny200硬件设计是就已经处理了RGB反色的问题,现在LCD的颜色也是显示正常的!
主要改动如下:
0009-modify-sun4i_drv-for-rgb565.rar

离线

#2 2020-11-28 22:22:52

Blues
会员
注册时间: 2019-10-27
已发帖子: 3
积分: 3

Re: tiny200 framebuffer配置问题

tiny200 framebuffer 非常不错

离线

#3 2020-11-29 19:56:35

孤星泪
会员
注册时间: 2020-03-18
已发帖子: 235
积分: 231

Re: tiny200 framebuffer配置问题

drm和simplefb只能二选一,这两个是冲突的吧。

离线

#4 2020-11-30 10:40:21

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 389
积分: 338

Re: tiny200 framebuffer配置问题

没写reg吧,drm加载的时候simplefb会自动卸载的

离线

#5 2021-12-25 11:02:22

CHSHIQING
会员
注册时间: 2020-11-27
已发帖子: 47
积分: 2

Re: tiny200 framebuffer配置问题

drm和simplefb是啥关系,一直搞不明白

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn