* omap3-isp segfault
@ 2011-01-26 19:32 Neil MacMunn
2011-01-27 1:43 ` Neil MacMunn
0 siblings, 1 reply; 9+ messages in thread
From: Neil MacMunn @ 2011-01-26 19:32 UTC (permalink / raw)
To: linux-media
Hello,
When I modprobe omap3-isp I get a segfault. I'm attempting to use a
Gumstix Overo with Micron MT9V032.
root@overo:~# modprobe omap3-isp
Linux media interface: v0.10
Linux video capture interface: v2.00
omap3isp omap3isp: Revision 2.0 found
Unable to handle kernel NULL pointer dereference at virtual address
00000004
pgd = cd4b0000
[00000004] *pgd=8e77b031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
last sysfs file: /sys/devices/virtual/net/lo/type
Modules linked in: omap3_isp(+) v4l2_common videodev v4l1_compat
media iovmm ipv6 libertas_sdio libertas lib80211 option usb_wwan
ads7846 usbserial iommu
CPU: 0 Not tainted (2.6.36+ #9)
PC is at iommu_get+0x74/0x108 [iommu]
LR is at iommu_get+0x78/0x108 [iommu]
pc : [<bf0009fc>] lr : [<bf000a00>] psr: 20000013
sp : ced33db0 ip : 22222222 fp : bf100bb8
r10: cdf48000 r9 : c0580938 r8 : 00000001
r7 : 000003ff r6 : ce78f218 r5 : 00000000 r4 : ce78f200
r3 : 00000000 r2 : ffffffd0 r1 : 22222222 r0 : ce78f200
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8d4b0019 DAC: 00000015
Process modprobe (pid: 1327, stack limit = 0xced322f0)
Stack: (0xced33db0 to 0xced34000)
3da0: 0000000e 00000000 cdf48000
bf0f46a4
3dc0: 00000001 c01096c4 ce54e848 c0580940 00000000 ce6347c0 cec54a58
00000000
3de0: bf102adc c0580940 c0580940 bf102adc bf102adc c05a10d0 ced33f64
00000000
3e00: ced32000 c023d49c bf102adc c023c4dc ced33f64 c0580940 c0580974
bf102adc
3e20: ced33e38 c023c624 00000000 c023c5c4 bf102adc c023bcdc cec21cf8
cec4f5f0
3e40: c05a10d0 00000000 bf102adc bf102adc ce6347c0 c023b5b4 bf101bdb
cec02b88
3e60: cec02b80 00000000 00000018 bf102adc bf104974 bf10c000 00000000
c023c944
3e80: 00000000 00000018 00000000 bf104974 bf10c000 c00353c0 00000198
d12c0000
3ea0: 00000000 00000018 00000000 00000000 00000018 00000000 bf104974
00000000
3ec0: ced33f7c c0085860 00000000 00000000 cdc95c9c ced33f70 01a960e8
bf104980
3ee0: 000003dd d13fa11c d12c0000 00197522 d13f98fc d13f96e0 d1454c9c
cdd08000
3f00: 00011abc 00014b2c 00000000 00000000 00000034 00000035 0000001a
0000001e
3f20: 00000011 00000000 6e72656b 00006c65 00000000 00000000 00000000
00000000
3f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
3f60: 00000000 00000000 00000000 bf102174 00000003 00000000 00000000
c053b028
3f80: 00000073 00009720 00000000 00000000 00000080 c0036044 ced32000
01a96090
3fa0: 00000000 c0035ec0 00009720 00000000 40296000 00197522 01a960e8
01a960e8
3fc0: 00009720 00000000 00000000 00000080 00000000 01a9609c 01a96090
00000000
3fe0: 01a96120 beb95924 0000b180 40232084 60000010 40296000 00000000
00000000
[<bf0009fc>] (iommu_get+0x74/0x108 [iommu]) from [<bf0f46a4>]
(isp_probe+0x258/0x9f0 [omap3_isp])
[<bf0f46a4>] (isp_probe+0x258/0x9f0 [omap3_isp]) from [<c023d49c>]
(platform_drv_probe+0x1c/0x24)
[<c023d49c>] (platform_drv_probe+0x1c/0x24) from [<c023c4dc>]
(driver_probe_device+0xcc/0x1b4)
[<c023c4dc>] (driver_probe_device+0xcc/0x1b4) from [<c023c624>]
(__driver_attach+0x60/0x84)
[<c023c624>] (__driver_attach+0x60/0x84) from [<c023bcdc>]
(bus_for_each_dev+0x4c/0x8c)
[<c023bcdc>] (bus_for_each_dev+0x4c/0x8c) from [<c023b5b4>]
(bus_add_driver+0xa0/0x21c)
[<c023b5b4>] (bus_add_driver+0xa0/0x21c) from [<c023c944>]
(driver_register+0xbc/0x148)
[<c023c944>] (driver_register+0xbc/0x148) from [<c00353c0>]
(do_one_initcall+0xc8/0x194)
[<c00353c0>] (do_one_initcall+0xc8/0x194) from [<c0085860>]
(sys_init_module+0x13f8/0x15bc)
[<c0085860>] (sys_init_module+0x13f8/0x15bc) from [<c0035ec0>]
(ret_fast_syscall+0x0/0x30)
Code: e59f3098 e1a00004 e5933000 e1a0e00f (e593f004)
---[ end trace 7243c66244fbd250 ]---
overo Internal error: Oops: 17 [#1]
overo last sysfs file: /sys/devices/virtual/net/lo/type
overo Process modprobe (pid: 1327, stack limit = 0xced322f0)
overo Stack: (0xced33db0 to 0xced34000)
overo 3da0: 0000000e 00000000
cdf48000 bf0f46a4
overo 3dc0: 00000001 c01096c4 ce54e848 c0580940 00000000 ce6347c0
cec54a58 00000000
overo 3de0: bf102adc c0580940 c0580940 bf102adc bf102adc c05a10d0
ced33f64 00000000
overo 3e00: ced32000 c023d49c bf102adc c023c4dc ced33f64 c0580940
c0580974 bf102adc
overo 3e20: ced33e38 c023c624 00000000 c023c5c4 bf102adc c023bcdc
cec21cf8 cec4f5f0
overo 3e40: c05a10d0 00000000 bf102adc bf102adc ce6347c0 c023b5b4
bf101bdb cec02b88
overo 3e60: cec02b80 00000000 00000018 bf102adc bf104974 bf10c000
00000000 c023c944
overo 3e80: 00000000 00000018 00000000 bf104974 bf10c000 c00353c0
00000198 d12c0000
overo 3ea0: 00000000 00000018 00000000 00000000 00000018 00000000
bf104974 00000000
overo 3ec0: ced33f7c c0085860 00000000 00000000 cdc95c9c ced33f70
01a960e8 bf104980
overo 3ee0: 000003dd d13fa11c d12c0000 00197522 d13f98fc d13f96e0
d1454c9c cdd08000
overo 3f00: 00011abc 00014b2c 00000000 00000000 00000034 00000035
0000001a 0000001e
overo 3f20: 00000011 00000000 6e72656b 00006c65 00000000 00000000
00000000 00000000
overo 3f40: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
overo 3f60: 00000000 00000000 00000000 bf102174 00000003 00000000
00000000 c053b028
overo 3f80: 00000073 00009720 00000000 00000000 00000080 c0036044
ced32000 01a96090
overo 3fa0: 00000000 c0035ec0 00009720 00000000 40296000 00197522
01a960e8 01a960e8
overo 3fc0: 00009720 00000000 00000000 00000080 00000000 01a9609c
01a96090 00000000
overo 3fe0: 01a96120 beb95924 0000b180 40232084 60000010 40296000
00000000 00000000
overo Code: e59f3098 e1a00004 e5933000 e1a0e00f (e593f004)
Segmentation fault
My ISP and MT9V032 code come from
http://git.linuxtv.org/pinchartl/media.git?a=shortlog;h=refs/heads/media-0006-sensors
and my board-overo.c (based on board-rx51.c) contains:
...
static int __init overo_i2c_init(void)
{
omap_register_i2c_bus(1, 2600, overo_i2c_boardinfo,
ARRAY_SIZE(overo_i2c_boardinfo));
/* i2c2 pins are used for gpio */
omap_register_i2c_bus(3, 400, NULL, 0);
return 0;
}
...
#include <media/mt9v032.h>
#include "devices.h"
#include "../../../drivers/media/video/isp/isp.h"
#include "../../../drivers/media/video/isp/ispreg.h"
#define MT9V032_I2C_BUS_NUM (0x03)
#define MT9V032_I2C_ADDR (0x5C)
#define MT9V032_XCLK (0x00)
static void mt9v032_set_clock(struct v4l2_subdev *subdev, unsigned
int rate)
{
struct isp_device *isp = v4l2_dev_to_isp_device(subdev->v4l2_dev);
isp->platform_cb.set_xclk(isp, rate, MT9V032_XCLK);
}
static struct mt9v032_platform_data mt9v032_platform_data = {
.clk_pol = 0,
.set_clock = mt9v032_set_clock,
};
static struct i2c_board_info mt9v032_i2c_board_info[] = {
{
I2C_BOARD_INFO("mt9v032", MT9V032_I2C_ADDR),
.platform_data = &mt9v032_platform_data,
},
};
static struct isp_subdev_i2c_board_info pixhawk_camera_subdevs[] = {
{
.board_info = &mt9v032_i2c_board_info[0],
.i2c_adapter_id = MT9V032_I2C_BUS_NUM,
},
{ NULL, 0, },
};
static struct isp_v4l2_subdevs_group pixhawk_camera_subdevs_group[] = {
{
.subdevs = pixhawk_camera_subdevs,
.interface = ISP_INTERFACE_PARALLEL,
.bus = { .parallel = {
.data_lane_shift = 0,
.clk_pol = 1,
.bridge = ISPCTRL_PAR_BRIDGE_DISABLE,
} },
},
{ NULL, 0, },
};
static struct isp_platform_data isp_platform_data = {
.subdevs = pixhawk_camera_subdevs_group,
};
static void __init overo_init(void)
{
overo_i2c_init();
if (omap3_init_camera(&isp_platform_data) < 0)
printk(KERN_WARNING "%s: Unable to register camera platform "
"device\n", __func__);
...
I've had this hardware working with older kernels but I'm trying to make
the conversion to the subdev api and a better driver (thanks Laurent!).
Anyone know what might be going on? This is my first linux-media post so
if I've commited any faux pas please let me know. Thanks!
Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-26 19:32 omap3-isp segfault Neil MacMunn
@ 2011-01-27 1:43 ` Neil MacMunn
2011-01-27 12:25 ` Laurent Pinchart
2011-01-27 12:28 ` Laurent Pinchart
0 siblings, 2 replies; 9+ messages in thread
From: Neil MacMunn @ 2011-01-27 1:43 UTC (permalink / raw)
To: linux-media
Ok I solved the segfault problem by updating some of my v4l2 files
(specifically v4l2-common.c). Now I only get nice sounding console messages.
Linux media interface: v0.10
Linux video capture interface: v2.00
omap3isp omap3isp: Revision 2.0 found
omap-iommu omap-iommu.0: isp: version 1.1
omap3isp omap3isp: hist: DMA channel = 4
mt9v032 3-005c: Probing MT9V032 at address 0x5c
omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 28800000 Hz
omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 0 Hz
mt9v032 3-005c: MT9V032 detected at address 0x5c
And a bunch of devices.
# ls /dev
...
v4l-subdev0
v4l-subdev1
v4l-subdev2
v4l-subdev3
v4l-subdev4
v4l-subdev5
v4l-subdev6
v4l-subdev7
v4l-subdev8
...
video0
video1
video2
video3
video4
video5
video6
...
But don't know how to start the camera. How can I test the module?
Neil
On 11-01-26 11:32 AM, Neil MacMunn wrote:
> Hello,
>
> When I modprobe omap3-isp I get a segfault. I'm attempting to use a
> Gumstix Overo with Micron MT9V032.
>
> root@overo:~# modprobe omap3-isp
> Linux media interface: v0.10
> Linux video capture interface: v2.00
> omap3isp omap3isp: Revision 2.0 found
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000004
> pgd = cd4b0000
> [00000004] *pgd=8e77b031, *pte=00000000, *ppte=00000000
> Internal error: Oops: 17 [#1]
> last sysfs file: /sys/devices/virtual/net/lo/type
> Modules linked in: omap3_isp(+) v4l2_common videodev v4l1_compat
> media iovmm ipv6 libertas_sdio libertas lib80211 option usb_wwan
> ads7846 usbserial iommu
> CPU: 0 Not tainted (2.6.36+ #9)
> PC is at iommu_get+0x74/0x108 [iommu]
> LR is at iommu_get+0x78/0x108 [iommu]
> pc : [<bf0009fc>] lr : [<bf000a00>] psr: 20000013
> sp : ced33db0 ip : 22222222 fp : bf100bb8
> r10: cdf48000 r9 : c0580938 r8 : 00000001
> r7 : 000003ff r6 : ce78f218 r5 : 00000000 r4 : ce78f200
> r3 : 00000000 r2 : ffffffd0 r1 : 22222222 r0 : ce78f200
> Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
> Control: 10c5387d Table: 8d4b0019 DAC: 00000015
> Process modprobe (pid: 1327, stack limit = 0xced322f0)
> Stack: (0xced33db0 to 0xced34000)
> 3da0: 0000000e 00000000 cdf48000
> bf0f46a4
> 3dc0: 00000001 c01096c4 ce54e848 c0580940 00000000 ce6347c0 cec54a58
> 00000000
> 3de0: bf102adc c0580940 c0580940 bf102adc bf102adc c05a10d0 ced33f64
> 00000000
> 3e00: ced32000 c023d49c bf102adc c023c4dc ced33f64 c0580940 c0580974
> bf102adc
> 3e20: ced33e38 c023c624 00000000 c023c5c4 bf102adc c023bcdc cec21cf8
> cec4f5f0
> 3e40: c05a10d0 00000000 bf102adc bf102adc ce6347c0 c023b5b4 bf101bdb
> cec02b88
> 3e60: cec02b80 00000000 00000018 bf102adc bf104974 bf10c000 00000000
> c023c944
> 3e80: 00000000 00000018 00000000 bf104974 bf10c000 c00353c0 00000198
> d12c0000
> 3ea0: 00000000 00000018 00000000 00000000 00000018 00000000 bf104974
> 00000000
> 3ec0: ced33f7c c0085860 00000000 00000000 cdc95c9c ced33f70 01a960e8
> bf104980
> 3ee0: 000003dd d13fa11c d12c0000 00197522 d13f98fc d13f96e0 d1454c9c
> cdd08000
> 3f00: 00011abc 00014b2c 00000000 00000000 00000034 00000035 0000001a
> 0000001e
> 3f20: 00000011 00000000 6e72656b 00006c65 00000000 00000000 00000000
> 00000000
> 3f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 3f60: 00000000 00000000 00000000 bf102174 00000003 00000000 00000000
> c053b028
> 3f80: 00000073 00009720 00000000 00000000 00000080 c0036044 ced32000
> 01a96090
> 3fa0: 00000000 c0035ec0 00009720 00000000 40296000 00197522 01a960e8
> 01a960e8
> 3fc0: 00009720 00000000 00000000 00000080 00000000 01a9609c 01a96090
> 00000000
> 3fe0: 01a96120 beb95924 0000b180 40232084 60000010 40296000 00000000
> 00000000
> [<bf0009fc>] (iommu_get+0x74/0x108 [iommu]) from [<bf0f46a4>]
> (isp_probe+0x258/0x9f0 [omap3_isp])
> [<bf0f46a4>] (isp_probe+0x258/0x9f0 [omap3_isp]) from [<c023d49c>]
> (platform_drv_probe+0x1c/0x24)
> [<c023d49c>] (platform_drv_probe+0x1c/0x24) from [<c023c4dc>]
> (driver_probe_device+0xcc/0x1b4)
> [<c023c4dc>] (driver_probe_device+0xcc/0x1b4) from [<c023c624>]
> (__driver_attach+0x60/0x84)
> [<c023c624>] (__driver_attach+0x60/0x84) from [<c023bcdc>]
> (bus_for_each_dev+0x4c/0x8c)
> [<c023bcdc>] (bus_for_each_dev+0x4c/0x8c) from [<c023b5b4>]
> (bus_add_driver+0xa0/0x21c)
> [<c023b5b4>] (bus_add_driver+0xa0/0x21c) from [<c023c944>]
> (driver_register+0xbc/0x148)
> [<c023c944>] (driver_register+0xbc/0x148) from [<c00353c0>]
> (do_one_initcall+0xc8/0x194)
> [<c00353c0>] (do_one_initcall+0xc8/0x194) from [<c0085860>]
> (sys_init_module+0x13f8/0x15bc)
> [<c0085860>] (sys_init_module+0x13f8/0x15bc) from [<c0035ec0>]
> (ret_fast_syscall+0x0/0x30)
> Code: e59f3098 e1a00004 e5933000 e1a0e00f (e593f004)
> ---[ end trace 7243c66244fbd250 ]---
> overo Internal error: Oops: 17 [#1]
> overo last sysfs file: /sys/devices/virtual/net/lo/type
> overo Process modprobe (pid: 1327, stack limit = 0xced322f0)
> overo Stack: (0xced33db0 to 0xced34000)
> overo 3da0: 0000000e 00000000
> cdf48000 bf0f46a4
> overo 3dc0: 00000001 c01096c4 ce54e848 c0580940 00000000 ce6347c0
> cec54a58 00000000
> overo 3de0: bf102adc c0580940 c0580940 bf102adc bf102adc c05a10d0
> ced33f64 00000000
> overo 3e00: ced32000 c023d49c bf102adc c023c4dc ced33f64 c0580940
> c0580974 bf102adc
> overo 3e20: ced33e38 c023c624 00000000 c023c5c4 bf102adc c023bcdc
> cec21cf8 cec4f5f0
> overo 3e40: c05a10d0 00000000 bf102adc bf102adc ce6347c0 c023b5b4
> bf101bdb cec02b88
> overo 3e60: cec02b80 00000000 00000018 bf102adc bf104974 bf10c000
> 00000000 c023c944
> overo 3e80: 00000000 00000018 00000000 bf104974 bf10c000 c00353c0
> 00000198 d12c0000
> overo 3ea0: 00000000 00000018 00000000 00000000 00000018 00000000
> bf104974 00000000
> overo 3ec0: ced33f7c c0085860 00000000 00000000 cdc95c9c ced33f70
> 01a960e8 bf104980
> overo 3ee0: 000003dd d13fa11c d12c0000 00197522 d13f98fc d13f96e0
> d1454c9c cdd08000
> overo 3f00: 00011abc 00014b2c 00000000 00000000 00000034 00000035
> 0000001a 0000001e
> overo 3f20: 00000011 00000000 6e72656b 00006c65 00000000 00000000
> 00000000 00000000
> overo 3f40: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> overo 3f60: 00000000 00000000 00000000 bf102174 00000003 00000000
> 00000000 c053b028
> overo 3f80: 00000073 00009720 00000000 00000000 00000080 c0036044
> ced32000 01a96090
> overo 3fa0: 00000000 c0035ec0 00009720 00000000 40296000 00197522
> 01a960e8 01a960e8
> overo 3fc0: 00009720 00000000 00000000 00000080 00000000 01a9609c
> 01a96090 00000000
> overo 3fe0: 01a96120 beb95924 0000b180 40232084 60000010 40296000
> 00000000 00000000
> overo Code: e59f3098 e1a00004 e5933000 e1a0e00f (e593f004)
> Segmentation fault
>
>
> My ISP and MT9V032 code come from
> http://git.linuxtv.org/pinchartl/media.git?a=shortlog;h=refs/heads/media-0006-sensors
> and my board-overo.c (based on board-rx51.c) contains:
>
> ...
> static int __init overo_i2c_init(void)
> {
> omap_register_i2c_bus(1, 2600, overo_i2c_boardinfo,
> ARRAY_SIZE(overo_i2c_boardinfo));
> /* i2c2 pins are used for gpio */
> omap_register_i2c_bus(3, 400, NULL, 0);
> return 0;
> }
> ...
> #include <media/mt9v032.h>
> #include "devices.h"
> #include "../../../drivers/media/video/isp/isp.h"
> #include "../../../drivers/media/video/isp/ispreg.h"
>
> #define MT9V032_I2C_BUS_NUM (0x03)
> #define MT9V032_I2C_ADDR (0x5C)
> #define MT9V032_XCLK (0x00)
>
> static void mt9v032_set_clock(struct v4l2_subdev *subdev, unsigned
> int rate)
> {
> struct isp_device *isp =
> v4l2_dev_to_isp_device(subdev->v4l2_dev);
>
> isp->platform_cb.set_xclk(isp, rate, MT9V032_XCLK);
> }
>
> static struct mt9v032_platform_data mt9v032_platform_data = {
> .clk_pol = 0,
> .set_clock = mt9v032_set_clock,
> };
>
> static struct i2c_board_info mt9v032_i2c_board_info[] = {
> {
> I2C_BOARD_INFO("mt9v032", MT9V032_I2C_ADDR),
> .platform_data = &mt9v032_platform_data,
> },
> };
>
> static struct isp_subdev_i2c_board_info pixhawk_camera_subdevs[] = {
> {
> .board_info = &mt9v032_i2c_board_info[0],
> .i2c_adapter_id = MT9V032_I2C_BUS_NUM,
> },
> { NULL, 0, },
> };
>
> static struct isp_v4l2_subdevs_group pixhawk_camera_subdevs_group[]
> = {
> {
> .subdevs = pixhawk_camera_subdevs,
> .interface = ISP_INTERFACE_PARALLEL,
> .bus = { .parallel = {
> .data_lane_shift = 0,
> .clk_pol = 1,
> .bridge = ISPCTRL_PAR_BRIDGE_DISABLE,
> } },
> },
> { NULL, 0, },
> };
>
> static struct isp_platform_data isp_platform_data = {
> .subdevs = pixhawk_camera_subdevs_group,
> };
>
> static void __init overo_init(void)
> {
> overo_i2c_init();
> if (omap3_init_camera(&isp_platform_data) < 0)
> printk(KERN_WARNING "%s: Unable to register camera platform "
> "device\n", __func__);
> ...
>
>
> I've had this hardware working with older kernels but I'm trying to
> make the conversion to the subdev api and a better driver (thanks
> Laurent!). Anyone know what might be going on? This is my first
> linux-media post so if I've commited any faux pas please let me know.
> Thanks!
>
> Neil
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 1:43 ` Neil MacMunn
@ 2011-01-27 12:25 ` Laurent Pinchart
2011-01-27 12:28 ` Laurent Pinchart
1 sibling, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2011-01-27 12:25 UTC (permalink / raw)
To: Neil MacMunn; +Cc: linux-media
Hi Neil,
On Thursday 27 January 2011 02:43:15 Neil MacMunn wrote:
> Ok I solved the segfault problem by updating some of my v4l2 files
> (specifically v4l2-common.c). Now I only get nice sounding console
> messages.
>
> Linux media interface: v0.10
> Linux video capture interface: v2.00
> omap3isp omap3isp: Revision 2.0 found
> omap-iommu omap-iommu.0: isp: version 1.1
> omap3isp omap3isp: hist: DMA channel = 4
> mt9v032 3-005c: Probing MT9V032 at address 0x5c
> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 28800000 Hz
> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 0 Hz
> mt9v032 3-005c: MT9V032 detected at address 0x5c
>
> And a bunch of devices.
>
> # ls /dev
> ...
> v4l-subdev0
> v4l-subdev1
> v4l-subdev2
> v4l-subdev3
> v4l-subdev4
> v4l-subdev5
> v4l-subdev6
> v4l-subdev7
> v4l-subdev8
> ...
> video0
> video1
> video2
> video3
> video4
> video5
> video6
> ...
>
> But don't know how to start the camera. How can I test the module?
You can get the media-ctl and yavta test applications from
http://git.ideasonboard.org/
media-ctl is used to configure the OMAP3 ISP pipeline, and yavta to test video
capture.
You can run
media-ctl --print-dot > omap3-isp.dot
to create a .dot description of the OMAP3 ISP topology. Process the file with
dot -Tps omap3-isp.dot > omap3-isp.ps
to generate a graph.
I'll unfortunately be offline from tomorrow evening until Monday the 7th of
February, but I think other users of the OMAP3 ISP driver will be able to help
you.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 1:43 ` Neil MacMunn
2011-01-27 12:25 ` Laurent Pinchart
@ 2011-01-27 12:28 ` Laurent Pinchart
2011-01-27 22:44 ` Neil MacMunn
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Laurent Pinchart @ 2011-01-27 12:28 UTC (permalink / raw)
To: Neil MacMunn; +Cc: linux-media
Hi again,
On Thursday 27 January 2011 02:43:15 Neil MacMunn wrote:
> Ok I solved the segfault problem by updating some of my v4l2 files
> (specifically v4l2-common.c). Now I only get nice sounding console
> messages.
>
> Linux media interface: v0.10
> Linux video capture interface: v2.00
> omap3isp omap3isp: Revision 2.0 found
> omap-iommu omap-iommu.0: isp: version 1.1
> omap3isp omap3isp: hist: DMA channel = 4
> mt9v032 3-005c: Probing MT9V032 at address 0x5c
> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 28800000 Hz
> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 0 Hz
> mt9v032 3-005c: MT9V032 detected at address 0x5c
As you're using an MT9V032 sensor, I can help you with the pipeline setup. You
can run the following commands to capture 5 raw images.
./media-ctl -r -l '"mt9v032 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
./media-ctl -f '"mt9v032 2-005c":0[SGRBG10 752x480], "OMAP3 ISP CCDC":1[SGRBG10 752x480]'
./yavta -p -f SGRBG10 -s 752x480 -n 4 --capture=5 --skip 4 -F $(./media-ctl -e "OMAP3 ISP CCDC output")
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 12:28 ` Laurent Pinchart
@ 2011-01-27 22:44 ` Neil MacMunn
2011-01-28 22:19 ` Eino-Ville Talvala
2011-02-01 12:53 ` Teemu Tuominen
2011-02-04 22:33 ` Neil MacMunn
[not found] ` <4D4C7E24.6000004@gumstix.com>
2 siblings, 2 replies; 9+ messages in thread
From: Neil MacMunn @ 2011-01-27 22:44 UTC (permalink / raw)
To: linux-media
On 11-01-27 04:28 AM, Laurent Pinchart wrote:
> Hi again,
>
> As you're using an MT9V032 sensor, I can help you with the pipeline setup. You
> can run the following commands to capture 5 raw images.
>
> ./media-ctl -r -l '"mt9v032 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> ./media-ctl -f '"mt9v032 2-005c":0[SGRBG10 752x480], "OMAP3 ISP CCDC":1[SGRBG10 752x480]'
>
> ./yavta -p -f SGRBG10 -s 752x480 -n 4 --capture=5 --skip 4 -F $(./media-ctl -e "OMAP3 ISP CCDC output")
>
When I use media-ctl the pipeline gets configured properly. I can
generate graphs before and after and see the pipeline change. However,
my system hangs when I attempt to use yavta. I've also tried outputting
to video4.
# ./media-ctl -p
Opening media device /dev/media0
Enumerating entities
Found 16 entities
Enumerating pads and links
Device topology
- entity 1: OMAP3 ISP CCP2 (2 pads, 1 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev0
pad0: Input [SGRBG10 4096x4096]
pad1: Output [SGRBG10 4096x4096]
-> 'OMAP3 ISP CCDC':pad0 []
- entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video0
pad0: Output
-> 'OMAP3 ISP CCP2':pad0 []
- entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev1
pad0: Input [SGRBG10 4096x4096]
pad1: Output [SGRBG10 4096x4096]
-> 'OMAP3 ISP CSI2a output':pad0 []
-> 'OMAP3 ISP CCDC':pad0 []
- entity 4: OMAP3 ISP CSI2a output (1 pad, 0 link)
type Node subtype V4L
device node name /dev/video1
pad0: Input
- entity 5: OMAP3 ISP CCDC (3 pads, 6 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev2
pad0: Input [SGRBG10 752x480]
pad1: Output [SGRBG10 752x480]
-> 'OMAP3 ISP CCDC output':pad0 []
-> 'OMAP3 ISP resizer':pad0 []
pad2: Output [SGRBG10 752x479]
-> 'OMAP3 ISP preview':pad0 [ACTIVE]
-> 'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
-> 'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
-> 'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
- entity 6: OMAP3 ISP CCDC output (1 pad, 0 link)
type Node subtype V4L
device node name /dev/video2
pad0: Input
- entity 7: OMAP3 ISP preview (2 pads, 2 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev3
pad0: Input [SGRBG10 752x479]
pad1: Output [YUYV 734x471]
-> 'OMAP3 ISP preview output':pad0 [ACTIVE]
-> 'OMAP3 ISP resizer':pad0 []
- entity 8: OMAP3 ISP preview input (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video3
pad0: Output
-> 'OMAP3 ISP preview':pad0 []
- entity 9: OMAP3 ISP preview output (1 pad, 0 link)
type Node subtype V4L
device node name /dev/video4
pad0: Input
- entity 10: OMAP3 ISP resizer (2 pads, 1 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev4
pad0: Input [YUYV 4095x4095 (0,0)/4094x4082]
pad1: Output [YUYV 3312x4095]
-> 'OMAP3 ISP resizer output':pad0 []
- entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video5
pad0: Output
-> 'OMAP3 ISP resizer':pad0 []
- entity 12: OMAP3 ISP resizer output (1 pad, 0 link)
type Node subtype V4L
device node name /dev/video6
pad0: Input
- entity 13: OMAP3 ISP AEWB (1 pad, 0 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev5
pad0: Input
- entity 14: OMAP3 ISP AF (1 pad, 0 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev6
pad0: Input
- entity 15: OMAP3 ISP histogram (1 pad, 0 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev7
pad0: Input
- entity 16: mt9v032 3-005c (1 pad, 1 link)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev8
pad0: Output [SGRBG10 752x480 (2,10)/752x480]
-> 'OMAP3 ISP CCDC':pad0 [ACTIVE]
# ./media-ctl -r -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1],
"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP
preview":1->"OMAP3 ISP preview output":0[1]'
Resetting all links to inactive
Setting up link 16:0 -> 5:0 [1]
Setting up link 5:2 -> 7:0 [1]
Setting up link 7:1 -> 9:0 [1]
# ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480], "OMAP3 ISP
CCDC":2[SGRBG10 752x480], "OMAP3 ISP preview":1[YUYV 752x480]'
Setting up format SGRBG10 752x480 on pad mt9v032 3-005c/0
Format set: SGRBG10 752x480
Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/0
Format set: SGRBG10 752x480
Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/2
Format set: SGRBG10 752x479
Setting up format SGRBG10 752x479 on pad OMAP3 ISP preview/0
Format set: SGRBG10 752x479
Setting up format SGRBG10 752x479 on pad OMAP3 ISP AEWB/0
Unable to set format: Invalid argument (-22)
Setting up format SGRBG10 752x479 on pad OMAP3 ISP AF/0
Unable to set format: Invalid argument (-22)
Setting up format SGRBG10 752x479 on pad OMAP3 ISP histogram/0
Unable to set format: Invalid argument (-22)
Setting up format YUYV 752x480 on pad OMAP3 ISP preview/1
Format set: YUYV 734x471
# gst-launch v4l2src device=/dev/video4 ! xvimagesink
Setting pipeline to PAUSED ...
------------[ cut here ]------------
WARNING: at drivers/media/video/isp/ispvideo.c:157
isp_video_try_format+0x54/0xd0()
Modules linked in: ipv6 libertas_sdio libertas lib80211 option
ads7846 usb_wwan usbserial
[<c003a634>] (unwind_backtrace+0x0/0xec) from [<c005db88>]
(warn_slowpath_common+0x4c/0x64)
[<c005db88>] (warn_slowpath_common+0x4c/0x64) from [<c005dbbc>]
(warn_slowpath_null+0x1c/0x24)
[<c005dbbc>] (warn_slowpath_null+0x1c/0x24) from [<c02cbae4>]
(isp_video_try_format+0x54/0xd0)
[<c02cbae4>] (isp_video_try_format+0x54/0xd0) from [<c02bcf7c>]
(__video_do_ioctl+0xd14/0x3e64)
[<c02bcf7c>] (__video_do_ioctl+0xd14/0x3e64) from [<c02bbf88>]
(__video_usercopy+0x2d0/0x400)
[<c02bbf88>] (__video_usercopy+0x2d0/0x400) from [<c02bb074>]
(v4l2_ioctl+0x7c/0x12c)
[<c02bb074>] (v4l2_ioctl+0x7c/0x12c) from [<c00ce844>]
(do_vfs_ioctl+0x4c8/0x534)
[<c00ce844>] (do_vfs_ioctl+0x4c8/0x534) from [<c00ce8e8>]
(sys_ioctl+0x38/0x5c)
[<c00ce8e8>] (sys_ioctl+0x38/0x5c) from [<c0035ec0>]
(ret_fast_syscall+0x0/0x30)
---[ end trace 3916808675e46fff ]---
------------[ cut here ]------------
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device '/dev/video4' cannot capture in the specified format
Additional debug info:
gstv4l2object.c(1971): gst_v4l2_object_set_format ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture in YU12, but device returned format YUYV
Setting pipeline to NULL ...
Freeing pipeline ...
Does anybody know how I can capture images from the camera? From
previous posts it appears that I'm not the first to go through this process.
Thanks. Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 22:44 ` Neil MacMunn
@ 2011-01-28 22:19 ` Eino-Ville Talvala
2011-02-01 12:53 ` Teemu Tuominen
1 sibling, 0 replies; 9+ messages in thread
From: Eino-Ville Talvala @ 2011-01-28 22:19 UTC (permalink / raw)
To: Neil MacMunn; +Cc: linux-media
On 1/27/2011 2:44 PM, Neil MacMunn wrote:
> When I use media-ctl the pipeline gets configured properly. I can generate graphs before and after and see the pipeline change. However, my system hangs when I attempt to use yavta. I've also tried outputting to video4.
>
....
>
>
>
> Does anybody know how I can capture images from the camera? From previous posts it appears that I'm not the first to go through this process.
>
> Thanks. Neil
A few questions that would help to diagnose problems:
What version of the ISP drivers and the MT9V032 driver are you using? Kernel version?
You could try to force the format on the gst-launch command, as a further test, although I don't know why it's not matching up to the YUVY format you configured in the pipeline.
Eino-Ville Talvala
Stanford University
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 22:44 ` Neil MacMunn
2011-01-28 22:19 ` Eino-Ville Talvala
@ 2011-02-01 12:53 ` Teemu Tuominen
1 sibling, 0 replies; 9+ messages in thread
From: Teemu Tuominen @ 2011-02-01 12:53 UTC (permalink / raw)
To: Neil MacMunn; +Cc: linux-media
On 01/28/2011 12:44 AM, Neil MacMunn wrote:
> # gst-launch v4l2src device=/dev/video4 ! xvimagesink
>
> Does anybody know how I can capture images from the camera? From
> previous posts it appears that I'm not the first to go through this
> process.
>
> Thanks. Neil
>
>
Hi,
Afaik v4l2src does not support subdev's atm. There's though one gst
source element that aims to be generic with MediaController and I assume
its first of its kind. I'm working to integrate the thing into Meego
from behalf of Nokia N900 adaptation team. See 'mcsrc' bundled with
gst-nokia-videosrc
(http://meego.gitorious.org/maemo-multimedia/gst-nokia-videosrc). It
also deals with the pipeline setup (data/pipelines.conf) so no need to
use media-ctl cli.
Br,
-Teemu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
2011-01-27 12:28 ` Laurent Pinchart
2011-01-27 22:44 ` Neil MacMunn
@ 2011-02-04 22:33 ` Neil MacMunn
[not found] ` <4D4C7E24.6000004@gumstix.com>
2 siblings, 0 replies; 9+ messages in thread
From: Neil MacMunn @ 2011-02-04 22:33 UTC (permalink / raw)
Cc: linux-media
Thanks Laurent.
I've appended console output to the commands you've suggested.
On 11-01-27 04:28 AM, Laurent Pinchart wrote:
> Hi again,
>
> On Thursday 27 January 2011 02:43:15 Neil MacMunn wrote:
>> Ok I solved the segfault problem by updating some of my v4l2 files
>> (specifically v4l2-common.c). Now I only get nice sounding console
>> messages.
>>
>> Linux media interface: v0.10
>> Linux video capture interface: v2.00
>> omap3isp omap3isp: Revision 2.0 found
>> omap-iommu omap-iommu.0: isp: version 1.1
>> omap3isp omap3isp: hist: DMA channel = 4
>> mt9v032 3-005c: Probing MT9V032 at address 0x5c
>> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 28800000 Hz
>> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 0 Hz
>> mt9v032 3-005c: MT9V032 detected at address 0x5c
>
> As you're using an MT9V032 sensor, I can help you with the pipeline setup. You
> can run the following commands to capture 5 raw images.
>
> ./media-ctl -r -l '"mt9v032 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
Resetting all links to inactive
Setting up link 16:0 -> 5:0 [1]
Setting up link 5:1 -> 6:0 [1]
> ./media-ctl -f '"mt9v032 2-005c":0[SGRBG10 752x480], "OMAP3 ISP CCDC":1[SGRBG10 752x480]'
CCDC":1[SGRBG10 752x480]'
Setting up format SGRBG10 752x480 on pad mt9v032 3-005c/0
Format set: SGRBG10 752x480
Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/0
Format set: SGRBG10 752x480
Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/1
Format set: SGRBG10 752x480
> ./yavta -p -f SGRBG10 -s 752x480 -n 4 --capture=5 --skip 4 -F $(./media-ctl -e "OMAP3 ISP CCDC output")
$(./media-ctl -e "OMAP3 ISP CCDC output")
Device /dev/video2 opened: OMAP3isp_video_pix_to_mbus: mbus->code=0x0000
ISP CCDC output (media).
isp_video_mbus_to_pix: mbus->code=0x300A
Video format set: width: 752 height: 480 buffer size: 721920
Video format: BA10 (30314142) 752x480
4 buffers requested.
length: 721920 offset: 0
Buffer 0 mapped at address 0x402e6000.
length: 721920 offset: 724992
Buffer 1 mapped at address 0x40427000.
length: 721920 offset: 1449984
Buffer 2 mapped at address 0x405bc000.
length: 721920 offset: 2174976
Buffer 3 mapped at address 0x40704000.
Press enter to start capture
isp_video_mbus_to_pix: mbus->code=0x300A
And then it hangs. I'm trying to run a bt but I think mbus->code=0x0000
is the problem. Not sure where it stems from though. Thoughts?
--
Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: omap3-isp segfault
[not found] ` <4D4C7E24.6000004@gumstix.com>
@ 2011-02-09 23:44 ` Laurent Pinchart
0 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2011-02-09 23:44 UTC (permalink / raw)
To: Neil MacMunn; +Cc: linux-media
Hi Neil,
On Friday 04 February 2011 23:31:00 Neil MacMunn wrote:
> On 11-01-27 04:28 AM, Laurent Pinchart wrote:
> > On Thursday 27 January 2011 02:43:15 Neil MacMunn wrote:
> >> Ok I solved the segfault problem by updating some of my v4l2 files
> >> (specifically v4l2-common.c). Now I only get nice sounding console
> >> messages.
> >>
> >> Linux media interface: v0.10
> >> Linux video capture interface: v2.00
> >> omap3isp omap3isp: Revision 2.0 found
> >> omap-iommu omap-iommu.0: isp: version 1.1
> >> omap3isp omap3isp: hist: DMA channel = 4
> >> mt9v032 3-005c: Probing MT9V032 at address 0x5c
> >> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 28800000 Hz
> >> omap3isp omap3isp: isp_set_xclk(): cam_xclka set to 0 Hz
> >> mt9v032 3-005c: MT9V032 detected at address 0x5c
> >
> > As you're using an MT9V032 sensor, I can help you with the pipeline
> > setup. You can run the following commands to capture 5 raw images.
> >
> > ./media-ctl -r -l '"mt9v032 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP
> > CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>
> Resetting all links to inactive
> Setting up link 16:0 -> 5:0 [1]
> Setting up link 5:1 -> 6:0 [1]
>
> > ./media-ctl -f '"mt9v032 2-005c":0[SGRBG10 752x480], "OMAP3 ISP
> > CCDC":1[SGRBG10 752x480]'
>
> Setting up format SGRBG10 752x480 on pad mt9v032 3-005c/0
> Format set: SGRBG10 752x480
> Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/0
> Format set: SGRBG10 752x480
> Setting up format SGRBG10 752x480 on pad OMAP3 ISP CCDC/1
> Format set: SGRBG10 752x480
>
> > ./yavta -p -f SGRBG10 -s 752x480 -n 4 --capture=5 --skip 4 -F
> > $(./media-ctl -e "OMAP3 ISP CCDC output")
>
> Device /dev/video2 opened: OMAP3isp_video_pix_to_mbus: mbus->code=0x0000
> ISP CCDC output (media).
> isp_video_mbus_to_pix: mbus->code=0x300A
> Video format set: width: 752 height: 480 buffer size: 721920
> Video format: BA10 (30314142) 752x480
> 4 buffers requested.
> length: 721920 offset: 0
> Buffer 0 mapped at address 0x402e6000.
> length: 721920 offset: 724992
> Buffer 1 mapped at address 0x40427000.
> length: 721920 offset: 1449984
> Buffer 2 mapped at address 0x405bc000.
> length: 721920 offset: 2174976
> Buffer 3 mapped at address 0x40704000.
> Press enter to start capture
>
> isp_video_mbus_to_pix: mbus->code=0x300A
>
> And then it hangs. I'm trying to run a bt but I think mbus->code=0x0000
> is the problem. Not sure where it stems from though. Thoughts?
As that message is printed by modifications you made to the code, I'm not sure
it's an issue.
Could you cat /proc/interrupts several times when yavta is running to see if
the ISP gets any interrupt ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-02-09 23:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 19:32 omap3-isp segfault Neil MacMunn
2011-01-27 1:43 ` Neil MacMunn
2011-01-27 12:25 ` Laurent Pinchart
2011-01-27 12:28 ` Laurent Pinchart
2011-01-27 22:44 ` Neil MacMunn
2011-01-28 22:19 ` Eino-Ville Talvala
2011-02-01 12:53 ` Teemu Tuominen
2011-02-04 22:33 ` Neil MacMunn
[not found] ` <4D4C7E24.6000004@gumstix.com>
2011-02-09 23:44 ` Laurent Pinchart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.