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.

1280*800 resolution screen

Other Parts Discussed in Thread: DA8XX

Plat : AM3359

system:android 4.0.3

   I want to drive 1280*800 resolution screen,I modified the structure(TI-Android-ICS-4.0.3_AM335x_3.0.1/kernel/drivers/video/da8xx-fb.c) "static struct da8xx_panel known_lcd_panels[] " to

/* ThreeFive S9700RTWV35TR */

[2] = {   .name = "TFC_S9700RTWV35TR_01B",

               .width = 1280,

                .height = 800, 

                  .hfp = 168,

                 .hbp = 0,

                  .hsw = 0,

                  .vfp = 16,

                   .vbp = 0, 

                    .vsw = 0,

                    .pxl_clk = 68935680,  

                       .invert_pxl_clk = 0,  },

 

 

I found the code

par->vram_size = lcdc_info->width * lcdc_info->height * lcd_cfg->bpp;

 lcm = LCM((lcdc_info->width * lcd_cfg->bpp)/8, PAGE_SIZE);

 par->vram_size = RoundUp(par->vram_size/8, lcm);

 par->vram_size = par->vram_size * LCD_NUM_BUFFERS;

 

par->vram_size is More than 4 M size,so   dma_alloc_coherent(NULL,          par->vram_size,          (resource_size_t *) &par->vram_phys,          GFP_KERNEL | GFP_DMA)  , apply memery is not successful!!!!!

Whether there is a way out?

  • Hi Jack,

         "par->vram_size" is calculated as above (rounded up to lcm) because the available memory from framebuffer driver is not sufficient for SGX (which need 2 buffers) under certain cases like 16-bit WVGA resolution. Could you please elaborate on the issue observed with the "dma_alloc_coherent" ?

    Regards,

    Aditya

     

  • Hi,

    par->vram_size is More than 4 M size,so   dma_alloc_coherent(NULL,          par->vram_size,          (resource_size_t *) &par->vram_phys,          GFP_KERNEL | GFP_DMA)  , apply memery is not successful!!!!!

    Whether there is a way out?

    The dma_alloc_coherent is failing because there is no DMA able memory free,

    what you can do is for the device which you are requesting this memory you can

    declare dma_declare_coherent_memory(), which tells the kernel whenever DMA'able

    memory is requested you give from this region.  So what you need to do is use

    dma_declare_coherent_memory(), with whatever buffer size you need and then on any

    subsequent calls to dma_alloc_coherent() will get memory from this region and it wont fail.

    Thx,

    --Prabhakar Lad

  • Jack Dai said:

    par->vram_size is More than 4 M size,so   dma_alloc_coherent(NULL,          par->vram_size,          (resource_size_t *) &par->vram_phys,          GFP_KERNEL | GFP_DMA)  , apply memery is not successful!!!!!

    You could try increasing the value of CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE in the kernel config. It is set to 4 by default for AM335x.

  • I modify  the resolution,Serial information below:

    Found invalid GP EVM revision, falling back to Rev1.1A

     [    1.308959]  da8xx_lcdc.0: alias fck already exists

     [    1.314666] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel

     [    1.323120] ------------[ cut here ]------------ [    1.328033] WARNING: at mm/page_alloc.c:2110 __alloc_pages_nodemask+0x458/0x62c()

     [    1.335906] Modules linked in:

     [    1.339141] Backtrace:

     [    1.341735] [<c001803c>] (dump_backtrace+0x0/0x10c) from [<c04d5438>] (dump_stack+0x18/0x1c)

     [    1.350646]  r7:00000009 r6:0000083e r5:c00840a0 r4:00000000

    [    1.356628] [<c04d5420>] (dump_stack+0x0/0x1c) from [<c003d284>] (warn_slowpath_common+0x54/0x6c)

     [    1.365997] [<c003d230>] (warn_slowpath_common+0x0/0x6c) from [<c003d2c0>] (warn_slowpath_null+0x24/0x2c)

     [    1.376068]  r9:c06f3ce0 r8:00000000 r7:00000000 r6:c069e110 r5:c0708028

    [    1.382965] r4:00000000 [    1.385742] [<c003d29c>] (warn_slowpath_null+0x0/0x2c) from [<c00840a0>] (__alloc_pages_nodemask+0x458/0x62c)

     [    1.396209] [<c0083c48>] (__alloc_pages_nodemask+0x0/0x62c) from [<c001a2c8>] (__dma_alloc+0x90/0x308)

     [    1.406036] [<c001a238>] (__dma_alloc+0x0/0x308) from [<c001a5d0>] (dma_alloc_coherent+0x5c/0x68)

     [    1.415374] [<c001a574>] (dma_alloc_coherent+0x0/0x68) from [<c04cd0cc>] (fb_probe+0x7a8/0xbc4)

     [    1.424530]  r7:cf9bc608 r6:007d0000 r5:cf9c1a54 r4:c06d2844

     [    1.430541] [<c04cc924>] (fb_probe+0x0/0xbc4) from [<c02648e4>] (platform_drv_probe+0x20/0x24)

     [    1.439605] [<c02648c4>] (platform_drv_probe+0x0/0x24) from [<c026342c>] (driver_probe_device+0xa0/0x1b0)

    [    1.449707] [<c026338c>] (driver_probe_device+0x0/0x1b0) from [<c0263618>] (__device_attach+0x44/0x48)

     [    1.459503]  r9:c002ff2c r8:c0714d8c r7:00000000 r6:c02635d4 r5:cf9bc608

     [    1.466400] r4:c06d2788

     [    1.469177] [<c02635d4>] (__device_attach+0x0/0x48) from [<c02628d8>] (bus_for_each_drv+0x68/0x94)

    [    1.478607]  r5:cf81dc48 r4:cf9bc608

     [    1.482391] [<c0262870>] (bus_for_each_drv+0x0/0x94) from [<c02636e4>] (device_attach+0x9c/0xc0)

     [    1.491638]  r7:c06be7f0 r6:00000000 r5:cf9bc63c r4:cf9bc608

     [    1.497650] [<c0263648>] (device_attach+0x0/0xc0) from [<c02626dc>] (bus_probe_device+0x2c/0x48)

     [    1.506896]  r7:c06be7f0 r6:00000000 r5:cf9bc610 r4:cf9bc608

     [    1.512878] [<c02626b0>] (bus_probe_device+0x0/0x48) from [<c0261554>] (device_add+0x4c4/0x590)

     [    1.522064] [<c0261090>] (device_add+0x0/0x590) from [<c0264f80>] (platform_device_add+0x100/0x19c)

     [    1.531616] [<c0264e80>] (platform_device_add+0x0/0x19c) from [<c00332dc>] (omap_device_register+0x28/0x2c)

    [    1.541870]  r7:c05c6868 r6:00000000 r5:cf9c4e00 r4:cf9bc600

    [    1.547851] [<c00332b4>] (omap_device_register+0x0/0x2c) from [<c00338b4>] (omap_device_build_ss+0x108/0x144)

     [    1.558319] [<c00337ac>] (omap_device_build_ss+0x0/0x144) from [<c0033944>] (omap_device_build+0x54/0x5c)

    [    1.568420] [<c00338f0>] (omap_device_build+0x0/0x5c) from [<c06685a0>] (am33xx_register_lcdc+0x64/0xb0)

     [    1.578399]  r4:00000000 [    1.581085] [<c066853c>] (am33xx_register_lcdc+0x0/0xb0) from [<c002f778>] (lcdc_init+0x30/0x60)

     [    1.590332]  r6:00000001 r5:00000001 r4:c06bd128

     [    1.595245] [<c002f748>] (lcdc_init+0x0/0x60) from [<c002f1f8>] (_configure_device+0x70/0xdc)

     [    1.604217] [<c002f188>] (_configure_device+0x0/0xdc) from [<c0030130>] (am335x_evm_setup+0x204/0x4ac)

    [    1.614044]  r7:00000000 r6:cf8a0820 r5:00000000 r4:c06bdac0

     [    1.620025] [<c002ff2c>] (am335x_evm_setup+0x0/0x4ac) from [<c0276794>] (at24_probe+0x45c/0x4e4)

    [    1.629272]  r6:cf8a0820 r5:cf8a0800 r4:cf9c3d40

     [    1.634185] [<c0276338>] (at24_probe+0x0/0x4e4) from [<c032c66c>] (i2c_device_probe+0xb4/0xec)

     [    1.643249] [<c032c5b8>] (i2c_device_probe+0x0/0xec) from [<c026342c>] (driver_probe_device+0xa0/0x1b0)

     [    1.653137]  r7:c06d7558 r6:cf8a0854 r5:c0714db0 r4:cf8a0820 [    1.659118] [<c026338c>] (driver_probe_device+0x0/0x1b0) from [<c02635d0>] (__driver_attach+0x94/0x98)

     [    1.668945]  r9:00000000 r8:00000000 r7:00000000 r6:cf8a0854 r5:c06d7558

     [    1.675842] r4:cf8a0820 [    1.678588] [<c026353c>] (__driver_attach+0x0/0x98) from [<c0262be0>] (bus_for_each_dev+0x68/0x94)

     [    1.688049]  r7:00000000 r6:c026353c r5:cf81dec8 r4:c06d7558

     [    1.694030] [<c0262b78>] (bus_for_each_dev+0x0/0x94) from [<c026327c>] (driver_attach+0x24/0x28)

     [    1.703277]  r7:00000000 r6:cf9c3ec0 r5:c06e3db0 r4:c06d7558

     [    1.709259] [<c0263258>] (driver_attach+0x0/0x28) from [<c0262448>] (bus_add_driver+0xa8/0x23c)

     [    1.718444] [<c02623a0>] (bus_add_driver+0x0/0x23c) from [<c0263c34>] (driver_register+0x80/0x144)

     [    1.727905] [<c0263bb4>] (driver_register+0x0/0x144) from [<c032cab0>] (i2c_register_driver+0x34/0xbc)

     [    1.737701]  r9:00000000 r8:00000000 r7:00000013 r6:00000000 r5:c06f4180

     [    1.744598] r4:c06d7530

     [    1.747375] [<c032ca7c>] (i2c_register_driver+0x0/0xbc) from [<c067b8f8>] (at24_init+0x48/0x54)

     [    1.756530]  r5:c06f4180 r4:c069ab4c

     [    1.760314] [<c067b8b0>] (at24_init+0x0/0x54) from [<c0008610>] (do_one_initcall+0x44/0x1a4)

     [    1.769195] [<c00085cc>] (do_one_initcall+0x0/0x1a4) from [<c0660288>] (kernel_init+0x80/0x124)

    [    1.778381] [<c0660208>] (kernel_init+0x0/0x124) from [<c0040884>] (do_exit+0x0/0x6ac)

     [    1.786712]  r5:c0660208 r4:00000000

     [    1.790557] ---[ end trace b4622b5c66012fd7 ]---

     [    1.795440] da8xx_lcdc da8xx_lcdc.0: GLCD: kmalloc for frame buffer failed

     [    1.802703] da8xx_lcdc: probe of da8xx_lcdc.0 failed with error -22

  • I must modify  display driver of the SDK package ?

  •  

    linux can apply for the maximum of 4 M memory,but par->vram_size is More than 4 M size, so it is faild

  • Quick suggestion, can you change CONFIG_FORCE_MAX_ZONEORDER=14 OR 16 and try? Open .config file and change this option.

    Thanks,

    Vaibhav

  • Thank you very much for your reply!

     

    I change "#define MAX_ORDER 11" ( include/linux/mmzone.h) to "#define MAX_ORDER 14", the screen is working, but ALSA doesn't work. I don't change,  the ALSA is working.