您尚未登录。

楼主 #1 2018-10-27 17:02:36

tom
会员
注册时间: 2018-03-14
已发帖子: 128
积分: 127.5

N32926 Framebuffer驱动增大到1024x768后出错

如题,在linux下,将fb尺寸改为1024*768后,驱动在申请内存的时候出错,系统崩溃。改为1024*600,申请正常。

    0.860000] ---w55fa92fb_init ----w55fa92 frame buffer init
[    0.860000] ###########w55fa92 frame buffer probe############
[    0.890000] 1*** fbi->fb->fix.smem_len = 0x438000
[    0.890000] ------------[ cut here ]------------
[    0.890000] WARNING: at mm/page_alloc.c:1968 __alloc_pages_nodemask+0x148/0x568()
[    0.900000] Modules linked in:
[    0.900000] Backtrace:
[    0.910000] [<c030b7f4>] (dump_backtrace+0x0/0x110) from [<c030bd54>] (dump_stack+0x18/0x1c)
[    0.910000]  r6:c03515a0 r5:c05dba40 r4:000007b0
[    0.920000] [<c030bd3c>] (dump_stack+0x0/0x1c) from [<c031b68c>] (warn_slowpath_common+0x58/0x70)
[    0.930000] [<c031b634>] (warn_slowpath_common+0x0/0x70) from [<c031b6c8>] (warn_slowpath_null+0x24/0x2c)
[    0.940000]  r8:c3c1a000 r7:00000000 r6:0000000b r5:000000d0 r4:c064d511
[    0.940000] [<c031b6a4>] (warn_slowpath_null+0x0/0x2c) from [<c03515a0>] (__alloc_pages_nodemask+0x148/0x568)
[    0.950000] [<c0351458>] (__alloc_pages_nodemask+0x0/0x568) from [<c030d978>] (__dma_alloc+0x100/0x2b0)
[    0.960000] [<c030d878>] (__dma_alloc+0x0/0x2b0) from [<c030db50>] (dma_alloc_writecombine+0x28/0x34)
[    0.970000] [<c030db28>] (dma_alloc_writecombine+0x0/0x34) from [<c056b1e0>] (w55fa92fb_probe+0x400/0x9fc)
[    0.980000] [<c056ade0>] (w55fa92fb_probe+0x0/0x9fc) from [<c044c62c>] (platform_drv_probe+0x20/0x24)
[    0.990000] [<c044c60c>] (platform_drv_probe+0x0/0x24) from [<c044b41c>] (driver_probe_device+0xb8/0x174)
[    1.000000] [<c044b364>] (driver_probe_device+0x0/0x174) from [<c044b6cc>] (__driver_attach+0x6c/0x90)
[    1.010000]  r7:c062ae30 r6:c062ae30 r5:c06226f4 r4:c06226c0
[    1.020000] [<c044b660>] (__driver_attach+0x0/0x90) from [<c044a660>] (bus_for_each_dev+0x58/0x8c)
[    1.020000]  r6:c044b660 r5:c3c1bef0 r4:00000000
[    1.030000] [<c044a608>] (bus_for_each_dev+0x0/0x8c) from [<c044b270>] (driver_attach+0x20/0x28)
[    1.040000]  r7:00000013 r6:c3416e40 r5:c062ae30 r4:c001d3b8
[    1.040000] [<c044b250>] (driver_attach+0x0/0x28) from [<c044adfc>] (bus_add_driver+0xa8/0x238)
[    1.050000] [<c044ad54>] (bus_add_driver+0x0/0x238) from [<c044b974>] (driver_register+0xb0/0x13c)
[    1.060000] [<c044b8c4>] (driver_register+0x0/0x13c) from [<c044c86c>] (platform_driver_register+0x4c/0x60)
[    1.070000] [<c044c820>] (platform_driver_register+0x0/0x60) from [<c0015728>] (w55fa92fb_init+0x24/0x34)
[    1.080000] [<c0015704>] (w55fa92fb_init+0x0/0x34) from [<c03073a8>] (do_one_initcall+0x60/0x1ac)
[    1.090000] [<c0307348>] (do_one_initcall+0x0/0x1ac) from [<c00087a4>] (kernel_init+0xb0/0x168)
[    1.100000] [<c00086f4>] (kernel_init+0x0/0x168) from [<c031ece8>] (do_exit+0x0/0x658)
[    1.110000]  r5:c00086f4 r4:00000000
[    1.110000] ---[ end trace dec6997083161631 ]---
[    1.110000] 1*** _bg_mem_v 0x0
[    1.120000] 1*** _bg_mem_p 0xffffffff
[    1.120000] Failed to register framebuffer device: ENOMEM
[    1.130000] REG_LCM_LCDCPrm=0x43848805
[    1.130000] REG_LCM_TCON1=0xa0028058
[    1.130000] REG_LCM_TCON2=0x91512
[    1.140000] REG_LCM_TCON3=0x3ff02cf
[    1.140000] REG_LCM_TCON4=0x3200103
[    1.140000] REG_LCM_LCDCCtl=0x410013
[    1.150000] check_var(var=c3c9f020, info=c3c9f000)

完整的启动logo如下:

  [    0.000000] Linux version 2.6.35.4 (root@nuvoton) (gcc version 4.2.1) #358 PREEMPT Sat Oct 27 14:51:47 CST 2018
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: W55FA92
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Decoder Instance-0, width = 1280, height = 720
[    0.000000] Decoder Instance-0, offset = 0x0, total buf size = 0x77b000
[    0.000000] Encoder Instance-0, width = 1280, height = 720
[    0.000000] Encoder Instance-0, offset = 0x0, total buf size = 0x42f000
[    0.000000] TOTAL_VDE_BUF_SIZE = 0xbaa000, dec_total=0x77b000, enc_total=0x42f000
[    0.000000] AVC Buffer Size: 0xbaa000
[    0.000000] VIN_DEV1 Buffer Size: 0x906000
[    0.000000] CPU type 0x00fad007 is W55FA92
[    0.000000] w55fa92_external_clock   = 12.0 MHz
[    0.000000] w55fa92_apll_clock       = 432000 KHz
[    0.000000] w55fa92_upll_clock       = 240000 KHz
[    0.000000] w55fa92_mpll_clock       = 360000 KHz
[    0.000000] w55fa92_system_clock     = 240000 KHz
[    0.000000] w55fa92_cpu_clock        = 240000 KHz
[    0.000000] w55fa92_ahb_clock        = 120000 KHz
[    0.000000] w55fa92_apb_clock        = 60000 KHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0  console=ttyS1,115200n8 rdinit=/sbin/init mem=64M vt.global_cursor_default=0
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    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: 64MB = 64MB total
[    0.000000] Memory: 37232k/37232k available, 28304k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xfee00000 - 0xffe00000   (  16 MB)
[    0.000000]     vmalloc : 0xc4800000 - 0xe0000000   ( 440 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .init : 0xc0008000 - 0xc0307000   (3068 kB)
[    0.000000]       .text : 0xc0307000 - 0xc061d000   (3160 kB)
[    0.000000]       .data : 0xc061e000 - 0xc063ac20   ( 116 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU-based detection of stalled CPUs is disabled.
[    0.000000]  Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:47
[    0.000000] Console: colour dummy device 80x30
[    0.000000] w55fa92_serial_initconsole, w55fa92-uart
[    0.000000] w55fa92_serial_init_ports: initialising ports...
[    0.000000] w55fa92_serial_init_port: port=c062e6ac, platdev=c0623708
[    0.000000] w55fa92_serial_init_port: c062e6ac (hw 0)...
[    0.000000] resource c0623698 (b8008000..b80080ff)
[    0.000000] port: map=b8008000, mem=f8008000, irq=14, clock=12000000
[    0.000000] w55fa92_serial_resetport: port=c062e6ac (b8008000), cfg=c0624118
[    0.000000] w55fa92_serial_init_port: port=c062e750, platdev=c06237c0
[    0.000000] w55fa92_serial_init_port: c062e750 (hw 1)...
[    0.000000] resource c06236d0 (b8008100..b80081ff)
[    0.000000] port: map=b8008100, mem=f8008100, irq=30, clock=12000000
[    0.000000] w55fa92_serial_resetport: port=c062e750 (b8008100), cfg=c0624134
[    0.000000] w55fa92_serial_console_setup: port=c062e750 (1)
[    0.000000] w55fa92_serial_console_setup: baud 115200
[    0.000000] baud=115200, quot=102
[    0.000000] w-config: 8bits/char
[    0.000000] console [ttyS1] enabled
[    0.000000] w55fa92_avc_alloc_mem : Kernel allocate phy buf addr =0x665000, vir_addr = 0xc0665000
[    0.000000] ENCODER_TOTAL_SIZE = 0x42f000, DECODER_TOTAL_SIZE = 0x77b000
[    0.000000] w55fa92_avc_alloc_mem,_ENCODER_BUF_START = 0x665000,  _DECODER_BUF_START = 0xa94000,
[    0.030000] Calibrating delay loop... 119.60 BogoMIPS (lpj=598016)
[    0.270000] pid_max: default: 32768 minimum: 301
[    0.270000] Mount-cache hash table entries: 512
[    0.280000] CPU: Testing write buffer coherency: ok
[    0.280000] devtmpfs: initialized
[    0.290000] NET: Registered protocol family 16
[    0.440000] bio: create slab <bio-0> at 0
[    0.450000] SCSI subsystem initialized
[    0.450000] usbcore: registered new interface driver usbfs
[    0.460000] usbcore: registered new interface driver hub
[    0.470000] usbcore: registered new device driver usb
[    0.480000] cfg80211: Calling CRDA to update world regulatory domain
[    0.490000] Switching to clocksource w55fa92-timer1
[    0.600000] NET: Registered protocol family 2
[    0.610000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.620000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.620000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.630000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.630000] TCP reno registered
[    0.640000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.640000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.650000] NET: Registered protocol family 1
[    0.660000] RPC: Registered udp transport module.
[    0.660000] RPC: Registered tcp transport module.
[    0.660000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.830000] register clock device
[    0.830000] w55fa92_edma_init
[    0.840000] ROMFS MTD (C) 2007 Red Hat, Inc.
[    0.850000] msgmni has been set to 72
[    0.850000] io scheduler noop registered (default)
[    0.860000] ---w55fa92fb_init ----w55fa92 frame buffer init 
[    0.860000] ###########w55fa92 frame buffer probe############
[    0.890000] 1*** fbi->fb->fix.smem_len = 0x438000
[    0.890000] ------------[ cut here ]------------
[    0.890000] WARNING: at mm/page_alloc.c:1968 __alloc_pages_nodemask+0x148/0x568()
[    0.900000] Modules linked in:
[    0.900000] Backtrace: 
[    0.910000] [<c030b7f4>] (dump_backtrace+0x0/0x110) from [<c030bd54>] (dump_stack+0x18/0x1c)
[    0.910000]  r6:c03515a0 r5:c05dba40 r4:000007b0
[    0.920000] [<c030bd3c>] (dump_stack+0x0/0x1c) from [<c031b68c>] (warn_slowpath_common+0x58/0x70)
[    0.930000] [<c031b634>] (warn_slowpath_common+0x0/0x70) from [<c031b6c8>] (warn_slowpath_null+0x24/0x2c)
[    0.940000]  r8:c3c1a000 r7:00000000 r6:0000000b r5:000000d0 r4:c064d511
[    0.940000] [<c031b6a4>] (warn_slowpath_null+0x0/0x2c) from [<c03515a0>] (__alloc_pages_nodemask+0x148/0x568)
[    0.950000] [<c0351458>] (__alloc_pages_nodemask+0x0/0x568) from [<c030d978>] (__dma_alloc+0x100/0x2b0)
[    0.960000] [<c030d878>] (__dma_alloc+0x0/0x2b0) from [<c030db50>] (dma_alloc_writecombine+0x28/0x34)
[    0.970000] [<c030db28>] (dma_alloc_writecombine+0x0/0x34) from [<c056b1e0>] (w55fa92fb_probe+0x400/0x9fc)
[    0.980000] [<c056ade0>] (w55fa92fb_probe+0x0/0x9fc) from [<c044c62c>] (platform_drv_probe+0x20/0x24)
[    0.990000] [<c044c60c>] (platform_drv_probe+0x0/0x24) from [<c044b41c>] (driver_probe_device+0xb8/0x174)
[    1.000000] [<c044b364>] (driver_probe_device+0x0/0x174) from [<c044b6cc>] (__driver_attach+0x6c/0x90)
[    1.010000]  r7:c062ae30 r6:c062ae30 r5:c06226f4 r4:c06226c0
[    1.020000] [<c044b660>] (__driver_attach+0x0/0x90) from [<c044a660>] (bus_for_each_dev+0x58/0x8c)
[    1.020000]  r6:c044b660 r5:c3c1bef0 r4:00000000
[    1.030000] [<c044a608>] (bus_for_each_dev+0x0/0x8c) from [<c044b270>] (driver_attach+0x20/0x28)
[    1.040000]  r7:00000013 r6:c3416e40 r5:c062ae30 r4:c001d3b8
[    1.040000] [<c044b250>] (driver_attach+0x0/0x28) from [<c044adfc>] (bus_add_driver+0xa8/0x238)
[    1.050000] [<c044ad54>] (bus_add_driver+0x0/0x238) from [<c044b974>] (driver_register+0xb0/0x13c)
[    1.060000] [<c044b8c4>] (driver_register+0x0/0x13c) from [<c044c86c>] (platform_driver_register+0x4c/0x60)
[    1.070000] [<c044c820>] (platform_driver_register+0x0/0x60) from [<c0015728>] (w55fa92fb_init+0x24/0x34)
[    1.080000] [<c0015704>] (w55fa92fb_init+0x0/0x34) from [<c03073a8>] (do_one_initcall+0x60/0x1ac)
[    1.090000] [<c0307348>] (do_one_initcall+0x0/0x1ac) from [<c00087a4>] (kernel_init+0xb0/0x168)
[    1.100000] [<c00086f4>] (kernel_init+0x0/0x168) from [<c031ece8>] (do_exit+0x0/0x658)
[    1.110000]  r5:c00086f4 r4:00000000
[    1.110000] ---[ end trace dec6997083161631 ]---
[    1.110000] 1*** _bg_mem_v 0x0
[    1.120000] 1*** _bg_mem_p 0xffffffff
[    1.120000] Failed to register framebuffer device: ENOMEM
[    1.130000] REG_LCM_LCDCPrm=0x43848805
[    1.130000] REG_LCM_TCON1=0xa0028058
[    1.130000] REG_LCM_TCON2=0x91512
[    1.140000] REG_LCM_TCON3=0x3ff02cf
[    1.140000] REG_LCM_TCON4=0x3200103
[    1.140000] REG_LCM_LCDCCtl=0x410013
[    1.150000] check_var(var=c3c9f020, info=c3c9f000)
[    1.150000] w55fa92fb_set_par !!! ================= 
[    1.160000] var->width = 0x400 !!!
[    1.160000] var->bits_per_pixel = 0x10 !!! 

离线

楼主 #2 2018-10-27 17:08:58

tom
会员
注册时间: 2018-03-14
已发帖子: 128
积分: 127.5

Re: N32926 Framebuffer驱动增大到1024x768后出错

搜索网络,根据这篇比较有代表的帖子: https://blog.csdn.net/zjujoe/article/details/4887936/

其中提到修改 CONSISTENT_DMA_SIZE  常量,我尝试将该常量由8改为16MB,依然出错。
怀疑系统内存不够,尝试将编解码功能去掉,节约了12MB内存后,依然出错。

该问题可能原因是?

离线

楼主 #6 2018-10-29 15:05:43

tom
会员
注册时间: 2018-03-14
已发帖子: 128
积分: 127.5

Re: N32926 Framebuffer驱动增大到1024x768后出错

dgtg 说:

请问楼主,n32926跑linux,驱屏1024x600,还能做视频相关的应用吗?如H264编解码

用是可以用,就是比较慢,毕竟这货主频太低了  要求不高的地方用。

离线

楼主 #7 2018-10-29 16:45:13

tom
会员
注册时间: 2018-03-14
已发帖子: 128
积分: 127.5

Re: N32926 Framebuffer驱动增大到1024x768后出错

问题解决了,内核中定义了最大DMA申请大小,将MAX_ORDER宏增大即可。
位置:include/linux/mmzone.h

离线

页脚

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

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