zoukankan      html  css  js  c++  java
  • Qualcomm device使用ION memory manager取代PMEM

    今天写好device,成功编译出CM,接下来肯定是调戏啦(你什么都没看到)~

    BUG肯定也是一堆堆的!一开机,果然一堆error~可是尼玛,大蛋一放假就不见人了!!!

    我自己折腾几个小时容易么我,我谷歌了几个小时容易么我ヽ(`д´)ノ

    06-09 17:15:48.570: D/memalloc(138): init_pmem_area: Initializing pmem area
    06-09 17:15:48.570: D/memalloc(138): init_pmem_area_locked: Opening master pmem FD
    06-09 17:15:48.570: E/memalloc(138): /dev/pmem: Failed to open pmem device: No such file or directory
    06-09 17:15:48.570: E/memalloc(138): /dev/pmem: failed to initialize pmem area
    06-09 17:15:48.570: E/gralloc(138): gralloc failed err=No such file or directory
    06-09 17:15:48.570: W/GraphicBufferAllocator(138): WOW! gralloc alloc failed, waiting for pending frees!
    06-09 17:15:48.570: E/gralloc(138): gralloc failed err=No such file or directory
    06-09 17:15:48.570: W/GraphicBufferAllocator(138): alloc(480, 800, 2, 00000b03, ...) failed -2 (No such file or directory)
    06-09 17:15:48.570: E/SurfaceFlinger(138): GraphicBufferAlloc::createGraphicBuffer(w=480, h=800) failed (No such file or directory), handle=0x0
    06-09 17:15:48.570: E/BufferQueue(138): [BootAnimation] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
    06-09 17:15:48.570: W/Adreno200-EGLSUB(412): <DequeueBuffer:420>: dequeue native buffer fail: No such file or directory
    06-09 17:15:48.580: W/Adreno200-EGL(412): <qeglDrvAPI_eglMakeCurrent:2855>: EGL_BAD_ALLOC
    06-09 17:15:48.580: E/libEGL(412): eglMakeCurrent:593 error 3003 (EGL_BAD_ALLOC)
    06-09 17:15:48.580: E/SurfaceFlinger(138): GL error 0x0505
    06-09 17:15:48.580: W/Adreno200-EGLSUB(138): <GetBackBuffer:2181>: handle base address is NULL
    06-09 17:15:48.580: W/Adreno200-ES20(138): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
    06-09 17:15:48.580: W/Adreno200-EGL(138): <qeglDrvAPI_eglSwapBuffers:3482>: EGL_BAD_ALLOC

    上面就是错误信息啦,一眼看过去就看出了pmem驱动无法打开

    What,为神马打不开啊???因为文件不存在啊,魂淡!

    然后我就把kernel的config给提取出来看了下

    $ adb pull /proc/config.gz
    
    245 KB/s (20151 bytes in 0.080s)
    
    $ gunzip -c config.gz |grep PMEM
    CONFIG_ANDROID_PMEM=y

    次奥,内核都开启了PMEM为神马还是不行啊!!!(つД`)

    好吧,接着我就去看dmesg,看看到底是神马回事...

    <6>[ 2.445319] loop: module loaded
    <1>[ 2.447678] pmem: pmem_setup: unable to register pmem driver(pmem) - zero size passed in!
    <4>[ 2.455961] android_pmem: probe of android_pmem.0 failed with error -1
    <1>[ 2.462321] pmem: pmem_setup: unable to register pmem driver(pmem_adsp) - zero size passed in!
    <4>[ 2.471003] android_pmem: probe of android_pmem.1 failed with error -1
    <1>[ 2.477379] pmem: pmem_setup: unable to register pmem driver(pmem_audio) - zero size passed in!
    <4>[ 2.486199] android_pmem: probe of android_pmem.2 failed with error -1


    好吧,pmem都起不来了,怪不得找不到驱动...

    个人感觉那货需要从内核源码搞了,但是没有源码啊,肿么破???

    那俺就只好用ION取代PMEM了,pougai!!!!

    打开device/{manufacturer}/{device}/BoardConfig.mk,添加下面的代码

    # Uses ION memory manager,Renounce the use of PMEM
    TARGET_USES_ION := true


    然后重新编译,你也可以用mmm单独编译模块~

    刷进手机,重启,看log!!欧耶,这个BUG没有了,但是剩下的BUG还有一堆堆...

  • 相关阅读:
    集合介绍,创建,添加,删除。
    字典简介、操作、内置函数、练习题
    git教程——简单总结
    前端性能优化总结
    小米2018春招实习笔试题总结
    浏览器缓存控制 以及 在url框中回车、F5 和 Ctrl + F5的区别
    携程2018春招实习前端开发笔试题分享
    不同方式实现两列布局
    移动端开发-viewport与媒体查询
    华为2018春招前端开发实习生笔试题分享
  • 原文地址:https://www.cnblogs.com/GentlemanMod/p/3254196.html
Copyright © 2011-2022 走看看