AM3358上运行kernel3.2.0时,LCD显示正常,用fbset显示:
mode "1024×768-28" # D: 30 MHz, H: 22.322 kHz, V: 27.694 Hz geometry 1024 768 1024 1536 16 timings 33333 100 120 10 18 100 10 accel false rgba 5/11,6/5,5/0,0/0 endmode
移植kernel3.14.26后,LCD能够显示,但是显示文字图形有点在抖动,用fbset看:
mode "1024×768-0" # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
geometry 1024 768 1024 2304 16
timings 0 0 0 0 0 0 0
accel true rgba 5/11,6/5,5/0,0/0
endmode
dts中的设置:
panel {
compatible = "ti,tilcdc,panel";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins>;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <16>;
fdd = <0xff>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <6>;
invert_pxl_clk = <1>;
tft-alt-mode = <0>;
};
display-timings {
1024x768p60 {
clock-frequency = <56880000>;
hactive = <1024>;
vactive = <768>;
hfront-porch = <76>;
hback-porch = <50>;
hsync-len = <50>;
vfront-porch = <12>;
vback-porch = <5>;
vsync-len = <5>;
hsync-active = <1>;
vsync-active = <1>;
de-active = <1>;
pixelclk-active = <1>;
};
};
};
在etc目录下建fb,modes,增加mode设置也没用.
请问有没有什么思路解决这个问题?
谢谢
Jerry Wu:
补充:
用示波器测量了AM3358到LVDS的pixclock,是56.88MHz.
自己编写了一个小程序,获取并显示fb的参数:
if(ioctl(fb,FBIOGET_FSCREENINFO,&finfo)==0&&ioctl(fb,FBIOGET_VSCREENINFO,&vinfo)==0){ printf("The fb pck is %d\n",vinfo.pixclock); //显示时钟为0 printf("The display mem is %d\n",finfo.smem_len); printf("The line length is %d in byte\n",finfo.line_length); printf("The X is %d\n",vinfo.xres); printf("The Y is %d\n",vinfo.yres); printf("The virtual X is %d\n",vinfo.xres_virtual); printf("The virtual Y is %d\n",vinfo.yres_virtual); printf("The X offset is %d\n",vinfo.xoffset); printf("The Y offset is %d\n",vinfo.yoffset); printf("The bits per pixel is %d\n",vinfo.bits_per_pixel); printf("The red length is %d in bits\n",vinfo.red.length); printf("The red offset is %d in bits\n",vinfo.red.offset); printf("The green length is %d in bits\n",vinfo.green.length); printf("The green offset is %d in bits\n",vinfo.green.offset); printf("The blue length is %d in bits\n",vinfo.blue.length); printf("The blue offset is %d in bits\n",vinfo.blue.offset); mLen=finfo.line_length/8*vinfo.yres; }
Jerry Wu:
回复 quan liang:
板子没有jtag接口,无法接仿真器.自己编写了一个小程序,直接读取0x4830e000的寄存器的值,显示RASTER_CTRL,RASTER_TIMING0,RASTER_TIMING1,RASTER_TIMING2这4个寄存器的值不对,通过小程序强制写入正确的参数后,LCD抖动的问题消失.
不过现在的疑问是: 系统中只有tilcdc_drv.c和tilcdc_crtc.c对这几个寄存器进行操作,但是都没有使用从DTS中获得的数据来填写寄存器,而是使用了程序中默认的参数,这是否是tilcdc部分的bug?
quan liang:
回复 Jerry Wu:
这多半是你设备树写得有问题;我用4.1的内核没问题
Steven Liu1:
回复 Jerry Wu:
设备树里面的参数是会对这部分的寄存器进行操作的,如果是这个地方有问题,建议你核查一下设备数。
另外,如果怀疑你自己的设备树文件配置是否正确的话,建议你可以参考着,GPEVM的这个设备数的配置,上面的LCD屏幕手册比较容易下到。