summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2016-09-12 12:38:36 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 14:56:03 -0300
commitabe9609f808140f46d092035b75dd58ae80db056 (patch)
tree20e85c9171bb038e71b45979882cfe4fa9479e0c /drivers
parentb61bead62ec4264fbb529a5730558f4c87a46ae4 (diff)
[media] v4l: vsp1: Fix RPF cropping
The RPF cropping offset for the chroma planes is incorrectly computed, it needs to be divided by the horizontal subsampling factor. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/vsp1/vsp1_rpf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
index 388838913205..3d6669dbeacf 100644
--- a/drivers/media/platform/vsp1/vsp1_rpf.c
+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
@@ -105,7 +105,8 @@ static void rpf_configure(struct vsp1_entity *entity,
if (format->num_planes > 1) {
rpf->offsets[1] = crop->top * format->plane_fmt[1].bytesperline
- + crop->left * fmtinfo->bpp[1] / 8;
+ + crop->left / fmtinfo->hsub * fmtinfo->bpp[1]
+ / 8;
pstride |= format->plane_fmt[1].bytesperline
<< VI6_RPF_SRCM_PSTRIDE_C_SHIFT;
} else {