zoukankan      html  css  js  c++  java
  • ov5640 video capture时,vfe_v4l2.ko模块挂掉问题分析

    1.问题描述
    在r16 tina平台,基于ov5640获取摄像头数据时,vfe_v4l2.ko模块挂掉。

    2.配置信息
    2.1上层应用设置的像素格式为V4L2_PIX_FMT_YUYV,分辨率为480P。
    2.2 lichee/linux-3.4/drivers/media/video/sunxi-vfe/platform_cfg.h

    2.3 sys_config.fex

    [twi2]
    twi_used        = 1
    twi_scl         = port:PE12<3><default><default><default>
    twi_sda         = port:PE13<3><default><default><default>
    [csi0]
    vip_used                 = 1
    vip_mode                 = 0
    vip_dev_qty              = 1
    vip_define_sensor_list     = 0
    vip_csi_pck              = port:PE00<2><default><default><default>
    vip_csi_mck              = port:PE01<2><default><default><default>
    vip_csi_hsync            = port:PE02<2><default><default><default>
    vip_csi_vsync            = port:PE03<2><default><default><default>
    vip_csi_d0               = port:PE04<2><default><default><default>
    vip_csi_d1               = port:PE05<2><default><default><default>
    vip_csi_d2               = port:PE06<2><default><default><default>
    vip_csi_d3               = port:PE07<2><default><default><default>
    vip_csi_d4               = port:PE08<2><default><default><default>
    vip_csi_d5               = port:PE09<2><default><default><default>
    vip_csi_d6               = port:PE10<2><default><default><default>
    vip_csi_d7               = port:PE11<2><default><default><default>
    ;vip_csi_sck              = port:PE12<2><default><default><default>
    ;vip_csi_sda              = port:PE13<2><default><default><default>
    vip_dev0_mname           = "ov5640"
    vip_dev0_pos             = "rear"
    vip_dev0_lane            = 0
    vip_dev0_twi_id          = 2
    vip_dev0_twi_addr        = 0x78
    vip_dev0_isp_used        = 0
    vip_dev0_fmt             = 0
    vip_dev0_stby_mode       = 0
    vip_dev0_vflip           = 0
    vip_dev0_hflip           = 0
    vip_dev0_iovdd           = "axp22_dldo3"
    vip_dev0_iovdd_vol       = 2800000
    vip_dev0_avdd            = "axp22_dldo2"
    vip_dev0_avdd_vol        = 2800000
    vip_dev0_dvdd            = "axp22_eldo2"
    vip_dev0_dvdd_vol        = 1800000
    vip_dev0_afvdd           = ""
    vip_dev0_afvdd_vol       = 2800000
    vip_dev0_power_en        =
    vip_dev0_reset           = port:PE14<1><default><default><0>
    vip_dev0_pwdn            = port:PE15<1><default><default><1>
    vip_dev0_flash_en        =
    vip_dev0_flash_mode      =
    vip_dev0_af_pwdn         =
    
    1. kernel 堆栈分析

    vfe_v4l2.ko模块链接基址为:0xbf018000

    根据内核堆栈的PC(0xbf0208a0)地址可以定位到模块内的偏移为:0x88a0

    8894:   ebfffffe    bl  0 <printk>
    8898:   e30b3f9c    movw    r3, #49052  ; 0xbf9c
    889c:   e7943003    ldr r3, [r4, r3]
    88a0:   e59331c4    ldr r3, [r3, #452]  ; 0x1c4---这一行
    88a4:   e5893044    str r3, [r9, #68]   ; 0x44
    88a8:   e5953000    ldr r3, [r5]
    88ac:   e3530000    cmp r3, #0[  314.483154]
    
    [   44.243185] [VFE_DEBUG]00000000
    [   44.243193] [VFE_DEBUG]buffer_queue
    [   44.243198] [VFE_DEBUG]buffer_queue
    [   44.243204] [VFE_DEBUG]buffer_queue
    [   44.243210] [VFE_DEBUG]0111111
    [   44.243218] [VFE_DEBUG]buf ptr=cf107680
    [   44.243224] [VFE_DEBUG]frankhhhhhhhhhhhhhh
    [   44.243231] [VFE_DEBUG]frankiiiiiiiiiiiiiiii addr_org=0x60000093
    [   44.243242] [VFE_DEBUG]frankjjjjjjjjjjjjjjjjjj, dev->isp_3a_result_pt=0fd46000
    [  44.243263] Unable to handle kernel NULL pointer dereference at virtual address 000001c4
    

    关键代码如下:

    将vfe_v4l2.ko反汇编,主要汇编代码:

  • 相关阅读:
    Annotation
    GIT的作用以及Versioncontrol为什么要用GIT
    Http协议
    人工智能的可怕与不可怕
    Makefile简易教程
    Node.js 学习笔记之一:学习规划 & 认知 Node.js
    《大教堂与集市》的启示 — 软件工程的另一种选择
    Git简易教程
    谈谈买书与读书
    clang编译器简介
  • 原文地址:https://www.cnblogs.com/black-mamba/p/9758359.html
Copyright © 2011-2022 走看看