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.

DM365 LCD分辨率咨询

Other Parts Discussed in Thread: TVP5150

各位大侠,请教一个问题哦?

开发板SEED-DVS365 (CPU是DM365)方案是支持分辨率为800X480的LCD屏幕,从CPU送出来的是PRGB格式的数字信号。现在因为需求改动,需要支持分辨率1366X768的LCD屏幕。请问,这个DM365支持吗?如果支持,大致应该怎么修改代码哦?需要修改驱动吗?还是直接改应用程序就OK了?

求各位大侠指导指导?不胜感激:)

  • 216MHz主频的365就支持不到了,因为其pixel clk最高是到27MHz的,不够。

    其他器件都嫩到74.25MHz的。   驱动方面大致也就是围绕时钟的配置来做的

  • 主频是300MHZ,只需要改时钟吗?我修改了vencrate_sd,也没用,还是白屏?请问具体要怎么修改?

  • 除了时钟,至少还要改行场同步

  • 改动如下

    static struct logicpd_encoder_config logicpd_encoder_configuration = {

    .no_of_outputs = LOGICPD_ENCODER_MAX_NO_OUTPUTS,

    .output[0] = {

         .output_name = VID_ENC_OUTPUT_LCD,

         .no_of_standard = LOGICPD_ENCODER_GRAPHICS_NUM_STD,

         .standards[0] = {

          .name = VID_ENC_STD_800x480,//VID_ENC_STD_640x480,

          .std = 1,

          .if_type = VID_ENC_IF_PRGB,

          .interlaced = 0,

          .xres = 1366, //800,//640,

          .yres = 768, //480,

          .fps ={60, 1},// {60, 1},

          .left_margin = 85,

          .right_margin = 70,

          .upper_margin = 32,

          .lower_margin = 11,

          .hsync_len = 9,

          .vsync_len = 9,

          .flags = 0}, /* hsync -ve, vsync -ve */

    发现程序运行起来后,KERNEL报空间不足:

    [    0.280000] Console: switching to colour frame buffer device 170x48

    [    0.350000] davincifb davincifb.0: dm_osd0_fb: 1366x768x16@0,0 with framebuffer size 6192KB

    [    0.410000] davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 9288KB

    [    0.460000] davincifb davincifb.0: dm_osd1_fb: 1366x768x4@0,0 with framebuffer size 6192KB

    [    0.520000] davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 9288KB

    [    0.560000] DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec

    [    0.570000] == dm365_pwm_init:e800000

    [    0.570000] MUX: initialized PWM1_G25

    [    0.570000] Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled

    [    0.570000] serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A

    [    0.570000] === serial_dl_write 40:d

    [    0.580000] serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A

    [    0.590000] Linux video capture interface: v2.00

    [    0.590000] vpfe_init

    [    0.600000] starting ccdc_reset...<7>

    [    0.600000] End of ccdc_reset...<5>vpfe_probe

    [    0.610000] TVP5150 : nummber of channels = 1

    [    0.610000] vpfe ccdc capture vpfe ccdc capture.1: vpif_register_decoder: decoder = TVP5150

    [    0.620000] oom-killer: gfp_mask=0xd1, order=10

    [    0.630000] Mem-info:

    [    0.630000] DMA per-cpu:

    [    0.630000] cpu 0 hot: high 18, batch 3 used:2

    [    0.640000] cpu 0 cold: high 6, batch 1 used:0

    [    0.640000] DMA32 per-cpu: empty

    [    0.640000] Normal per-cpu: empty

    [    0.650000] HighMem per-cpu: empty

    [    0.650000] Free pages:       21880kB (0kB HighMem)

    [    0.660000] Active:0 inactive:0 dirty:0 writeback:0 unstable:0 free:5470 slab:166 mapped:0 pagetables:0

    [    0.670000] DMA free:21880kB min:1144kB low:1428kB high:1716kB active:0kB inactive:0kB present:81920kB pages_scanned:0 all_unreclaimable? no

    [    0.680000] lowmem_reserve[]: 0 0 0 0

    [    0.680000] DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no

    [    0.690000] lowmem_reserve[]: 0 0 0 0

    [    0.700000] Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no

    [    0.710000] lowmem_reserve[]: 0 0 0 0

    [    0.710000] HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no

    [    0.720000] lowmem_reserve[]: 0 0 0 0

    [    0.730000] DMA: 0*4kB 10*8kB 16*16kB 8*32kB 5*64kB 8*128kB 8*256kB 9*512kB 3*1024kB 5*2048kB 0*4096kB 0*8192kB 0*16384kB = 21904kB

    [    0.740000] DMA32: empty

    [    0.740000] Normal: empty

    [    0.750000] HighMem: empty

    [    0.750000] Swap cache: add 0, delete 0, find 0/0, race 0+0

    [    0.750000] Free swap  = 0kB

    [    0.760000] Total swap = 0kB

    [    0.760000] Free swap:            0kB

    [    0.770000] 20480 pages of RAM

    [    0.770000] 5497 free pages

    [    0.770000] 14697 reserved pages

    [    0.780000] 166 slab pages

    [    0.780000] 0 pages shared

    [    0.780000] 0 pages swap cached

    [    0.790000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

    [    0.790000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

    [    0.800000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

    [    0.810000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

    [    0.820000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

    [    0.820000] Out of Memory: Kill process 2 (posix_cpu_timer) score 0 and children.

  • 后来,我修改了mem的大小。如下所示,把80M改为120M.

    setenv bootargs mem=120M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=jffs2 noinitrd rw init=/linuxrc davinci_enc_mngr.ch0_output=LCD davinci_capture.device_type=4 dm365_imp.oper_mode=0 mtdparts=physmap-flash.0:384K(bootloader),128K(params),2M(kernel),12M(jffs2) time lpj=741376

    这样子,就不会报空间不足的错误,程序可以往下正常运行了。不过,还是无法正常显示,仍然是白屏,且有时候变红,有时候变绿,变来变去的。

  • 你本来给到屏幕的是个什么样的东西呢?有没有按照屏的SPEC要求的时序来配置你代码里面出现的参数?这个都是可以用示波器来量出来的。

  • 本来给屏幕的是分辨率为800X480的PRGB格式的数据。现在屏幕改为1366X768分辨率了。

    请问,您的邮箱地址或QQ号码是多少?我把LCD屏的资料发给你。因为我看LCD屏资料,并没有特别指明场同步之类的参数。只有分辨率和CLK参数。

  • 这个论坛可以发附件的。

    此外,同步信号的极性等都是需要考虑的

    建议你无论如何还是先用示波器量一下有没有这些个信号

  • 你的问题很大可能是H sync和V sync的极性两边不匹配.

  • 根据我对文档的理解

    我设置的VCLK是81MHZ,HSYNC的周期是(1366+96+98)/81,即19.25us。VSYNC周期是19.25us*(768+32+11),即15.611ms。

    如下所示:

    static struct logicpd_encoder_config logicpd_encoder_configuration = {
     .no_of_outputs = LOGICPD_ENCODER_MAX_NO_OUTPUTS,
     .output[0] = {
            .output_name = VID_ENC_OUTPUT_LCD,
            .no_of_standard = LOGICPD_ENCODER_GRAPHICS_NUM_STD,
            .standards[0] = {
               .name = VID_ENC_STD_800x480,//VID_ENC_STD_640x480,
               .std = 1,
               .if_type = VID_ENC_IF_PRGB,
               .interlaced = 0,
               .xres = 1366, //800,//640,
               .yres = 768, //480,
               .fps ={60, 1},// {60, 1},
               .left_margin = 96,
               .right_margin = 98,
               .upper_margin = 32,
               .lower_margin = 11,
               .hsync_len = 9,
               .vsync_len = 9,
               .flags = 0}, /* hsync -ve, vsync -ve */

    实际抓出来的hsync,vsync,vclk也跟理论上设置的值一致。

    至于hsync,vsync的极性,也如文档(如果我对文档的理解没有错的话),默认为高电平,即极性为高电平。

    HT185WX1-100 (2-CCFL).pdf