TI中文支持网
TI专业的中文技术问题搜集分享网站

AM335x 使用24bit,18.5寸屏问题

目前使用1366*768分别率的24bit连接方式的LVDS屏,内核一直报启动错误

da8xx_lcdc da8xx_lcdc.0: GLCD: kmalloc for frame buffer failed。

在def_config中设置

CONFIG_FORCE_MAX_ZONEORDER=16

CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE=14

在board-am335xevm.c中的配置为

static struct pinmux_config lcdc_pin_mux[] = {
	{"lcd_data0.lcd_data0",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data1.lcd_data1",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data2.lcd_data2",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data3.lcd_data3",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data4.lcd_data4",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data5.lcd_data5",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data6.lcd_data6",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data7.lcd_data7",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data8.lcd_data8",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data9.lcd_data9",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data10.lcd_data10",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data11.lcd_data11",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data12.lcd_data12",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data13.lcd_data13",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data14.lcd_data14",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
	{"lcd_data15.lcd_data15",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
#if 1{"gpmc_ad8.lcd_data16",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad9.lcd_data17",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad10.lcd_data18",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad11.lcd_data19",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad12.lcd_data20",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad13.lcd_data21",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad14.lcd_data22",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},{"gpmc_ad15.lcd_data23",OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT|AM33XX_PULL_DISA},
#endif
	{"lcd_vsync.lcd_vsync",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
	{"lcd_hsync.lcd_hsync",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
	{"lcd_pclk.lcd_pclk",		OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
	{"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
	{NULL, 0},
};
static struct lcd_ctrl_config dvi_cfg = {
&dvi_panel,
.ac_bias = 255,
.ac_bias_intrpt = 0,
.dma_burst_sz = 16,
.bpp = 24, /*RGB888*/
.fdd = 0x80,
.tft_alt_mode = 0,
.stn_565_mode = 0,
.mono_8bit_mode = 0,
.invert_line_clock = 1,
.invert_frm_clock = 1,
.sync_edge = 0,
.sync_ctrl = 1,
.raster_order = 0,
};

struct da8xx_lcdc_platform_data TFT_HM185WX1_pdata = {
.manu_name = "BOE",
.controller_data = &dvi_cfg,
.type = "HM185WX1-400",
};

在da8xx-fb.c中的配置为

[8] = {
.name = "HM185WX1-400",
.width = 1366, // 屏幕x轴像素长度
.height = 768, // 屏幕y轴像素长度
.hfp = 100, //水平前沿
.hbp = 14, //水平后沿
.hsw = 20, //水平同步信号脉冲
.vfp = 18, //垂直前沿
.vbp = 10, //垂直后沿
.vsw = 10, //垂直同步信号脉冲
.pxl_clk = 60000000, //像素时钟频率
.invert_pxl_clk = 0,
},

问下为什么报内核申请内存失败的错误,怎么解决,这是内核的报错信息

da8xx_lcdc da8xx_lcdc.0: GLCD: Found HM185WX1-400 panel
————[ cut here ]————
WARNING: at mm/page_alloc.c:2095 __alloc_pages_nodemask+0x448/0x600()
Modules linked in:
Backtrace:[<c0012610>] (dump_backtrace+0x0/0x110) from [<c03c77f8>] (dump_stack+0x18/0x1c)
r6:c048b074 r5:0000082f r4:00000000 r3:c064dc0c
[<c03c77e0>] (dump_stack+0x0/0x1c) from [<c003b228>] (warn_slowpath_common+0x5c/0x6c)
[<c003b1cc>] (warn_slowpath_common+0x0/0x6c) from [<c003b25c>] (warn_slowpath_null+0x24/0x2c)
r8:00000000 r7:00000000 r6:c0680a04 r5:c062e0f0 r4:c069f448
r3:00000009
[<c003b238>] (warn_slowpath_null+0x0/0x2c) from [<c007e6bc>] (__alloc_pages_nodemask+0x448/0x600)
[<c007e274>] (__alloc_pages_nodemask+0x0/0x600) from [<c00144c0>] (__dma_alloc+0xa4/0x438)
[<c001441c>] (__dma_alloc+0x0/0x438) from [<c00148e8>] (dma_alloc_coherent+0x60/0x68)
[<c0014888>] (dma_alloc_coherent+0x0/0x68) from [<c03bfb8c>] (fb_probe+0xb90/0xba8)
r7:cf06ac08 r6:cf19d650 r5:c0667040 r4:01002000
[<c03beffc>] (fb_probe+0x0/0xba8) from [<c01ec388>] (platform_drv_probe+0x20/0x24)
[<c01ec368>] (platform_drv_probe+0x0/0x24) from [<c01eabd0>] (driver_probe_device+0xc0/0x2d8)
[<c01eab10>] (driver_probe_device+0x0/0x2d8) from [<c01eae7c>] (__driver_attach+0x94/0x98)
r8:00000000 r7:00000000 r6:cf06ac3c r5:c0666e04 r4:cf06ac08
[<c01eade8>] (__driver_attach+0x0/0x98) from [<c01e9a08>] (bus_for_each_dev+0x58/0x84)
r6:00000000 r5:c01eade8 r4:c0666e04 r3:c01eade8
[<c01e99b0>] (bus_for_each_dev+0x0/0x84) from [<c01ea7c8>] (driver_attach+0x24/0x28)
r6:cf1bba40 r5:c066b5d0 r4:c0666e04
[<c01ea7a4>] (driver_attach+0x0/0x28) from [<c01ea430>] (bus_add_driver+0x204/0x2d8)
[<c01ea22c>] (bus_add_driver+0x0/0x2d8) from [<c01eb420>] (driver_register+0x80/0x184)
[<c01eb3a0>] (driver_register+0x0/0x184) from [<c01ec8f4>] (platform_driver_register+0x5c/0x60)
[<c01ec898>] (platform_driver_register+0x0/0x60) from [<c05139b4>] (da8xx_fb_init+0x18/0x1c)
[<c051399c>] (da8xx_fb_init+0x0/0x1c) from [<c00087dc>] (do_one_initcall+0x3c/0x184)
[<c00087a0>] (do_one_initcall+0x0/0x184) from [<c04f7880>] (kernel_init+0x9c/0x12c)
[<c04f77e4>] (kernel_init+0x0/0x12c) from [<c003e9d8>] (do_exit+0x0/0x660)

yongqing wang:

DMA_SIZE扩大试试

Jian Zhou:

回复 yongqing wang:

这个是在SDK06上测试的么?除了evm.c以外还有改过其他地方么?

haibo hao:

回复 Jian Zhou:

屏可以点亮了,但是我发现pxl_clk设置的较高的时候比如70M,80M这样,屏幕闪烁,我想问这是什么原因。然后就是平常不闪烁,但是用ffplay播放320*180分辨率视频的时候,视频拉伸后就会闪烁。

haibo hao:

回复 Steven Liu1:

bpp = 24是RGB888吗?bpp = 32 又是什么?

haibo hao:

回复 Steven Liu1:

bpp = 24是RGB888吗?bpp = 32 又是什么?

Trolong_support:

回复 haibo hao:

bpp:bits per pixel,每个像素点的位数。
bpp = 32 ,表示每个像素点为32位。

yao luo:

回复 Steven Liu1:

有办法支持不是16整数倍像素的LCD吗?

赞(0)
未经允许不得转载:TI中文支持网 » AM335x 使用24bit,18.5寸屏问题
分享到: 更多 (0)