zhansb 发表于 2015-3-25 14:09:01

可以修改啊
看看这个:http://developer.t-firefly.com/forum.php?mod=viewthread&tid=853&highlight=ubuntu

danzuiji 发表于 2015-3-25 15:43:16

zhansb 发表于 2015-3-25 14:09
可以修改啊
看看这个:http://developer.t-firefly.com/forum.php?mod=viewthread&tid=853&highlight=ubun ...

版主,我下载了pad版的kernel,烧写后出现空指针错误。麻烦帮忙分析下,谢谢。
在rk_fb.c中
#if defined(CONFIG_ION_ROCKCHIP)
static int rk_fb_alloc_buffer_by_ion(struct fb_info *fbi,
                                     struct rk_lcdc_win *win,
                                     unsigned long fb_mem_size)
{
    。。。
        if (dev_drv->iommu_enabled)
                handle = ion_alloc(rk_fb->ion_client, (size_t) fb_mem_size, 0,
                                   ION_HEAP(ION_VMALLOC_HEAP_ID), 0);
        else
                handle = ion_alloc(rk_fb->ion_client, (size_t) fb_mem_size, 0,
                                   ION_HEAP(ION_CMA_HEAP_ID), 0);
        if (IS_ERR(handle)) {
                dev_err(fbi->device, "failed to ion_alloc:%ld\n",
                        PTR_ERR(handle));
                return -ENOMEM;
        }。。。
}

打印信息如下:
[    0.711831] rk32-edp: probe of ff970000.edp failed with error -22
[    0.712213] rk3288-lcdc lcdc0: can't find power_ctr node for lcdc0
[    0.712510] graphics fb0: rockchip framebuffer registerd:fb0
[    0.712891] graphics fb1: rockchip framebuffer registerd:fb1
[    0.713069] graphics fb2: rockchip framebuffer registerd:fb2
[    0.713260] graphics fb3: rockchip framebuffer registerd:fb3
[    0.714158] rk3288 set GPLL BW 20 for HDMI!
[    0.714371] rk3288-lcdc lcdc0: lcdc0: dclk:148500000>>fps:60
[    0.714430] rk3288-lcdc lcdc0: wakeup from standby!
[    0.714452] rk-fb rockchip-fb: failed to ion_alloc:-19
[    0.714499] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    0.746270] rk_battery_charger_detect_cb , battery_charger_detect 1
[    1.844530] pgd = c0004000
[    1.847217] *pgd=00000000
[    1.850752] Internal error: Oops: 805 [#1] PREEMPT SMP ARM
[    1.856144] Modules linked in:
[    1.859164] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0 #7
[    1.864984] task: ee098000 ti: ee07a000 task.ti: ee07a000
[    1.870302] PC is at cfb_imageblit+0x3ac/0x434
[    1.874677] LR is at fb_do_show_logo+0x34/0x168
[    1.879133] pc : [<c02cbc98>]    lr : [<c02c3474>]    psr: 60000113
[    1.879133] sp : ee07bd68ip : 00000000fp : 00000010
[    1.890413] r10: 00000050r9 : 00000000r8 : ee3afc00
[    1.895549] r7 : 00000000r6 : 00000000r5 : 00000000r4 : 00000010
[    1.901963] r3 : 00000010r2 : 00000000r1 : 00000001r0 : c0985cd1
[    1.908381] Flags: nZCvIRQs onFIQs onMode SVC_32ISA ARMSegment kernel
[    1.915565] Control: 10c5387dTable: 0000406aDAC: 00000015
[    1.921212]
[    1.921212] PC: 0xc02cbc18:
[    1.925411] bc18e1a07005 e598b054 e594001c e26b3020 e58d9010 e58d300c e594a00c ea000034
[    1.933544] bc38e3560000 e594c008 e1a09006 e58d4018 15952000 13e01000 e58dc014 11a03006
[    1.941675] bc5811c22611 01a03006 01a02006 e1a0c005 e3a01000 ea000010 e59860fc e3560002
[    1.949806] bc7813560004 e7d06001 059d4010 07946106 e59d400c e1530004 e1822316 3a000003
[    1.957937] bc98e48c2004 12632020 11a02236 03a02000 e083300b e2811001 e203301f e59d4014
[    1.966068] bcb8e1510004 1affffeb e3530000 e0800001 e1a06009 e59d4018 159c1000 13e09000
[    1.974199] bcd8e24aa001 10013319 11833002 158c3000 e59dc008 e5983108 e35c0000 00855003
[    1.982329] bcf8159d2008 10877103 13c75003 10866002 1206601f e35a0000 1affffc8 e28dd02c
[    1.990461]
[    1.990461] LR: 0xc02c33f4:
[    1.994660] 33f4e2833001 e1530006 13a04000 1088a003 11a0c004 1afffff5 e5923008 e592c00c
[    2.002791] 3414e5924004 e582300c e582c008 e592c000 e5824000 e5900040 e0633000 e06c3003
[    2.010922] 3434e5823004 e582101c e8bd87f0 e92d40f8 e2527000 e1a05000 e1a04001 e1a06003
[    2.019054] 34540a00000b ea000013 e5953238 e1a00005 e1a01004 e2877001 e5933034 e12fff33
[    2.027186] 3474e5942000 e5943008 e0823003 e2833008 e5843000 e1570006 08bd80f8 e5943000
[    2.035317] 3494e5942008 e0822003 e595303c e1520003 9affffec e8bd80f8 e3570002 1a000010
[    2.043448] 34b4ea00000b e5953238 e1a00005 e1a01004 e2877001 e5933034 e12fff33 e5943000
[    2.051579] 34d4e5942008 e2433008 e0623003 e5843000 ea000000 e3a07000 e1570006 1afffff0
[    2.059710]
[    2.059710] SP: 0xee07bce8:
[    2.063909] bce8ee3888dc c03216b0 c08b2119 ee07bda4 53425553 45545359 6c703d4d 6f667461
[    2.072040] bd0844006d72 c02cbc98 60000113 ffffffff ee07bd54 c000d558 c0985cd1 00000001
[    2.080171] bd2800000000 00000010 00000010 00000000 00000000 00000000 ee3afc00 00000000
[    2.088300] bd4800000050 00000010 00000000 ee07bd68 c02c3474 c02cbc98 60000113 ffffffff
[    2.096431] bd6800000438 c0699114 00000000 00000010 ee388c00 00000050 ee07bdd0 00000003
[    2.104560] bd88ee3ae818 c03216d0 00000003 ee07bdd0 ee3afc00 00000004 00000001 ee3aec10
[    2.112691] bda800000000 00000000 00000004 c02c3474 00000004 ee3afc00 c0988d44 ee388c00
[    2.120820] bdc800000000 c02c5124 00000000 00000000 00000050 00000050 ee3afe14 00000000
[    2.128950]
[    2.128950] R0: 0xc0985c51:
[    2.133148] 5c502e2e7a9a 64700620 36aad64e 7c062f46 85b45870 06466224 a33aa6d6 5174086e
[    2.141279] 5c700772a708 ca5e92a2 a6e045a2 3287ae0a ce2e96be 85a32aa2 487a8e43 8e5f6a6d
[    2.149410] 5c9022322e6e 0676af06 9e073650 3c5b2476 326e8a06 82066398 667a0653 2e628246
[    2.157542] 5cb07c224256 568a0650 1e425606 864c565e 566a0656 223e523a 64425159 565e3452
[    2.165673] 5cd020202042 20202020 20202020 20202020 20202020 20202020 20202020 20202020
[    2.173804] 5cf020202020 22212120 21212222 20202021 20202020 20202020 20202020 20202020
[    2.181935] 5d1020202020 20202020 20202020 20202020 20202020 20202020 20202020 20202020
[    2.190066] 5d3020202020 20202020 20202020 20202020 22212020 26252423 25262627 21222328
[    2.198197] 5d5020202020 20202020 20202020 20202020 20202020 20202020 20202020 20202020
[    2.206330]
[    2.206330] R8: 0xee3afb80:
[    2.210528] fb8000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.218656] fba000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.226785] fbc000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.234912] fbe000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.243041] fc0000000001 00000000 00000000 00000001 00000000 ee3afc14 ee3afc14 00000000
[    2.251169] fc2000000000 00000001 00000000 ee3afc2c ee3afc2c 00000000 00000000 00000780
[    2.259298] fc4000000438 00000780 00000438 00000000 00000000 00000010 43878000 0000000b
[    2.267427] fc6000000005 00000000 00000005 00000006 00000000 00000000 00000005 00000000
[    2.275557] Process swapper/0 (pid: 1, stack limit = 0xee07a238)
[    2.281461] Stack: (0xee07bd68 to 0xee07c000)
[    2.285746] bd60:                   00000438 c0699114 00000000 00000010 ee388c00 00000050
[    2.293786] bd80: ee07bdd0 00000003 ee3ae818 c03216d0 00000003 ee07bdd0 ee3afc00 00000004
[    2.301824] bda0: 00000001 ee3aec10 00000000 00000000 00000004 c02c3474 00000004 ee3afc00
[    2.309863] bdc0: c0988d44 ee388c00 00000000 c02c5124 00000000 00000000 00000050 00000050
[    2.317902] bde0: ee3afe14 00000000 ee3afc08 c0985cd1 00000000 c02c780c 00000004 00000000
[    2.325941] be00: 00000000 00000000 ee3ae828 ee3ae818 ee3afc00 ee3b3490 00000000 c0afc7a8
[    2.333980] be20: 00000004 ee3ae828 ee3888dc c02d0e24 ee27ce10 c0327594 00000000 ee3d2710
[    2.342019] be40: 00000000 c069915c 00000000 c009ccf4 ee3d26c0 ee3ae810 ee27ce10 00000000
[    2.350058] be60: ee27ce00 c0a14000 c098ada4 c09415f0 00000000 c02df0ac 000000a0 ee3d26c0
[    2.358097] be80: ee3ae810 ee27ce10 ee27ce18 00000001 c09cb488 00000000 ee27ce10 00000000
[    2.366136] bea0: c09cb488 c0325f68 c0325f54 c0324d30 ee27ce10 c09cb488 c09cb488 00000000
[    2.374175] bec0: c0a14000 c0324f8c 00000000 ee27ce10 ee27ce44 c0325004 c09cb488 ee07bee8
[    2.382214] bee0: c0324fa4 c03237e0 ee18065c ee25e434 c09cb488 c09cb488 ee3b3980 c09d2748
[    2.390253] bf00: 00000000 c0324590 c085ff91 c085ff95 c09cb488 c0966f34 ee07a000 00000000
[    2.398292] bf20: c0a14000 c03254e0 c0325f8c 00000005 c0966f34 ee07a000 00000000 c0a14000
[    2.406331] bf40: c09415f0 c00086a4 c0966f34 00000fe8 00000005 c098202c c098200c c0a14000
[    2.414370] bf60: 00000175 c0941b00 00000005 00000005 c09415f0 c09b5c74 c098ab44 c098ab44
[    2.422408] bf80: 00000000 00000000 00000000 00000000 00000000 c0941bc0 ee07a000 00000000
[    2.430446] bfa0: c067c574 c067c57c 00000000 c000da58 00000000 00000000 00000000 00000000
[    2.438484] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.446522] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
[    2.454577] [<c02cbc98>] (cfb_imageblit+0x3ac/0x434) from [<c02c3474>] (fb_do_show_logo+0x34/0x168)
[    2.463479] [<c02c3474>] (fb_do_show_logo+0x34/0x168) from [<c02c5124>] (fb_show_logo_line.constprop.9+0x1d0/0x210)
[    2.473742] [<c02c5124>] (fb_show_logo_line.constprop.9+0x1d0/0x210) from [<c02d0e24>] (rk_fb_register+0x7b4/0x88c)
[    2.484009] [<c02d0e24>] (rk_fb_register+0x7b4/0x88c) from [<c02df0ac>] (rk3288_lcdc_probe+0x214/0x2b0)
[    2.493251] [<c02df0ac>] (rk3288_lcdc_probe+0x214/0x2b0) from [<c0325f68>] (platform_drv_probe+0x14/0x18)
[    2.502663] [<c0325f68>] (platform_drv_probe+0x14/0x18) from [<c0324d30>] (really_probe+0xa8/0x20c)
[    2.511558] [<c0324d30>] (really_probe+0xa8/0x20c) from [<c0324f8c>] (driver_probe_device+0x30/0x48)
[    2.520539] [<c0324f8c>] (driver_probe_device+0x30/0x48) from [<c0325004>] (__driver_attach+0x60/0x84)
[    2.529690] [<c0325004>] (__driver_attach+0x60/0x84) from [<c03237e0>] (bus_for_each_dev+0x50/0x90)
[    2.538586] [<c03237e0>] (bus_for_each_dev+0x50/0x90) from [<c0324590>] (bus_add_driver+0xac/0x20c)
[    2.547482] [<c0324590>] (bus_add_driver+0xac/0x20c) from [<c03254e0>] (driver_register+0x9c/0x138)
[    2.556381] [<c03254e0>] (driver_register+0x9c/0x138) from [<c00086a4>] (do_one_initcall+0x34/0xc8)
[    2.565279] [<c00086a4>] (do_one_initcall+0x34/0xc8) from [<c0941b00>] (do_initcalls+0x70/0xa0)
[    2.573833] [<c0941b00>] (do_initcalls+0x70/0xa0) from [<c0941bc0>] (kernel_init_freeable+0x90/0x130)
[    2.582903] [<c0941bc0>] (kernel_init_freeable+0x90/0x130) from [<c067c57c>] (kernel_init+0x8/0xe4)
[    2.591804] [<c067c57c>] (kernel_init+0x8/0xe4) from [<c000da58>] (ret_from_fork+0x14/0x3c)
[    2.600014] Code: e59d400c e1530004 e1822316 3a000003 (e48c2004)
[    2.606062] ---[ end trace a7fafe6123377a82 ]---
[    2.610632] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    2.610632]
[    2.619614] CPU1: stopping
[    2.622282] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D      3.10.0 #7
[    2.629056] [<c0014db4>] (unwind_backtrace+0x0/0xe0) from [<c0011cb8>] (show_stack+0x10/0x14)
[    2.637441] [<c0011cb8>] (show_stack+0x10/0x14) from [<c0013484>] (handle_IPI+0x14c/0x2c0)
[    2.645569] [<c0013484>] (handle_IPI+0x14c/0x2c0) from [<c0008554>] (gic_handle_irq+0x50/0x58)
[    2.654038] [<c0008554>] (gic_handle_irq+0x50/0x58) from [<c000d5c0>] (__irq_svc+0x40/0x70)
[    2.662244] Exception stack(0xee0c5f80 to 0xee0c5fc8)
[    2.667214] 5f80: ffffffed 00000000 011dc000 00000000 ee0c4000 00000015 10c0387d c069de58
[    2.675253] 5fa0: 0000406a 410fc0d1 00000000 00000000 00000000 ee0c5fc8 c000ed40 c000ed44
[    2.683289] 5fc0: 60000113 ffffffff
[    2.686727] [<c000d5c0>] (__irq_svc+0x40/0x70) from [<c000ed44>] (arch_cpu_idle+0x30/0x38)
[    2.694859] [<c000ed44>] (arch_cpu_idle+0x30/0x38) from [<c0079200>] (cpu_idle_loop+0x1b4/0x220)
[    2.703500] [<c0079200>] (cpu_idle_loop+0x1b4/0x220) from [<c0079278>] (freezing_slow_path+0x0/0x64)
[    2.712475] CPU3: stopping
[    2.715142] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D      3.10.0 #7
[    2.721910] [<c0014db4>] (unwind_backtrace+0x0/0xe0) from [<c0011cb8>] (show_stack+0x10/0x14)
[    2.730293] [<c0011cb8>] (show_stack+0x10/0x14) from [<c0013484>] (handle_IPI+0x14c/0x2c0)
[    2.738420] [<c0013484>] (handle_IPI+0x14c/0x2c0) from [<c0008554>] (gic_handle_irq+0x50/0x58)
[    2.746888] [<c0008554>] (gic_handle_irq+0x50/0x58) from [<c000d5c0>] (__irq_svc+0x40/0x70)
[    2.755094] Exception stack(0xee0c9f80 to 0xee0c9fc8)
[    2.760063] 9f80: ffffffed 00000000 011ee000 00000000 ee0c8000 00000015 10c0387d c069de58
[    2.768103] 9fa0: 0000406a 410fc0d1 00000000 00000000 0000003f ee0c9fc8 c000ed40 c000ed44
[    2.776138] 9fc0: 60000113 ffffffff
[    2.779575] [<c000d5c0>] (__irq_svc+0x40/0x70) from [<c000ed44>] (arch_cpu_idle+0x30/0x38)
[    2.787702] [<c000ed44>] (arch_cpu_idle+0x30/0x38) from [<c0079200>] (cpu_idle_loop+0x1b4/0x220)
[    2.796341] [<c0079200>] (cpu_idle_loop+0x1b4/0x220) from [<c0079278>] (freezing_slow_path+0x0/0x64)
[    2.805315] CPU2: stopping
[    2.807981] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D      3.10.0 #7
[    2.814748] [<c0014db4>] (unwind_backtrace+0x0/0xe0) from [<c0011cb8>] (show_stack+0x10/0x14)
[    2.823132] [<c0011cb8>] (show_stack+0x10/0x14) from [<c0013484>] (handle_IPI+0x14c/0x2c0)
[    2.831259] [<c0013484>] (handle_IPI+0x14c/0x2c0) from [<c0008554>] (gic_handle_irq+0x50/0x58)
[    2.839726] [<c0008554>] (gic_handle_irq+0x50/0x58) from [<c000d5c0>] (__irq_svc+0x40/0x70)
[    2.847932] Exception stack(0xee0c7f80 to 0xee0c7fc8)
[    2.852902] 7f80: ffffffed 00000000 011e5000 00000000 ee0c6000 00000015 10c0387d c069de58
[    2.860941] 7fa0: 0000406a 410fc0d1 00000000 00000000 00000040 ee0c7fc8 c000ed40 c000ed44
[    2.868977] 7fc0: 60000113 ffffffff
[    2.872414] [<c000d5c0>] (__irq_svc+0x40/0x70) from [<c000ed44>] (arch_cpu_idle+0x30/0x38)
[    2.880541] [<c000ed44>] (arch_cpu_idle+0x30/0x38) from [<c0079200>] (cpu_idle_loop+0x1b4/0x220)
[    2.889180] [<c0079200>] (cpu_idle_loop+0x1b4/0x220) from [<c0079278>] (freezing_slow_path+0x0/0x64)
[    2.898154] CRU:
[    2.899970] 00000000: 00000001 9fff0041 0fff0021 00000008
[    2.905280] 00000010: 00000005 9fff0031 0fff0018 00000008
[    2.910589] 00000020: 0000040f 1fff0062 0fff0031 0000000a
[    2.915898] 00000030: 00000107 9fff00c5 0fff0014 00000008
[    2.921207] 00000040: 00000b00 9fff0270 0fff0138 00000008
[    2.926515] 00000050: 00005011 00000000 00000000 00000000
[    2.931823] 00000060: 00004031 0000b108 00000020 00000200
[    2.937132] 00000070: 00008300 00008200 00008342 00010014
[    2.942441] 00000080: 00010014 00010014 0000a101 0000277d
[    2.947749] 00000090: 00004380 00008a00 00000200 00000200
[    2.953058] 000000a0: 00000200 0bb8ea60 00010014 00010014
[    2.958367] 000000b0: 00010014 00000900 00000900 001f05dc
[    2.963675] 000000c0: 00001703 00000707 00000e40 00000101
[    2.968984] 000000d0: 00000242 00000742 00004141 00004040
[    2.974293] 000000e0: 00004141 00000505 00008042 00008f8f
[    2.979601] 000000f0: 00000000 00000631 00001ee5 00008307
[    2.984909] 00000100: 00001200 00010014 00004141 00000000
[    2.990218] 00000110: 00000000 00000000 00000000 00000000
[    2.995526] 00000120: 00000000 00000000 00000000 00000000
[    3.000834] 00000130: 00000000 00000000 00000000 00000000
[    3.006142] 00000140: 00000000 00000000 00000000 00000000
[    3.011450] 00000150: 00000000 00000000 00000000 00000000
[    3.016759] 00000160: 00000000 00000000 00000000 00000000
[    3.022067] 00000170: 00000000 00000000 0000e000 00000000
[    3.027375] 00000180: 00000000 00000000 0000000c 00000000
[    3.032683] 00000190: 00000000 00000000 00000000 00000000
[    3.037991] 000001a0: 00000000 00000000 00000000 00000000
[    3.043299] 000001b0: 00000000 00000000 00000000 00000000
[    3.048607] 000001c0: 00000000 00000000 00000000 00000000
[    3.053915] 000001d0: 00000000 00000000 00000000 00000000
[    3.059224] 000001e0: 00000000 00000000 00000000 00640064
[    3.064532] 000001f0: 00000004 00000000 00000000 00000000
[    3.069840] 00000200: 00000002 00000000 00000002 00000000
[    3.075148] 00000210: 00000002 00000000 00000004 00000000
[    3.080455] Rebooting in 5 seconds..

danzuiji 发表于 2015-3-25 16:19:23

版主,CONFIG_ION_ROCKCHIP这个定义是哪些方面的?

zhansb 发表于 2015-3-25 16:43:48

在原来的SDK上改了什么?贴出来看看你

danzuiji 发表于 2015-3-25 17:24:17

zhansb 发表于 2015-3-25 16:43
在原来的SDK上改了什么?贴出来看看你

只在driver/video/rockchip/下添加了vga文件夹和vga相关的代码,就是从原来那里拷贝过来的。其他地方没有做改动。

danzuiji 发表于 2015-3-25 18:35:16

楼主,什么原因导致分配内存失败?
static int rk_fb_alloc_buffer_by_ion(struct fb_info *fbi,
                                     struct rk_lcdc_win *win,
                                     unsigned long fb_mem_size)
{
    。。。
      if (dev_drv->iommu_enabled)
                handle = ion_alloc(rk_fb->ion_client, (size_t) fb_mem_size, 0,
                                 ION_HEAP(ION_VMALLOC_HEAP_ID), 0);
      else
                handle = ion_alloc(rk_fb->ion_client, (size_t) fb_mem_size, 0,
                                 ION_HEAP(ION_CMA_HEAP_ID), 0);
      if (IS_ERR(handle)) {
                dev_err(fbi->device, "failed to ion_alloc:%ld\n",
                        PTR_ERR(handle));
                return -ENOMEM;
      }。。。
}

zhansb 发表于 2015-3-26 14:18:36

把VGA的驱动加载顺序改一下试试
改成:module_init

danzuiji 发表于 2015-3-26 14:20:18

版主,我用与屏幕一样分辨率的像素图片进行显示,效果如下:



原图为:






danzuiji 发表于 2015-3-27 12:13:32

为何xscale不能设置成100?
root@firefly:/sys/class/graphics/fb0# cat scale
xscale=99 yscale=100
left=100 top=100 right=99 bottom=100

root@firefly:/sys/class/graphics/fb0# echo xscale 100 > scale
root@firefly:/sys/class/graphics/fb0# cat scale
xscale=99 yscale=100
left=100 top=100 right=99 bottom=100

页: 1 2 [3]
查看完整版本: VGA显示不正常