Skip to contentSkip to conversation

omap3-isp segfault

DISCUSSION Neil MacMunn 4 participants 9 messages Jan 26, 2011 – Feb 9, 2011 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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

Quoted 219 lines · Neil MacMunn

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

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

Hi Neil,

Quoted 37 lines · 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
     ...
Quoted 1 line

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.

Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw
In reply to Neil MacMunn

Hi again,

Quoted 4 lines · 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.

Quoted 9 lines

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")

Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw
Quoted 10 lines · Laurent Pinchart

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

#5 lore raw
Quoted 2 lines · Neil MacMunn

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.

....

Quoted 6 lines

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

#6 lore raw
In reply to Neil MacMunn
Quoted 7 lines · Neil MacMunn
# 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

#7 lore raw
In reply to Laurent Pinchart

Thanks Laurent.

I've appended console output to the commands you've suggested.

Quoted 17 lines · Laurent Pinchart

Hi again,

Quoted 4 lines · 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.

Quoted 9 lines

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

Quoted 4 lines

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]

Quoted 1 line

./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

Quoted 1 line

./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?

Signature · 1 line
Neil

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Hi Neil,

Quoted 55 lines · On Friday 04 February 2011 23:31:00 Neil MacMunn wrote:
Quoted 15 lines · Laurent Pinchart
Quoted 4 lines · 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.

Quoted 9 lines

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

Quoted 5 lines

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]

Quoted 2 lines

./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

Quoted 2 lines

./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

Quoted 4 lines

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 ?

Signature · 3 lines
Regards,

Laurent Pinchart