27 Nov, 2018

1 commit


22 Nov, 2018

2 commits

  • Add debug function print_nbuf_to_eoi, to print the decoder input frame.
    Add module parameter mxc_jpeg_tracing.

    Signed-off-by: Mirela Rabulea
    Reviewed-by: Laurentiu Palcu

    Mirela Rabulea
     
  • Set allow_zero_bytesused, to let gst-launch work, this lead to the need
    to implement V4L2_DEC_CMD_STOP, dummy for now.

    Implement g_fmt_vid_cap, called by gst-launch before queuing any capture
    buffers, this also required some fixes in jpeg_parse and buf_queue,
    which wrongly assumed capture buffers are enqueued before output buffers.
    So, import the resolution and pixel-format from the output queue,
    if the capture queue is not set-up yet.

    Add release_active_buffers and use it in stop_streaming to properly
    clean-up active buffers, this fixes warning at gst-launch stop with Ctrl+C

    Check for decoding/encoding error in interrupt handler and print CAST IP
    error status, found some yuv422 images with errors in SOS marker.

    Partially implemented subscribe_event, V4L2_EVENT_EOS is not working yet,
    will be addressed in a subsequent fix.

    Signed-off-by: Mirela Rabulea
    Reviewed-by: Laurentiu Palcu

    Mirela Rabulea
     

19 Nov, 2018

3 commits


13 Nov, 2018

7 commits


02 Nov, 2018

10 commits

  • There is two methods to select different mode for camera sensor, one
    is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
    selection through resolution. If resolution match one of camera sensor
    supported, driver will select the corresponding mode. If not, driver
    will select the max resolution supported by sensor and use ISI to
    resize to the target resolution.

    This patch is for ov10635 camera sensor

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 21680ebeebbd2deb0430e0e2df82e3b5ec95c08d)

    Guoniu.Zhou
     
  • There is two methods to select different mode for camera sensor, one
    is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
    selection through resolution. If resolution match one of camera sensor
    supported, driver will select the corresponding mode. If not, driver
    will select the max resolution supported by sensor and use ISI to
    resize to the target resolution.

    This patch is for parallel interface of ov5640 sensor

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 8eb46dab84dd589ba0e6f997e28fa9ff3bbbcd63)

    Guoniu.Zhou
     
  • There is two methods to select different mode for camera sensor, one
    is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
    selection through resolution. If resolution match one of camera sensor
    supported, driver will select the corresponding mode. If not, driver
    will select the max resolution supported by sensor and use ISI to
    resize to the target resolution.

    This patch is for mipi interface of ov5640 sensor

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)

    Guoniu.Zhou
     
  • add YUV444M format support

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit e424d16926d0320b31850bdd293e77c164a80661)

    Guoniu.Zhou
     
  • According to V4L2 doc, RGB24 and BGR24 should have three bytes
    for each pixel rather than four, so correct it.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 3694f7ffe2443d86ae740f12393edc007c997a98)

    Guoniu.Zhou
     
  • Initialize SCL_IMG_CFG to source image width and height when
    scale disabled

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 506b32bb9ad6a3f596510e401b0e8fa16ca8b659)

    Guoniu.Zhou
     
  • Return error code when user try to do upscale since isi don't support.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 59949e29dcd996c50cae43bc5ff3f89907761c1b)

    Guoniu.Zhou
     
  • When ISI channel0 is used to recevice camera data, it can
    not be used to mem2mem. So return -EBUSY error code when
    user try to use them at the same time.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit c6d5bf866819deaaf4900ae47d575c5a36d30a66)

    Guoniu.Zhou
     
  • Power off some resource of ISI can't really hardware reset
    ISI, because all eight ISI channels share one hardware reset.
    For example, if we enable ISI channel 0 and 1 in dts and only
    power off and on channel0 domain, it will not really reset and
    the value of channel0 register will not change.

    Hardware reset was introduced for fixing ISI can't receive data
    from CI_PI after system boot in QXP A0 and this is fixed in new
    version QXP B0, so remove HW reset in driver.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit df9da83f82c94ca578303b45c60fb17da2d9d1aa)

    Guoniu.Zhou
     
  • Because ISI can't restore to default state after software
    reset, the status value of exit will be maintained. If not
    cleared, ISI will triggle fake interrupt after enableing irq,
    but there is not ready for data.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 932af3df1745f5afb0b9433d3355b2e24b177f4e)

    Guoniu.Zhou
     

29 Oct, 2018

17 commits

  • Fix hdmi rx reset bit error.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • HDMI RX DDC clock is configurated in HDMI RX FW(V1.0.52).
    Remove code in driver.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • -HDMI RX controller enter low power mode when cable plug out.
    -Replace CDN_API_HDMIRX_ReadEvent with
    CDN_API_General_GetHpdState_blocking, hdmi rx could enter low power
    mode.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Because V4L2_PIX_FMT_RGB32 is deprecated and must not
    be used by new drivers. V4L2_PIX_FMT_XRGB32 is used to
    replace it.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit e9e5c58dbea63bad8be43c924d35d499499b1804)

    Guoniu.Zhou
     
  • When QM run two linux and divide ISI resource into two
    parts, channel 0-3 for one linux and channel 4-7 for the
    other. If dom0 destroy domU which camera is running, then
    restart domU. ISI will trigger interrupt immediately after
    register irq handler when driver probe. The reason for this
    is that status register of ISI isn't cleared. ISI have no
    ablility to reset its register to defautl value expcept power
    off all resource of ISI, but it can't be done in two os. So
    manually clean status before registering irq when driver probe.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit b84601aaef15870c80f684b1881b22e9dd2ba9a3)

    Guoniu.Zhou
     
  • Validate the component ID's when parsing the jpeg headers,
    print error and don't continue the decoding, avoid getting stuck.

    Signed-off-by: Mirela Rabulea

    Mirela Rabulea
     
  • Remove hardcodings for encoder (configuration stream especially).
    This fix also requires a fixed version of the test applications,
    encoder_test.out/decoder_test.out (linux-test repo).

    Also fixed MLK-19453: Add support for YUV420 format in jpeg decoder
    YUV420 is generally working on encoder/decoder,
    but for some particular small files the decoder enters infinite error:
    "Instance released before the end of transaction".
    RGB24 is working, but the colors are strange in jpeg.
    Since YUV444 and RGB24 have the same subsampling,
    a RGB24 raw file can be encoded/decoded as YUV444 with the same results.
    Fixes for invalid pixel formats.
    Full battery of tests run.

    Signed-off-by: Mirela Rabulea

    Mirela Rabulea
     
  • Corrupted image is observed on the capture when do the resolution switch.
    This usually happens with base address switch error (BIT_ADDR_CH_ERR_INT).
    skip the frame if the frame index does not correspond to the requested one
    to resolve it.

    This patch was proposed by Tom Zheng

    Signed-off-by: Robby Cai

    Robby Cai
     
  • 1. Before enabling ISI channel, driver need to fill its out buffer
    address, so correct this sequence

    2. Because ISI use ping-pong buffer and write data to memory with
    BUF1->BUF2->BUF1... sequence. If it finish with BUF1 and user start
    a new capture process, it will start with BUF2. This will lead the
    buffer ready for being read is not equal to buffer written by ISI.So
    HW reset ISI, in order to confirm it start with BUF1.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit 794ce0cb7d7f129fb46f5d6f38e82cc1e7f2a367)

    Guoniu.Zhou
     
  • Update edid block0&1 for imx8qm hdmi rx.
    Remove unsupported video modes.
    Added edid clock setting.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Because V4L2_PIX_FMT_RGB32 is deprecated and must not
    be used by new drivers. V4L2_PIX_FMT_XRGB32 is used to
    replace it.

    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit a6780d01aa9219c6a720177bb85af755ba09a24a)

    Guoniu.Zhou
     
  • Fix kernel build fail when set JPEG driver be module

    Signed-off-by: Guoniu.Zhou

    Guoniu.Zhou
     
  • In ov5640_probe(), if any error is encountered (like no camera
    attached), the function returns an error but the sensor structure is not
    freed, leading to a memory leak:

    unreferenced object 0xffff8000b9eafe00 (size 512):
    comm "swapper/0", pid 1, jiffies 4294892836 (age 62894.028s)
    hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] kmem_cache_alloc+0x1a4/0x208
    [] ov5640_probe+0x30/0x8a8
    [] i2c_device_probe+0x364/0x378
    [] driver_probe_device+0x300/0x458
    [] __driver_attach+0xcc/0x118
    [] bus_for_each_dev+0x4c/0x98
    [] driver_attach+0x20/0x28
    [] bus_add_driver+0x1f8/0x298
    [] driver_register+0x60/0xf8
    [] i2c_register_driver+0x44/0xc8
    [] ov5640_i2c_driver_init+0x18/0x20
    [] do_one_initcall+0x38/0x128
    [] kernel_init_freeable+0x188/0x22c
    [] kernel_init+0x10/0x108
    [] ret_from_fork+0x10/0x18
    [] 0xffffffffffffffff

    This patch replaces kmalloc with devm_kzalloc() and will also get rid of
    memset() in the process.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • 1. add CHNL_SCL_IMG_CFG register that is new added in QXP/QM B0
    2. according to isi owner's comments, CHNL_SCL_IMG_CFG need to
    equal to CHNL_IMG_CFG when scaling disabled and equal to scaled
    image size when scaling enabled, so add configuration for this
    register.
    3. Becuse isi software reset can't reset isi register to default
    , so it need to manual clear if there is no scaling.

    Signed-off-by: Guoniu.Zhou

    Guoniu.Zhou
     
  • In order to use ISI ping-pong buffer, driver add another list
    for V4L2 m2m cap_q queue and add new list member to it from
    cap_q default list without decreasing the related counter, so
    it leads to overflow when run 254 times. So correct it.

    Signed-off-by: Guoniu.Zhou

    Guoniu.Zhou
     
  • When the register setting for fifo_send_level is set to high, some residual
    data of a frame which cannot fill up to the send_level, will be sent with
    the next frame data. In this case, for CSI receive dma, sometimes,
    the vertical blanking is too short to finish the storage of the previous
    frame before the next frame start, depending on the system bandwidth.

    Tested on imx8mq-evk rev B4 and B3, with OV5640 camera.

    This patch was proposed by Tom Zheng

    Signed-off-by: Mirela Rabulea
    Reviewed-by: Robby Cai

    Mirela Rabulea
     
  • Add HPD support.
    Add s_param function that may needed by user application.
    Add mutex protect for hdp register access.

    Signed-off-by: Sandor Yu

    Sandor Yu