Skip to content

Commit f4bc9c7

Browse files
pinchartlHans Verkuil
authored andcommitted
media: rkisp1: Program RKISP1_CIF_MI_SP_Y_PIC_SIZE register
The self path has a Y_PIC_SIZE register that needs to be programmed to the total number of pixels, including the stride. This isn't done by the driver, fix it. While at it, reorder the register write order to sort them by address. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 7bf62fa commit f4bc9c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,11 @@ static void rkisp1_sp_config(struct rkisp1_capture *cap)
479479
rkisp1_write(rkisp1, cap->config->mi.cr_size_init,
480480
rkisp1_pixfmt_comp_size(pixm, RKISP1_PLANE_CR));
481481

482+
rkisp1_write(rkisp1, RKISP1_CIF_MI_SP_Y_LLENGTH, cap->sp_y_stride);
482483
rkisp1_write(rkisp1, RKISP1_CIF_MI_SP_Y_PIC_WIDTH, pixm->width);
483484
rkisp1_write(rkisp1, RKISP1_CIF_MI_SP_Y_PIC_HEIGHT, pixm->height);
484-
rkisp1_write(rkisp1, RKISP1_CIF_MI_SP_Y_LLENGTH, cap->sp_y_stride);
485+
rkisp1_write(rkisp1, RKISP1_CIF_MI_SP_Y_PIC_SIZE,
486+
cap->sp_y_stride * pixm->height);
485487

486488
rkisp1_irq_frame_end_enable(cap);
487489

0 commit comments

Comments
 (0)