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/DRA745: how to setup up camera horizontal and vertical blanking ?

Part Number: DRA745
Other Parts Discussed in Thread: TVP5158

Tool/software: Linux

HI TI,

I use 6ao1.1 sdk,and I can capture the camera image,but the image has invalid data , i think it's blank proble.

capture flow: (1280*720 )camera sensor-->ub913-->ftplinkIII-->ub934-->j6 vin2a(data0-data7)

camera parameter:

1 Frame = 750 Lines
1 Line = 3300 PCLKs
Frame Rate = 74.25 * 1000000 / 3300 / 750 = 30 (fps)

 Capture camera image:

dts:

&i2c4 {
status = "okay";
clock-frequency = <400000>;

ub934@50 {
compatible = "ti,ub934";
reg = <0x50>;
port {
ub934_decoder: endpoint {
remote-endpoint = <&vin2a>;
bus-type = <5>;
bus-width = <8>;      
data-shift = <0>;     

hsync-active = <1>;    
vsync-active = <1>;  
data-active = <1>;     
pclk-sample = <1>;     
channels = <0>;
};
};
};
};

&vin2a {
status = "okay";
endpoint@0 {
remote-endpoint = <&ub934_decoder>;
};
};

934 driver: reference tvp5158 create a subdev

test:setup blank on 934 driver cann't solve the proble,and withotu any change.

struct v4l2_ctrl    *hblank;
struct v4l2_ctrl    *vblank;
struct v4l2_ctrl_handler ctrl_handler;

v4l2_ctrl_handler_init(handler, 1);
hblank = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_HBLANK,50, 50, 1, 50);
vblank = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_VBLANK,100,100,1,100);
__v4l2_ctrl_modify_range(hblank,50,50, 1,50);
__v4l2_ctrl_modify_range(vblank,100,100,1,100);

Can setup blanking solve the proble?and how to setup the blank?
If no,have any suggestion?

  • @@ -2860,16 +2868,23 @@ static int vip_set_crop_parser(struct vip_port *port)
    * scaler and colorspace converter will yield garbage.
    */
    hcrop = VIP_ACT_BYPASS;
    +
    insert_field(&hcrop, 0, VIP_ACT_SKIP_NUMPIX_MASK,
    VIP_ACT_SKIP_NUMPIX_SHFT);
    insert_field(&hcrop, width,
    VIP_ACT_USE_NUMPIX_MASK, VIP_ACT_USE_NUMPIX_SHFT);
    + insert_field(&hcrop, crop_left,
    + VIP_ACT_SKIP_NUMPIX_MASK, VIP_ACT_SKIP_NUMPIX_SHFT);
    +
    reg_write(parser, VIP_PARSER_CROP_H_PORT(port->port_id), hcrop);

    insert_field(&vcrop, 0, VIP_ACT_SKIP_NUMLINES_MASK,
    VIP_ACT_SKIP_NUMLINES_SHFT);
    insert_field(&vcrop, port->mbus_framefmt.height,
    VIP_ACT_USE_NUMLINES_MASK, VIP_ACT_USE_NUMLINES_SHFT);
    + insert_field(&vcrop, crop_top,
    + VIP_ACT_SKIP_NUMPIX_MASK, VIP_ACT_SKIP_NUMPIX_SHFT);
    +