This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335 linux 3.2内核,LCD设置1280x1024分辨率,内核启动出错



之前1024x768的屏能用,现在项目上需要使用SXGA分辨率1028x1024的屏,修改da8xx-fb.c中的lcd时序,结果内核启动后无法分配帧缓冲区,用示波器测量lcd时钟引脚也无时钟输出。分辨率如下:

static struct da8xx_panel known_lcd_panels[] = {
    [0] =
    {
    .name = "LCD1280x1024",
    .width = 1280,
    .height = 1024,
    .hfp = 48,
    .hbp = 248,
    .hsw = 112,
    .vfp = 1,
    .vbp = 38,//24
    .vsw = 3,
    .pxl_clk = 50000000,
    .invert_pxl_clk = 0,
    },

TCP cubic registered
NET: Registered protocol family 10
Mobile IPv6
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
ThumbEE CPU extension supported.
mux: Failed to setup hwmod io irq -22
[<c003bbf4>] (warn_slowpath_common+0x0/0x6c) from [<c003bc84>] (warn_slowpath_null+0x24/0x2c)                                                          
 r9:c08d0c3c r8:00000000 r7:00000000 r6:c0870110 r5:c08f4ee0                                                                                           
r4:00000000                                                                                                                                            
[<c003bc60>] (warn_slowpath_null+0x0/0x2c) from [<c0083094>] (__alloc_pages_nodemask+0x464/0x63c)                                                      
[<c0082c30>] (__alloc_pages_nodemask+0x0/0x63c) from [<c001a49c>] (__dma_alloc+0x90/0x308)                                                             
[<c001a40c>] (__dma_alloc+0x0/0x308) from [<c001a7a4>] (dma_alloc_coherent+0x5c/0x68)                                                                  
[<c001a748>] (dma_alloc_coherent+0x0/0x68) from [<c0603c64>] (fb_probe+0x7c0/0xbc4)                                                                    
 r7:df04f008 r6:00a00000 r5:c08a52b0 r4:df11a654                                                                                                       
[<c06034a4>] (fb_probe+0x0/0xbc4) from [<c0293af8>] (platform_drv_probe+0x20/0x24)                                                                     
[<c0293ad8>] (platform_drv_probe+0x0/0x24) from [<c029264c>] (driver_probe_device+0xa0/0x1ac)                                                          
[<c02925ac>] (driver_probe_device+0x0/0x1ac) from [<c02927ec>] (__driver_attach+0x94/0x98)                                                             
 r9:00000000 r8:c0849d60 r7:00000000 r6:df04f03c r5:c08a50c4                                                                                           
r4:df04f008                                                                                                                                            
[<c0292758>] (__driver_attach+0x0/0x98) from [<c0291e00>] (bus_for_each_dev+0x68/0x94)                                                                 
 r7:00000000 r6:c0292758 r5:df02dee0 r4:c08a50c4                                                                                                       
[<c0291d98>] (bus_for_each_dev+0x0/0x94) from [<c029249c>] (driver_attach+0x24/0x28)                                                                   
 r7:00000000 r6:df182640 r5:c08aa190 r4:c08a50c4                                                                                                       
[<c0292478>] (driver_attach+0x0/0x28) from [<c0291668>] (bus_add_driver+0xa8/0x23c)                                                                    
[<c02915c0>] (bus_add_driver+0x0/0x23c) from [<c0292e50>] (driver_register+0x80/0x13c)                                                                 
[<c0292dd0>] (driver_register+0x0/0x13c) from [<c0293f94>] (platform_driver_register+0x4c/0x60)                                                        
 r7:00000013 r6:c003f2b8 r5:c08d1100 r4:c086d5c0                                                                                                       
[<c0293f48>] (platform_driver_register+0x0/0x60) from [<c0849d74>] (da8xx_fb_init+0x14/0x1c)                                                           
[<c0849d60>] (da8xx_fb_init+0x0/0x1c) from [<c0008608>] (do_one_initcall+0x3c/0x190)                                                                   
[<c00085cc>] (do_one_initcall+0x0/0x190) from [<c0830288>] (kernel_init+0x80/0x124)                                                                    
[<c0830208>] (kernel_init+0x0/0x124) from [<c003f2b8>] (do_exit+0x0/0x69c)                                                                             
 r5:c0830208 r4:00000000                                                                                                                               
---[ end trace 6fcb132ac310d004 ]---                                                                                                                   
da8xx_lcdc da8xx_lcdc.0: GLCD: kmalloc for frame buffer failed                                                                                         
da8xx_lcdc: probe of da8xx_lcdc.0 failed with error -22

请问有在AM335使用过大分辨率的吗?

  • 最大的我只使用过1024x600,还是挺稳定的

    再大的就没用过了

  • 目前有测试过1080p30,是OK的。在使用大尺寸的时候,要注意一下你的kernel buffer size的分配,算的时候要算double size,且默认的时候是设置为5M的。可以在menuconfig中找到lcd的配置选项进行修改。尝试一下。

  • 试过,参考http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/15171.aspx  的方法,将MAX_ORDER改为14,并且menuconfig配置CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE为14,结果打印每个一段时间打印init: untracked pid xxx exited,执行logcat查看发现:

    I/SurfaceFlinger(  239): SurfaceFlinger is starting
    I/SurfaceFlinger(  239): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
    E/FramebufferNativeWindow(  239): couldn't open framebuffer HAL (Not a typewriter)
    E/FramebufferNativeWindow(  239): couldn't open gralloc HAL (Not a typewriter)
    E/SurfaceFlinger(  239): Display subsystem failed to initiinit: untracked pid 235 exited
    alize. check logs. exiting...
    D/AndroidRuntime(  242):
    D/AndroidRuntime(  242): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
    D/AndroidRuntime(  242): CheckJNI is ON
    D/dalvikvm(  242): Unable to stat classpath element '/system/framework/apache-xml.jar'
    I/ethernet(  242): Loading ethernet jni class
    I/SamplingProfilerIntegration(  242): Profiling disabled.

    弄不清楚是什么原因导致。

  • 请问您说的double size是在哪里的代码?

    另外,我发现修改menuconfig中的CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE参数后,编译内核时并没有任何c文件被重新编译,

    在源码中搜索发现arch/arm/mm/dma-mapping.c用到了这一参数,但是并没有被重新编译,为什么会这样?

    arch/arm/mm/dma-mapping.c:131:#ifdef CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE
    arch/arm/mm/dma-mapping.c:133:#if (CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE == 0)
    arch/arm/mm/dma-mapping.c:134:#undef CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE
    arch/arm/mm/dma-mapping.c:135:#define CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE 2
    arch/arm/mm/dma-mapping.c:139:    (((CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)