Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: s5p-mfc: Corrected NV12M/NV21M plane-sizes

There is a possibility of getting page fault if the overall
buffer size is not aligned to 256bytes. Since MFC does read
operation only and it won't corrupt the data values even if
it reads the extra bytes.
Corrected luma and chroma plane sizes for V4L2_PIX_FMT_NV12M
and V4L2_PIX_FMT_NV21M pixel format.

Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Aakarsh Jain and committed by
Hans Verkuil
7d0d0b23 972df327

+3 -2
+3 -2
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c
··· 549 549 case V4L2_PIX_FMT_NV21M: 550 550 ctx->stride[0] = ALIGN(ctx->img_width, S5P_FIMV_NV12M_HALIGN_V6); 551 551 ctx->stride[1] = ALIGN(ctx->img_width, S5P_FIMV_NV12M_HALIGN_V6); 552 - ctx->luma_size = ctx->stride[0] * ALIGN(ctx->img_height, 16); 553 - ctx->chroma_size = ctx->stride[0] * ALIGN(ctx->img_height / 2, 16); 552 + ctx->luma_size = ALIGN(ctx->stride[0] * ALIGN(ctx->img_height, 16), 256); 553 + ctx->chroma_size = ALIGN(ctx->stride[0] * ALIGN(ctx->img_height / 2, 16), 554 + 256); 554 555 break; 555 556 case V4L2_PIX_FMT_YUV420M: 556 557 case V4L2_PIX_FMT_YVU420M: