Jump to content


Photo

OPI ONE server Legacy 3.4.113 Segmentation fault on unload module vfe_v4l2


  • Please log in to reply
9 replies to this topic

#1 denyc@

denyc@

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 26 January 2017 - 12:45 PM

Hello! Please help me.

The error occurs with both the camera and even without a camera:

1)

root@orangepione:~# modprobe gc2035
root@orangepione:~# modprobe -v vfe_v4l2
insmod /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/videobuf-core.ko 
insmod /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/videobuf-dma-contig.ko 
insmod /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/vfe_v4l2.ko 
root@orangepione:~# dmesg 
...
[  341.296379] [ISP] isp platform_id = 5!
[  341.368184] [CSI_ERR][GC2035]sensor_read err at sensor_detect!
[  341.368199] [CSI_ERR][GC2035]chip found is not an target chip.

Video device is not created in /dev directory.

------

2) When i try to unload vfe_v4l2 driver error occurs: Segmentation fault

root@orangepione:~# modprobe -r -v vfe_v4l2

 

 

Spoiler

 

Error the same on debian and Ubuntu.

Is not working correctly my board orange pi one?
Or is this problem armbian 3.4.113 image?
 
Thank you


#2 @lex

@lex

    Advanced Member

  • Senior Members
  • PipPipPip
  • 182 posts

Posted 26 January 2017 - 01:02 PM

The correct order to unload the driver is:

modprobe -r gc2035
modprobe -r vfe_v4l2

Try Fex with:

[twi2]
twi_used = 0


#3 denyc@

denyc@

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 26 January 2017 - 01:29 PM

The correct order to unload the driver,
I will try later.
 

in /boot/script.bin -> script.fex

 

 

[twi2]
twi_used = 0

already set, but camera not working.



#4 denyc@

denyc@

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 26 January 2017 - 06:27 PM

Driver order unloading on the error does not affect. Segmentation fault (



#5 artemla

artemla

    Newbie

  • Senior Members
  • Pip
  • 2 posts

Posted 26 January 2017 - 10:58 PM

Hello. I have the same problem. I'm using Orange Pi PC Plus with this camera module https://www.aliexpre...2652476606.html

root@orangepipcplus:~# uname -a
Linux orangepipcplus 3.4.113-sun8i #20 SMP PREEMPT Fri Dec 30 14:37:10 CET 2016 armv7l armv7l armv7l GNU/Linux

After

root@orangepipcplus:~# modprobe gc2035 hres=0 mclk=34
root@orangepipcplus:~# modprobe vfe_v4l2

I got next in dmesg

[  134.209558] [ISP] isp platform_id = 5!
[  134.278253] [CSI_ERR][GC2035]sensor_read err at sensor_detect!
[  134.278270] [CSI_ERR][GC2035]chip found is not an target chip.

Also I checked camera in Android (which is used by default in PC Plus) and it works normally.



#6 artemla

artemla

    Newbie

  • Senior Members
  • Pip
  • 2 posts

Posted 27 January 2017 - 06:00 PM

I tried older release of Armbian 5.20 with kernel 3.4.112 and it seems camera module works correctly

root@orangepipcplus:~# uname -a
Linux orangepipcplus 3.4.112-sun8i #14 SMP PREEMPT Wed Sep 14 20:29:31 CEST 2016 armv7l GNU/Linux
[  154.776883] [VFE]cci probe start cci_sel = 0!
[  154.776966] [VFE]cci probe end cci_sel = 0!
[  154.777141] [VFE]cci_init end
[  170.701899] [VFE]Welcome to Video Front End driver
[  170.702246] [VFE]pdev->id = 0
[  170.702257] [VFE]dev->mipi_sel = 0
[  170.702264] [VFE]dev->vip_sel = 0
[  170.702271] [VFE]dev->isp_sel = 0
[  170.708397] [VFE_WARN]vfe vpu clock is null
[  170.715846] [VFE]..........................vfe clk open!.......................
[  170.715878] [ISP] isp platform_id = 5!
[  170.716037] [VFE]vfe_init end
[  170.720239] [VFE]probe_work_handle start!
[  170.720268] [VFE]v4l2 subdev register input_num = 0
[  170.720280] [VFE]vfe sensor detect start! input_num = 0
[  170.720295] [VFE]Find sensor name is "gc2035", i2c address is 78, type is "YUV" !
[  170.720307] [VFE]Sub device register "gc2035" i2c_addr = 0x78 start!
[  170.720322] [VFE]v4l2_device_register_subdev return 0
[  170.720332] [VFE]registered sensor subdev is OK!
[  170.720340] [VFE]Check sensor!
[  170.732460] [VFE]mclk on
[  170.787924] [CSI][GC2035]V4L2_IDENT_SENSOR=2035[CSI][GC2035]disalbe oe!
[  171.222183] [VFE]mclk off
[  171.234295] [VFE]Sub device register "gc2035" is OK!
[  171.234809] [VFE]V4L2 device registered as video0
[  171.234869] [VFE]..........................vfe clk close!.......................
[  171.234906] [VFE]probe_work_handle end!
[  171.245028] [VFE]vfe_open
[  171.245062] [VFE]..........................vfe clk open!.......................
[  171.245118] [VFE]vfe_open ok
[  171.245525] [VFE]vfe_close
[  171.245545] [VFE]vfe select input flag = 0, s_input have not be used .
[  171.245576] [VFE]..........................vfe clk close!.......................
[  171.245621] [VFE]vfe_close end
root@orangepipcplus:~# ls /dev/v
v4l/    vcs1    vcs3    vcs5    vcsa    vcsa2   vcsa4   vcsa6   vmouse
vcs     vcs2    vcs4    vcs6    vcsa1   vcsa3   vcsa5   video0


#7 denyc@

denyc@

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 31 January 2017 - 04:56 AM

Thank you, i reproduced this version, but noted that that when accessing the camera, generates a large amount of debugging information in /var/log/syslog, /var/log/messages, /var/log/kern.log:
...
Jan 31 04:53:40 localhost kernel: [ 1662.521479] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd535c2c0
Jan 31 04:53:40 localhost kernel: [ 1662.609079] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd4870800
Jan 31 04:53:40 localhost kernel: [ 1662.696673] [VFE_WARN]Only two buffer left for csi
Jan 31 04:53:40 localhost kernel: [ 1662.784252] [VFE]capture video mode!
Jan 31 04:53:40 localhost kernel: [ 1662.871855] [VFE]capture video first frame done!
Jan 31 04:53:40 localhost kernel: [ 1662.871880] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd5b108c0
Jan 31 04:53:40 localhost kernel: [ 1662.959447] [VFE_WARN]Only two buffer left for csi
Jan 31 04:53:40 localhost kernel: [ 1663.047053] [VFE]capture video mode!
Jan 31 04:53:40 localhost kernel: [ 1663.134639] [VFE]capture video first frame done!
Jan 31 04:53:40 localhost kernel: [ 1663.134657] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd535c380
Jan 31 04:53:40 localhost kernel: [ 1663.222285] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd535c2c0
Jan 31 04:53:41 localhost kernel: [ 1663.309844] [VFE_WARN]Only two buffer left for csi
Jan 31 04:53:41 localhost kernel: [ 1663.397436] [VFE]capture video mode!
Jan 31 04:53:41 localhost kernel: [ 1663.485040] [VFE]capture video first frame done!
Jan 31 04:53:41 localhost kernel: [ 1663.485064] [VFE_WARN] Nobody is waiting on this video buffer,buf
= 0xd4870800
...
How to stop this notice, or this is virtually impossible to use?


#8 graki

graki

    Newbie

  • Senior Members
  • Pip
  • 1 posts

Posted 14 February 2017 - 04:47 AM

Hi,

 

Got exactly the same problem with an orange pi lite, 5.25 server. I had to downgrade to 5.20 kernel (3.4.112) in order to use my gc2035.

 

Regards



#9 chucklz

chucklz

    Newbie

  • Senior Members
  • Pip
  • 1 posts

Posted 15 February 2017 - 03:50 AM

I have the same problem, I haven't downgraded yet, as I am needing later kernel.

 

I've looked at the camera/vfe source code and the drivers have constant, hardcoded addresses.

 

I am wondering if anyone knows how the fex system affects these values? I have worked at ARM (symbian driver compatibility) and some issue fixes use post-build injection, but I do not know if that is how fex works?

 

Thanks :-)



#10 takgr

takgr

    Newbie

  • Senior Members
  • Pip
  • 1 posts

Posted 17 February 2017 - 02:07 PM

Well, it was a long way and many hours lost until I finally discovered this post. I had this very same weird issue with the latest Armbian. Now I'm switching back to 5.20 test the CSI camera.