Db820c - mipi csi camera support


#1

hi,

http://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/latest/

In this release , which is the kernel branch mapped to the built bootimage ? does it mapped to this git tree
https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=release/db820c/qcomlt-4.11

Does it has mipi csi camera supported?

regards,
vinaysimha


#2

I’m also looking forward to those answers. I hope someone could give us some feedback on the features roadmap of the Linaro Debian related to the CSI camera drivers (such as OV5645, CAMSS and CCI), which are required for enabling the cameras. What I can notice is that the support for this board (DB820c) is still preliminary, and those missing features will be deployed in next releases. But this is just my guess.


#3

hi,

yes, the current builds are still preliminary. We are working on a kernel upgrade to our 4.14 release branch (e.g. the same branch we use for DB410c). That should happen really soon now, we are getting close.

In terms of camera/CSI, you can expect pretty much the same features set as on DB410c. The following is done and the code is available publicly on mailing lists already:

  • Input from camera sensor via CSIPHY - DPHY (2 phase);
  • Generation of test input data by the TG in CSID;
  • RDI interface of VFE (VFE0 only) - raw dump of the input data to memory. Supported formats:
    • YUYV/UYVY/YVYU/VYUY (packed YUV 4:2:2 - V4L2_PIX_FMT_YUYV / V4L2_PIX_FMT_UYVY / V4L2_PIX_FMT_YVYU / V4L2_PIX_FMT_VYUY);
    • MIPI RAW8 (8bit Bayer RAW - V4L2_PIX_FMT_SRGGB8 / V4L2_PIX_FMT_SGRBG8 / V4L2_PIX_FMT_SGBRG8 / V4L2_PIX_FMT_SBGGR8);
    • MIPI RAW10 (10bit packed Bayer RAW - V4L2_PIX_FMT_SBGGR10P / V4L2_PIX_FMT_SGBRG10P / V4L2_PIX_FMT_SGRBG10P / V4L2_PIX_FMT_SRGGB10P);
    • MIPI RAW12 (12bit packed Bayer RAW - V4L2_PIX_FMT_SRGGB12P / V4L2_PIX_FMT_SGBRG12P / V4L2_PIX_FMT_SGRBG12P / V4L2_PIX_FMT_SRGGB12P).

The following is done internally, and not yet available publicly. Pending some internal reviews.

  • PIX interface of VFE (VFE0 only):
    • Format conversion.
      • Supported input formats:: YUYV/UYVY/YVYU/VYUY (packed YUV 4:2:2 - V4L2_PIX_FMT_YUYV / V4L2_PIX_FMT_UYVY / V4L2_PIX_FMT_YVYU / V4L2_PIX_FMT_VYUY).
      • Supported output formats:
        • NV12/NV21 (two plane YUV 4:2:0 - V4L2_PIX_FMT_NV12 / V4L2_PIX_FMT_NV21);
        • NV16/NV61 (two plane YUV 4:2:2 - V4L2_PIX_FMT_NV16 / V4L2_PIX_FMT_NV61);
        • YUYV/UYVY/YVYU/VYUY (packed YUV 4:2:2 - V4L2_PIX_FMT_YUYV / V4L2_PIX_FMT_UYVY / V4L2_PIX_FMT_YVYU / V4L2_PIX_FMT_VYUY).
    • Scaling support. Configuration of the VFE0 Encoder Scale module for downscalling with ratio up to 16x.
    • Cropping support. Configuration of the VFE0 Encoder Crop module.
  • RDI interface of VFE (VFE0 only) - raw dump of the input data to memory. Add support for:
    • MIPI RAW14 (14bit packed Bayer RAW - V4L2_PIX_FMT_SRGGB14P / V4L2_PIX_FMT_SGBRG14P / V4L2_PIX_FMT_SGRBG14P / V4L2_PIX_FMT_SRGGB14P).
  • CSID/ISPIF - add support for RAW MIPI10 to Plain16 format conversion (PRDI mode).
    Supported input format:
    • MIPI RAW10 (10bit packed Bayer RAW - V4L2_PIX_FMT_SBGGR10P).
      Supported output format:
    • Plain16 (10bit Bayer RAW in 16bit words - V4L2_PIX_FMT_SBGGR10).

All changes are expected to be available in the upcomgin 4.14 release branch, and at some point in the mainline Linux kernel.


#4

Thank you, Nicolas.
These are very good news!


#5

Since the latest snapshots of Linaro Debian are already based on Kernel 4.14, I’d like to confirm if MIPI-CSI2 cameras are already supported in DragonBoard 820c.


#6

the CSI2 driver for APQ8096 are not yet merged in the 4.14 branch, they are available in a branch, we are doing some final testing of this branch these days, and they will be merged shortly.


Is camera working on db820c with release/qcomlt-4.14 branch?
#7

Hi ndec,
i tested ov5645 with branch-release/db820c/qcomlt-4.11-camera then camera preview worked fine.

now i’m testing same with release/qcomlt-4.14 branch then camera is launching after some delay(~45sec) and getting below crash
Unknown pixelformat 0x45454270
[] v4l_enum_fmt+0x1428/0x1720
[] __video_do_ioctl+0x23c/0x2a8
[] video_usercopy+0x268/0x470
[] video_ioctl2+0x14/0x20
[] v4l2_ioctl+0xe8/0x118
[] do_vfs_ioctl+0xa4/0x748
[] SyS_ioctl+0x8c/0xa0

and once camera is launched only green video artifact is visible in the preview(uploaded the screnshot) and continuously getting below logs
arm_smmu_context_fault: 101959 callbacks suppressed
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13b2a0e0, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13b43940, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13b71e60, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13baa9e0, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13be90e0, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13c17ce0, fsynr=0x31, cb=0
arm-smmu da0000.arm,smmu: Unhandled context fault: fsr=0x402, iova=0x13c4ada0, fsynr=0x31, cb=0

how to resolve this issue?

Regards,
Laxman


#8

Hi,

Can you tell me how to connect Db820c and ov5645?


#9

I noticed that DB820c (APQ8096 Camera Subsystem) has two VFE (VFE0 and VFE1). So, hardware scaling and cropping will be possible for two cameras simultaneously.


#10

Hi Nico

Is there any plan to get PIX support for RAW formats (SXXXX10P) ? I just got imx214 upstream https://git.linuxtv.org/sailus/media_tree.git/log/?h=for-4.20-11 and I would love to get video encoding running.

If not, are you aware if it is possible in the Android stack?

Thanks!


#11

AFAIK there is no current plan, but you what’s preventing you to retrieve frame from raw interface (and then encode them)?


#12

The encoder does not support RAW formats and I want to avoid doing the color conversion in CPU or OpenGL. Obviously if there was some kind of doc I would upstream the code and If at least it is supported in Android I would not mind trying to reverse engineer the Camera2 driver.


#13

I admit it’s a good reason.

That would be great :wink:

You can have a look at the codeaurora driver:
https://source.codeaurora.org/quic/la/kernel/msm-4.9/tree/drivers/media/platform/msm/camera_v2?h=CogSystems-msm-49/msm-4.9

I think you mainly need to look at ‘isp’ dir in which camera interface is configured/selected and registers configured accordingly.


#14

Thanks for the tip. A fast grep of “git grep 10P drivers/media/platform/msm/” does not give any result, but I will look deeper.

Cheers!


#15

I think that bayer-10bit is known as CAMIF_QCOM_RAW mode in this downstream driver.