I have modified following code and resolved incompitable issue of V4L2_MBUS_FMT_UYVY8_1X16。However, when I config V4L2_MBUS_FMT_YUYV10_2X10, the kernal is corrupt.
The code is as follows:
1、I have commented:
if (mf->code != V4L2_MBUS_FMT_SRGGB8_1X8 &&
mf->code != V4L2_MBUS_FMT_SRGGB10_1X10) {
mf->code = V4L2_MBUS_FMT_SRGGB10_1X10;
err = -EINVAL;
}
2、I have added on:
static const struct camera_common_colorfmt camera_common_color_fmts[] = {
{
V4L2_MBUS_FMT_SRGGB12_1X12,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB12,
},
{
V4L2_MBUS_FMT_SRGGB10_1X10,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB10,
},
{
V4L2_MBUS_FMT_SRGGB8_1X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB8,
},
{ V4L2_MBUS_FMT_UYVY8_1X16,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_UYVY,
},
{ V4L2_MBUS_FMT_UYVY8_2X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_UYVY,
},
{ V4L2_MBUS_FMT_YUYV10_2X10,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_UYVY,
},
};
3、Here are the error:
[ 6.866477] —> camera_common_g_fmt, 529, mf = ffffffc0ffe9ba60, fmt = ffffffc000be72bc
[ 6.877072] <— camera_common_g_fmt, 536, mf = ffffffc0ffe9ba60
[ 6.884389] Unable to handle kernel NULL pointer dereference at virtual address 00000018
[ 6.895220] pgd = ffffffc00007d000
[ 6.899985] [00000018] *pgd=000000017fc05003, *pmd=000000017fc06003, *pte=00e0000050041407
[ 6.911261] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 6.918420] Enter nvdumper_crash_setup_regs
[ 6.924223] nvdumper: all registers are saved.
[ 6.924226] nvdumper: all registers are saved.
[ 6.924227] nvdumper: all registers are saved.
[ 6.942333] nvdumper: all registers are saved.
[ 6.948229] Modules linked in:
[ 6.952726] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.96 #67
[ 6.960294] task: ffffffc0ffe94b80 ti: ffffffc0ffe98000 task.ti: ffffffc0ffe98000
[ 6.970748] PC is at tegra_channel_fmts_bitmap_init+0xf0/0x18c
[ 6.978081] LR is at tegra_chann
[ 6.985340] pc : [] lr : [] pstate: 60000105
[ 6.995584] sp : ffffffc0ffe9b9f0
[ 7.000304] x29: ffffffc0ffe9b9f0 x28: 0000000000000000
[ 7.007065] x27: ffffffc0fcb62660 x26: ffffffc01ff34070
[ 7.013783] x25: ffffffc00105a180 x24: ffffffc00105a040
[ 7.020442] x23: ffffffc0f7c928a8 x22: 0000000000000001
[ 7.027066] x21: ffffffc0f7c92018 x20: 0000000000003012
[ 7.033629] x19: ffffffc0fcb62660 x18: 0000000000000007
[ 7.040136] x17: 000000000000000e x16: 0720072007200720
[ 7.046644] x15: 0720072007200720 x14: 0000000000000001
[ 7.053113] x13: 0000000000000020 x12: ffffffc0fc9c4ea0
[ 7.059533] x11: 0000000000000001 x10: 00000000ffffffff
[ 7.065917] x9 : 0000000000000001 x8 : ffffff800096c620
[ 7.072279] x7 : ffffffc000b94428 x6 : 0000000000000000
[ 7.078637] x5 : 0000000000aaaaaa x4 : 0000000000000000
[ 7.085017] x3 : 0000000000002009 x2 : 0000000000000018
[ 7.091414] x1 : ffffffc000be7c30 x0 : 0000000000000000
[ 7.097833]
[ 7.097833] PC: 0xffffffc00070d500:
[ 7.104869] d500 97fffc08 37f800e0 2a1603e2 2a0003e1 aa1703e0 97f0a188 35000054 b9404bb4
[ 7.115244] d520 b94047a0 11000400 b90047a0 17ffffe9 528601e0 97fffbfb 37f800a0 52800022
[ 7.125711] d540 2a0003e1 912242a0 97f0a17b b40005f3 f9405660 f9400c00 b4000580 f9406c02
[ 7.136265] d560 b4000542 9101c3a1 aa1303e0 d63f0040 350004c0 b9407ba0 97fffbfe f9029aa0
[ 7.146956] d580 b9401801 b90502a1 b94083a1 b90512a1 b9407fa1 b90506a1 b94073a1 b904faa1
[ 7.157848] d5a0 b94077a2 b904fea2 794117a2 b9052aa2 b9400c00 1b017c00 b9050aa0 911422a3
[ 7.168956] d5c0 9113f2a2 9113e2a1 aa1503e0 97ffff66 b9450aa0 b944fea1 1b017c00 b9050ea0
[ 7.180287] d5e0 b9485ea0 7100041f 54000109 aa1503e0 97fffc63 14000005 35000094 17ffffcd
Could anyone kindly advise if I should modify anywhere else to make TX1 support V4L2_MBUS_FMT_YUYV10_2X10? Or TX1 will not capble of supporting this YUYV 10 bit format?