IMX274 driver does not match with Dev docs and datasheet

In the sensor software driver guide:

The property values are computed as follows:
•active_w: Total width of the pixel-active region. In this case, it is 3840 + 4 (LI) + 12 (left margin) + 0 (right margin) = 3856.
•active_h: Total height of the pixel-active region. In this case, it is 2160 + 8 (OB) + 6 (Ignored Area Effective Pixel + 50 (VBP)) * 2 = 4448.

In the imx274.dtsi:

                                                mode2 { // IMX274_MODE_3840X2160_DOL_30FPS
                                                        mclk_khz = "24000";
                                                        num_lanes = "4";
                                                        tegra_sinterface = "serial_a";
                                                        phy_mode = "DPHY";
                                                        discontinuous_clk = "yes";
                                                        dpcm_enable = "false";
                                                        cil_settletime = "0";
                                                        dynamic_pixel_bit_depth = "10";
                                                        csi_pixel_bit_depth = "10";
                                                        mode_type = "bayer_wdr_dol";
                                                        pixel_phase = "rggb";

                                                        active_w = "3856";
                                                        active_h = "4448";

In the IMX274 datasheet:

There are two questions:
For active_w, right margin is 12 instead of 0.
For active_h, should add top and bottom margin, aka 4*2.

Anyone explain the conflict between jetson document and sony datasheet?
Thanks for your help!

hello felixch,

it’s device tree settings for VI engine to crop the long/short exposure frames.
here’s developer guide to cover this example, Example Digital Overlap WDR Exposure Frame (3840×2160).
please note that there’re DOL-WDR specific settings,
for example…

  • num_of_lines_offset_0, to define how many rows between these two exposure frames.
    • it represents vertical blanking period and its correct value makes sure that Frame Interval > Long Exposure for LEF.
    • it’s the same number of VBP rows appear at the end of a long exposure frame and at the start of a short exposure frame. if you configure num_of_lines_offset_0=50, there’ll be 50-rows at the end of a long exposure frame and 50-rows at the start of a short exposure frame.
  • the other settings, such as num_of_ignored_lines, num_of_ignored_pixels, num_of_left/right_margin_pixels
    • you may consider they’re the start-point for VI cropping these exposure frames.
    • num_of_ignored_lines = (Optical Black + Ignored Area Effective Pixel rows)

The link you provided is exactly what I refer to.

According to the link, The imx274 active_w should be 3878(3840+4(Li)+12(left margin)+12(right margin)), But in the dts, it’s 3856.

And the active_h should be 4464((2160+8(OB)+6(ignore area)+8(top/bottom margin)+VBP)*2, But in the dts, it’s 4448.

Thanks for your reply!

hello felixch,

right margin did not considered here because num_of_right_margin_pixels is set as 0 in DT.

actually, you should consider VBP here, i.e. num_of_lines_offset_0
active_h = (Total height of the pixel-active region + Ignored Area Effective Pixel Rows + Optical Black + VBP) * 2
hence… active_h = (2160 + 6 + 8 + 50) *2 = 4448

In IMX274 datasheet , the right margin is not 0, it’s 12.

Yes, It should include VBP, I missing it. And it should include the top/bottom margin too, according the image in datasheet.

hello felixch,

please do review developer guide for those DOL-WDR specific settings.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.