This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5718: MIPI CSI Camera support

Part Number: AM5718
Other Parts Discussed in Thread: TAS2552, DAC124S085

Tool/software: Linux

Hello everyone;

We have checked the "ov490" driver then we developed our driver.

now we are configured our sensor in RAW8 data mode. for that we have been changes as per below  in i2c v4l2 subdriver.


static const struct AR1335_color_format AR1335_cfmts[] = {
    {
        .code        = MEDIA_BUS_FMT_SRGGB8_1X8    ,
        .colorspace    = V4L2_COLORSPACE_RAW ,
    },
};

but still image is not perfect.

Please check the below log for reference.

root@am57xx-evm:/boot# dmesg | grep cal
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000781] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
[   38.897956] cal-000: Using sensor AR1335 4-0036 for capture
[   38.903385] cal-000: subdev AR1335 4-0036: code: 3014 idx: 0
[   38.903391] cal-000: matched fourcc: RGGB: code: 3014 idx: 0
[   38.908171] cal-000: V4L2 device registered as video0
[   38.930784] cal-000: __subdev_get_format 640x480 code:3014
[   38.930792] cal-000: cal_calc_format_size: fourcc: RGGB size: 640x480 bpl:640 img_size:307200

root@am57xx-evm:/boot# ./yavta --enum-formats /dev/video0
Device /dev/video0 opened.[  136.198099] 1332 - AR1335_enum_size()

Device `cal' on `platform:cal-000' is a video output (without [  136.206698] 1332 - AR1335_enum_size()
mplanes) device.
- Available formats:
        Format 0: SRGGB8 (42474752)
        Type: Video capture (1)
        Name: 8-bit Bayer RGRG/GBGB
        Frame size: 640x480 ()

Video format: SRGGB8 (42474752) 640x480 (stride 640) field none buffer size 307200

  284.154862] video0: VIDIOC_QUERYCAP: driver=cal, card=cal, bus=platform:cal-000, version=0x0004093b, capabilities=0x85200001, device_caps=0x05200001
[  284.154917] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=RGGB, description='8-bit Bayer RGRG/GBGB'
[  284.154985] 1332 - AR1335_enum_size()
[  284.160874] cal-000: cal_enum_framesizes: index: 0 code: 3014 W:[640,640] H:[480,480]
[  284.160878] video0: VIDIOC_ENUM_FRAMESIZES: index=0, pixelformat=RGGB, type=1, wxh=640x480
[  284.160915] video0: VIDIOC_ENUM_FRAMEINTERVALS: error -515: index=0, pixelformat=RGGB, wxh=640x480, type=0
[  284.160949] 1332 - AR1335_enum_size()
[  284.175204] video0: VIDIOC_ENUM_FRAMESIZES: error -22: index=1, pixelformat=RGGB, type=0
[  284.175258] video0: VIDIOC_ENUM_FMT: error -22: index=1, type=vid-cap, flags=0x0, pixelformat=
[  284.175281] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-cap-mplane, flags=0x0, pixelformat=
[  284.175302] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-out, flags=0x0, pixelformat=
[  284.175321] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-out-mplane, flags=0x0, pixelformat=
[  284.175341] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-overlay, flags=0x0, pixelformat=
[  284.175362] video0: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=RGGB, field=none, bytesperline=640, sizeimage=307200, colorspace=11, flags=0x0, ycbcr_enc=23344, quantization=61034, xfer_func=41040

root@am57xx-evm:/boot# lsmod
Module                  Size  Used by
ov490                  15326  1
dwc3                   71701  0
udc_core               19450  1 dwc3
usb_common              4737  2 udc_core,dwc3
snd_soc_simple_card     5844  0
snd_soc_simple_card_utils     5095  1 snd_soc_simple_card
omap_aes_driver        19101  0
omap_sham              21602  0
omap_wdt                4634  0
ahci_platform           3474  0
libahci_platform        8821  1 ahci_platform
libahci                28679  2 ahci_platform,libahci_platform
libata                205982  3 ahci_platform,libahci_platform,libahci
scsi_mod              133717  1 libata
dwc3_omap               5260  0
rtc_omap                9662  0
rtc_palmas              5322  0
extcon_palmas           5917  0
extcon_core            17190  3 dwc3_omap,extcon_palmas,dwc3
omap_des               11525  0
snd_soc_tas2552         9509  1
ti_cal                 26655  0
leds_dac124s085         2315  0
des_generic            17608  1 omap_des
crypto_engine           6458  2 omap_des,omap_aes_driver
sch_fq_codel            9039  1
gpio_interrupt_driver     2639  0

root@am57xx-evm:/boot# ./yavta -f SRGGB8 -s 640x480 -n 4 --capture=1 --file=image.raw -F /dev/video0
Device /dev/video0 opened.[   61.258588] 1332 - AR1335_enum_size()

Device `cal' on `platform:cal-000' is a video output (without [   61.266344] 89 - to_AR1335()
mplanes) device.
[   61.274542] 1300 - AR1335_set_fmt()
Video format set: SRGGB8 (42474752) 640x480 (stride 640) field n[   61.279047] vb2-core: __setup_offsets: buffer 0, plane 0 offset 0x00000000
one buffer size 307200
Video format: SRGGB8 (42474752) 640x480 [   61.295552] vb2-core: __setup_offsets: buffer 1, plane 0 offset 0x0004b000
(stride 640) field none buffer size 307200
[   61.304534] vb2-core: __setup_offsets: buffer 2, plane 0 offset 0x00096000
[   61.315152] vb2-core: __setup_offsets: buffer 3, plane 0 offset 0x000e1000
[   61.322792] vb2-core: __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each
4 buffers requested.[   61.330213] vb2-core: vb2_mmap: buffer 0, plane 0 successfully mapped

length: 307200 offset: 0 timestamp type/source: mono/EoF
[   61.341604] vb2-core: vb2_mmap: buffer 1, plane 0 successfully mapped
Buffer 0/0 mapped at address 0xb6d84000.
length: 307200 offset:[   61.350020] vb2-core: vb2_mmap: buffer 2, plane 0 successfully mapped
 307200 timestamp type/source: mono/EoF
Buffer 1/0 mapped at ad[   61.365969] vb2-core: vb2_mmap: buffer 3, plane 0 successfully mapped
dress 0xb6d39000.
length: 307200 offset: 614400 timestamp type/[   61.376078] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded
source: mono/EoF
Buffer 2/0 mapped at address 0xb6cee000.
leng[   61.386407] vb2-core: vb2_core_qbuf: qbuf of buffer 1 succeeded
th: 307200 offset: 921600 timestamp type/source: mono/EoF
Buffe[   61.397898] vb2-core: vb2_core_qbuf: qbuf of buffer 2 succeeded
r 3/0 mapped at address 0xb6ca3000.
[   61.409436] vb2-core: vb2_core_qbuf: qbuf of buffer 3 succeeded
[   61.419908] 1211 - AR1335_s_stream()
[   61.427664] 89 - to_AR1335()
[   61.430646] 1362 - AR1335_init_gpios()
[   61.990885] vb2-core: vb2_core_streamon: successful
[   61.998004] vb2-core: __vb2_wait_for_done_vb: will sleep waiting for buffers

 

As per above command we try to capture the image using yavta application but appliation is does not complete and still wait at this point.

Please help us to solve this issue.


Thanks & Best Regards;

Nikunj Patel

  • Gentle reminder,

    Thanks & Best Regards;
    Nikunj Patel
  • Hi Nikunj, I am confused with this statement

    Nikunj Patel said:
    but still image is not perfect.

    The logs that you share seems to have issue in capturing the image itself. What do you mean by still image is not perfect? 

    Also, can you please share dmesg log with debugging logs enabled for CAL module?

  • Hi Manisha,

    When we try to capture images four to five times so only one time successful and four times it stop as per above description. The image capture during one successful case is not proper.
    I will send you that image on Monday.

    I have enable all the logs as per below links
    processors.wiki.ti.com/.../Linux_Core_CAL_User's_Guide

    Still we miss to enable cal debug logs? If yes so please guide us how we can enable.

    Thanks
  • If you have enabled the debug flags as mentioned in the wiki page, then CAL logs should be available as part of kernel dmesg logs. Please share your dmesg logs.
  • Hi Manisha,
    I will share on Monday due to out of office.

    Thanks
  • Hi Manisha;

    Please check the below dmesg when "insmod ar1335.ko"

    root@am57xx-evm:/boot# dmesg

    [   37.355042] 1540 - AR1335_probe() Debug1

    [   37.381835] AR1335 4-0036: AR1335_reg_read 0x01 0x53 !

    [   37.387202] AR1335 4-0036: AR1335_reg_read 0x00 0x06 !

    [   37.394876] AR1335 4-0036: AR1335_reg_read 0x06 0x0a !

    [   37.400236] AR1335 4-0036: AR1335_reg_read 0x0a 0xff !

    [   37.407545] 1546 - AR1335_probe() Debug2

    [   37.412381] AR1335 4-0036: GPIO lookup for consumer mux

    [   37.412388] AR1335 4-0036: using device tree for GPIO lookup

    [   37.412465] of_get_named_gpiod_flags: parsed 'mux-gpios' property of node '/ocp/i2c@4807c000/ov490@24[0]' - status (0)

    [   37.412474] gpio-193 (sysfs): gpiod_request: status -16

    [   37.412479] 1560 - AR1335_probe() Debug3

    [   37.416507] 89 - to_AR1335()

    [   37.419488] AR1335 4-0036: AR1335_of_probe_1

    [   37.427399] AR1335 4-0036: AR1335_of_probe_2

    [   37.434818] AR1335 4-0036: AR1335_of_probe_3

    [   37.439110] AR1335 4-0036: AR1335_of_probe_4: priv->num_lanes 4

    [   37.447244] 1569 - AR1335_probe() Debug4

    [   37.451282] 1579 - AR1335_probe() Debug5

    [   37.456705] 1588 - AR1335_probe() Debug6

    [   37.460732] 89 - to_AR1335()

    [   37.465035] 1362 - AR1335_init_gpios()

    [   37.468888] gpiod_set_value: invalid GPIO (errorpointer)

    [   37.643724] AR1335 4-0036: AR1335_reg_read 0x00 0x00 !

    [   37.649089] AR1335 4-0036: AR1335_reg_read 0x10 0x04 !

    [   37.657317] AR1335 4-0036: AR1335_reg_read 0x01 0x20 !

    [   37.663646] AR1335 4-0036: AR1335_reg_read 0x00 0x00 !

    [   37.668996] AR1335 4-0036: AR1335_reg_read 0x00 0x68 !

    [   37.676137] AR1335 4-0036: AR1335_reg_read 0x00 0x68 !

    [   37.681485] AR1335 4-0036: AR1335_reg_read 0x07 0x81 !

    [   37.688660] AR1335 4-0036: AR1335_reg_read 0x94 0x34 !

    [   37.694999] AR1335 4-0036: AR1335_reg_read 0xef 0xf4 !

    [   37.700352] AR1335 4-0036: AR1335_reg_read 0x61 0x3e !

    [   37.707478] AR1335 4-0036: AR1335_reg_read 0x44 0x28 !

    [   37.714847] AR1335 4-0036: AR1335_reg_read 0x00 0x53 !

    [   37.720196] AR1335 4-0036: AR1335_reg_read 0x00 0x2a !

    [   37.727346] AR1335 4-0036: AR1335_reg_read 0x53 0x90 !

    [   37.733683] AR1335 4-0036: AR1335_reg_read 0x23 0xa9 !

    [   37.739038] AR1335 4-0036: AR1335_reg_read 0x20 0x13 !

    [   37.746158] AR1335 4-0036: AR1335_reg_read 0x18 0x68 !

    [   37.751512] AR1335 4-0036: AR1335_reg_read 0x85 0x8a !

    [   37.758672] AR1335 4-0036: AR1335_reg_read 0x00 0x03 !

    [   37.765006] AR1335 4-0036: AR1335_reg_read 0x00 0x01 !

    [   37.770361] AR1335 4-0036: AR1335_reg_read 0x02 0x03 !

    [   37.777490] AR1335 4-0036: AR1335_reg_read 0x53 0x53 !

    [   37.783870] AR1335 4-0036: AR1335_reg_read 0x00 0x0a !

    [   37.789220] AR1335 4-0036: AR1335_reg_read 0x00 0x01 !

    [   37.796368] AR1335 4-0036: AR1335_reg_read 0x08 0x08 !

    [   37.802688] AR1335 4-0036: AR1335_reg_read 0x01 0x01 !

    [   37.808037] AR1335 4-0036: AR1335_reg_read 0x03 0x28 !

    [   37.815175] AR1335 4-0036: AR1335_reg_read 0x0d 0x67 !

    [   37.820529] AR1335 4-0036: AR1335_reg_read 0x02 0x48 !

    [   37.827679] AR1335 4-0036: AR1335_reg_read 0x0a 0x01 !

    [   37.834015] AR1335 4-0036: AR1335_reg_read 0x02 0x90 !

    [   37.839364] AR1335 4-0036: AR1335_reg_read 0x01 0xf0 !

    [   37.846481] AR1335 4-0036: AR1335_reg_read 0xc0 0x47 !

    [   37.852801] AR1335 4-0036: AR1335_reg_read 0x02 0x06 !

    [   37.858155] AR1335 4-0036: AR1335_reg_read 0x41 0x6e !

    [   37.865316] AR1335 4-0036: AR1335_reg_read 0x00 0x02 !

    [   37.870663] AR1335 4-0036: AR1335_reg_read 0x00 0x01 !

    [   37.877795] AR1335 4-0036: AR1335_reg_read 0x00 0x40 !

    [   37.884120] AR1335 4-0036: AR1335_reg_read 0x4a 0xec !

    [   37.889474] AR1335 4-0036: AR1335_reg_read 0x03 0x02 !

    [   37.896612] AR1335 4-0036: AR1335_reg_read 0x03 0x0a !

    [   37.902928] AR1335 4-0036: AR1335_reg_read 0x00 0x00 !

    [   37.908277] AR1335 4-0036: AR1335_reg_read 0x00 0x68 !

    [   37.915433] AR1335 4-0036: AR1335_reg_read 0x00 0x02 !

    [   37.920782] AR1335 4-0036: AR1335_reg_read 0x00 0x00 !

    [   37.928762] AR1335 4-0036: AR1335_reg_read 0x00 0x03 !

    [   37.935325] AR1335 4-0036: AR1335_reg_read 0x00 0x00 !

    [   37.940486] 1434 -0x0600 AR1335_init_gpios()

    [   37.946608] AR1335 4-0036: AR1335_reg_read 0x00 0x02 !

    [   37.952757] 1598 - AR1335_probe() Debug7

    [   37.956784] cal-000: Using sensor AR1335 4-0036 for capture

    [   37.956789] 1315 - AR1335_enum_code()

    [   37.960551] cal-000: subdev AR1335 4-0036: code: 3014 idx: 0

    [   37.960556] cal-000: matched fourcc: RGGB: code: 3014 idx: 0

    [   37.960560] 1315 - AR1335_enum_code()

    [   37.968537] cal-000: V4L2 device registered as video1

    [   37.975977] 89 - to_AR1335()

    [   37.978959] 1279 - AR1335_get_fmt()

    [   37.989492] cal-000: __subdev_get_format 640x480 code:3014

    root@am57xx-evm:/boot# dmesg | grep cal

    [   37.956784] cal-000: Using sensor AR1335 4-0036 for capture

    [   37.960551] cal-000: subdev AR1335 4-0036: code: 3014 idx: 0

    [   37.960556] cal-000: matched fourcc: RGGB: code: 3014 idx: 0

    [   37.968537] cal-000: V4L2 device registered as video1

    [   37.989492] cal-000: __subdev_get_format 640x480 code:3014

    [   37.989501] cal-000: cal_calc_format_size: fourcc: RGGB size: 640x480 bpl:640 img_size:307200

    Please check the dmesg log during below command of capturing image:

    ./yavta -f SRGGB8 -s 640x480 -n 4 --capture=1 --file=image.raw -F /dev/video1

    [  182.039593] cal-000: csi2_ddrclk_khz: 201000

    [  182.039596] cal-000: ths_term: 4 (0x04)

    [  182.039600] cal-000: ths_settle: 25 (0x19)

    [  182.039605] cal-000: CSI2_0_REG0 = 0x01000419

    [  182.039611] cal-000: CSI2_0_REG1 = 0xe002e10e

    [  182.039617] cal-000: CAL_CSI2_TIMING(1) = 0x00004197 Stop States

    [  182.039621] cal-000: CAL_CSI2_TIMING(1) = 0x0000c197 Force RXMODE

    [  182.040748] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a054321 Powered UP

    [  182.610354] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x6a054321 Complex IO Reset Done (0)

    [  182.610360] cal-000: CAL_CSI2_TIMING(1) = 0x00004197 Stop State Reached

    [  182.610366] cal-000: CSI2_0_REG1 = 0xf002e10e (Bit(31,28) should be set!)

    [  206.057252] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x60054321 Powered Down

    [  206.070085] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x20054321 Complex IO in Reset (10) (timeout)

    [  228.740960] cal-000: cal_calc_format_size: fourcc: RGGB size: 640x480 bpl:640 img_size:307200

    [  228.755480] cal-000: __subdev_set_format 640x480 code:3014

    [  228.755488] cal-000: cal_calc_format_size: fourcc: RGGB size: 640x480 bpl:640 img_size:307200

    [  228.755573] cal-000: nbuffers=4, size=307200

    [  228.896973] cal-000: sensor Pixel Rate: 201000000

    [  228.897029] cal-000: CAL_CSI2_CTX0(1) = 0x00000101

    [  228.897036] cal-000: CAL_PIX_PROC(1) = 0x00080005

    [  228.897042] cal-000: CAL_WR_DMA_CTRL(1) = 0x07804304

    [  228.897048] cal-000: CAL_WR_DMA_OFST(1) = 0x00000280

    [  228.897054] cal-000: CAL_WR_DMA_XSIZE(1) = 0x02800000

    [  228.897059] cal-000: CAL_CTRL = 0xff1fe07e

    [  228.897065] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x00054321

    [  228.897081] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x40054321 De-assert Complex IO Reset

    [  228.897086] cal-000: csi2_ddrclk_khz: 201000

    [  228.897090] cal-000: ths_term: 4 (0x04)

    [  228.897095] cal-000: ths_settle: 25 (0x19)

    [  228.897101] cal-000: CSI2_0_REG0 = 0x01000419

    [  228.897107] cal-000: CSI2_0_REG1 = 0xe002e10e

    [  228.897113] cal-000: CAL_CSI2_TIMING(1) = 0x00004197 Stop States

    [  228.897119] cal-000: CAL_CSI2_TIMING(1) = 0x0000c197 Force RXMODE

    [  228.898252] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a054321 Powered UP

    [  229.469222] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x6a054321 Complex IO Reset Done (0)

    [  229.469228] cal-000: CAL_CSI2_TIMING(1) = 0x00004197 Stop State Reached

    [  229.469234] cal-000: CSI2_0_REG1 = 0xf002e10e (Bit(31,28) should be set!)

    [  231.391491] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x60054321 Powered Down

    [  231.403095] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x20054321 Complex IO in Reset (10) (timeout)

    We have configured our sensor's bit clock to 990M and data format was RAW8 and TEST pattern for the color-bars.

    Note: if we select below format then only stop the image during capture.
    static const struct AR1335_color_format AR1335_cfmts[] = {
            .code        = MEDIA_BUS_FMT_SRGGB8_1X8,
            .colorspace    = V4L2_COLORSPACE_SMPTE170M.
        },
    };

    if we used below format then we are able to capture the image successfully.

    static const struct AR1335_color_format AR1335_cfmts[] = {
        {
            .code        = MEDIA_BUS_FMT_YUYV8_2X8,
            .colorspace    = V4L2_COLORSPACE_SMPTE170M,
        },
    };

    Please check the below captured image using

    "./yavta -f YUYV -s 640x480 -n 4 --capture=1 --file=image.rgb -F /dev/video0" [in board]

    ffmpeg -s 640x480 -pix_fmt rgb565le -i image.rgb -f image2 -pix_fmt rgb24 frame1.png [in Host PC]

    Thanks & Best Regards;

    Nikunj Patel

  • Hi Nikunj,

    Looks like the DPHY configuration is not happening properly due to improper handshaking with the sensor driver.

    The CAL driver needs to know the link rate (established by camera sensor) to configure the DPHY. CAL driver is based on V4L2 framework and due to the limitation of the framework (only available configurable parameter is V4L2_CID_PIXEL_RATE), it uses pixel rate to calculate the link rate.

    The formula used to pre-calculate the V4L2_CID_PIXEL_RATE value in the ov490.c driver is shown near the top of the file (lookup OV490_PIXEL_RATE_PER_LANE) and look at the comment. Obviously this value should normally be dynamic based on the resolution, pixel format and number of data lane used. In the ov490 case we only support one resolution and pixel format so the only variable is the number of data lanes being used. Hence the hard coded value being used here.

    Looks like you have copied this hard coded value in your driver. You need to calculate the value for your driver based on your sensor and use case need. You can find a high level documentation about the PIXEL_RATE value calculation from within the kernel documentation (formula show):
    Documentation/media/kapi/csi2.rst (lookup PXIEL_RATE)
  • HI Manisha;

    can you help us to calculate the pixel rate for below two resolution. also, suggest us the any updated driver which have used the run-time calculation of pixel rate.

    1. 4208x3120
    2. 2592x1944

     Our Sensor Configuration:

    1. 4 lane communication
    2. 990MHz bitclock.
    3. RAW10 & RAW8 mode

    also we check the Fvco is 804,000,000 mention in code(ov490.c) so we can't find this value to anywhere so can you more help to understand this value. 

    Thanks & Best Regards;

    Nikunj Patel

  • Hi Manisha;

    Thanks for your support.

    Aftre changing "#define AR1335_PIXEL_RATE_PER_LANE    61875000" this pixel rate we are able to capture the image.

    Now we are success to capture the image of "640x480" and "2104x1560" resolution.

     

    but when we try to capture the image of "4208x3120" resolution we got below error and we can't  capture the image.

    [  288.075121] video0: VIDIOC_QUERYCAP: driver=cal, card=cal, bus=platform:cal-000, version=0x0004093b, capabilities=0x85200001, device_caps=0x05200001

    [  288.075172] cal-000: cal_calc_format_size: fourcc: GRBG size: 4208x3120 bpl:4208 img_size:13128960

    [  288.075180] cal-000: __subdev_set_format 4208x3120 code:3002

    [  288.075186] cal-000: cal_calc_format_size: fourcc: GRBG size: 4208x3120 bpl:4208 img_size:13128960

    [  288.075280] cal-000: nbuffers=3, size=13128960

    [  288.113681] cal 4845b000.cal: dma_alloc_coherent of size 13131776 failed

     

    Please provide us the support to solve this issue.

    Thanks & Best Regards;

    Nikunj Patel

  • Gentle reminder,

    Thanks & Best Regards;
    Nikunj Patel

  • Hi Nikunj,

    The error you  are seeing with the larger frame size is related to the availability of the CMA memory pool.

    The application is running out of memory -  4208x3120 is basically 13128960 bytes per frame, you need to increase the amount of memory reserved for the CMA pool.

     

    You can  change the CMA pool size either in the kernel config or on the kernel boot parameters by adding "cma=128M" or higher.

  • Hi Manisha,
    Thanks for your help.

    From above solution we got success and now we are able to capture the image.

    can you guide us for how to add the different resolution support in single kernel driver[example:ov960]?

    Thanks & Best Regards,
    Nikunj Patel
  • Hi,
    Gentle reminder.

    Thanks & Best Regards;
    Nikunj Patel
  • Supporting multiple different resolutions is a standard V4L2 concept. If you are looking for an example you can take any of the drivers/media/i2c/*.c and find one
    that support more than one resolutions to see how it is done.
    A specific example would be ov2659.c.