.. | .. |
---|
84 | 84 | |
---|
85 | 85 | static void lif_configure_stream(struct vsp1_entity *entity, |
---|
86 | 86 | struct vsp1_pipeline *pipe, |
---|
| 87 | + struct vsp1_dl_list *dl, |
---|
87 | 88 | struct vsp1_dl_body *dlb) |
---|
88 | 89 | { |
---|
89 | 90 | const struct v4l2_mbus_framefmt *format; |
---|
90 | 91 | struct vsp1_lif *lif = to_lif(&entity->subdev); |
---|
91 | | - unsigned int hbth = 1300; |
---|
92 | | - unsigned int obth = 400; |
---|
93 | | - unsigned int lbth = 200; |
---|
| 92 | + unsigned int hbth; |
---|
| 93 | + unsigned int obth; |
---|
| 94 | + unsigned int lbth; |
---|
94 | 95 | |
---|
95 | 96 | format = vsp1_entity_get_pad_format(&lif->entity, lif->entity.config, |
---|
96 | 97 | LIF_PAD_SOURCE); |
---|
97 | 98 | |
---|
98 | | - obth = min(obth, (format->width + 1) / 2 * format->height - 4); |
---|
| 99 | + switch (entity->vsp1->version & VI6_IP_VERSION_MODEL_MASK) { |
---|
| 100 | + case VI6_IP_VERSION_MODEL_VSPD_GEN2: |
---|
| 101 | + case VI6_IP_VERSION_MODEL_VSPD_V2H: |
---|
| 102 | + hbth = 1536; |
---|
| 103 | + obth = min(128U, (format->width + 1) / 2 * format->height - 4); |
---|
| 104 | + lbth = 1520; |
---|
| 105 | + break; |
---|
| 106 | + |
---|
| 107 | + case VI6_IP_VERSION_MODEL_VSPDL_GEN3: |
---|
| 108 | + case VI6_IP_VERSION_MODEL_VSPD_V3: |
---|
| 109 | + hbth = 0; |
---|
| 110 | + obth = 1500; |
---|
| 111 | + lbth = 0; |
---|
| 112 | + break; |
---|
| 113 | + |
---|
| 114 | + case VI6_IP_VERSION_MODEL_VSPD_GEN3: |
---|
| 115 | + default: |
---|
| 116 | + hbth = 0; |
---|
| 117 | + obth = 3000; |
---|
| 118 | + lbth = 0; |
---|
| 119 | + break; |
---|
| 120 | + } |
---|
99 | 121 | |
---|
100 | 122 | vsp1_lif_write(lif, dlb, VI6_LIF_CSBTH, |
---|
101 | 123 | (hbth << VI6_LIF_CSBTH_HBTH_SHIFT) | |
---|