diff options
author | Fritz Koenig <frkoenig@chromium.org> | 2023-02-10 22:26:46 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-04-12 10:35:44 +0300 |
commit | a47a3ae5fcc06369bbaa32067d7edf10cb65bdc1 (patch) | |
tree | 7234349cbc46165dd8c1b4ea4b33bfb3bd635396 /drivers/media/platform/qcom/venus/vdec.c | |
parent | 7493db46e4c4aa5126dd32f8eae12a4cdcf7a401 (diff) | |
download | linux-a47a3ae5fcc06369bbaa32067d7edf10cb65bdc1.tar.xz |
media: venus: Correct P010 buffer alignment
According to msm_media_info.h the correct alignment
for the stride of P010 buffers is 128.
Signed-off-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/qcom/venus/vdec.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/vdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 1b62c644c99b..51a53bf82bd3 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -204,8 +204,13 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) pixmp->height); if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { + unsigned int stride = pixmp->width; + + if (pixmp->pixelformat == V4L2_PIX_FMT_P010) + stride *= 2; + pfmt[0].sizeimage = szimage; - pfmt[0].bytesperline = ALIGN(pixmp->width, 128); + pfmt[0].bytesperline = ALIGN(stride, 128); } else { pfmt[0].sizeimage = clamp_t(u32, pfmt[0].sizeimage, 0, SZ_8M); pfmt[0].sizeimage = max(pfmt[0].sizeimage, szimage); |