| .. | .. |
|---|
| 257 | 257 | |
|---|
| 258 | 258 | static void uds_configure_stream(struct vsp1_entity *entity, |
|---|
| 259 | 259 | struct vsp1_pipeline *pipe, |
|---|
| 260 | + struct vsp1_dl_list *dl, |
|---|
| 260 | 261 | struct vsp1_dl_body *dlb) |
|---|
| 261 | 262 | { |
|---|
| 262 | 263 | struct vsp1_uds *uds = to_uds(&entity->subdev); |
|---|
| .. | .. |
|---|
| 314 | 315 | output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config, |
|---|
| 315 | 316 | UDS_PAD_SOURCE); |
|---|
| 316 | 317 | |
|---|
| 317 | | - /* Input size clipping */ |
|---|
| 318 | + /* Input size clipping. */ |
|---|
| 318 | 319 | vsp1_uds_write(uds, dlb, VI6_UDS_HSZCLIP, VI6_UDS_HSZCLIP_HCEN | |
|---|
| 319 | 320 | (0 << VI6_UDS_HSZCLIP_HCL_OFST_SHIFT) | |
|---|
| 320 | 321 | (partition->uds_sink.width |
|---|
| 321 | 322 | << VI6_UDS_HSZCLIP_HCL_SIZE_SHIFT)); |
|---|
| 322 | 323 | |
|---|
| 323 | | - /* Output size clipping */ |
|---|
| 324 | + /* Output size clipping. */ |
|---|
| 324 | 325 | vsp1_uds_write(uds, dlb, VI6_UDS_CLIP_SIZE, |
|---|
| 325 | 326 | (partition->uds_source.width |
|---|
| 326 | 327 | << VI6_UDS_CLIP_SIZE_HSIZE_SHIFT) | |
|---|
| .. | .. |
|---|
| 342 | 343 | UDS_PAD_SOURCE); |
|---|
| 343 | 344 | hscale = output->width / input->width; |
|---|
| 344 | 345 | |
|---|
| 346 | + /* |
|---|
| 347 | + * The maximum width of the UDS is 304 pixels. These are input pixels |
|---|
| 348 | + * in the event of up-scaling, and output pixels in the event of |
|---|
| 349 | + * downscaling. |
|---|
| 350 | + * |
|---|
| 351 | + * To support overlapping partition windows we clamp at units of 256 and |
|---|
| 352 | + * the remaining pixels are reserved. |
|---|
| 353 | + */ |
|---|
| 345 | 354 | if (hscale <= 2) |
|---|
| 346 | 355 | return 256; |
|---|
| 347 | 356 | else if (hscale <= 4) |
|---|
| .. | .. |
|---|
| 366 | 375 | const struct v4l2_mbus_framefmt *output; |
|---|
| 367 | 376 | const struct v4l2_mbus_framefmt *input; |
|---|
| 368 | 377 | |
|---|
| 369 | | - /* Initialise the partition state */ |
|---|
| 378 | + /* Initialise the partition state. */ |
|---|
| 370 | 379 | partition->uds_sink = *window; |
|---|
| 371 | 380 | partition->uds_source = *window; |
|---|
| 372 | 381 | |
|---|