diff options
author | HeynChul Jun <hcjun@nexell.co.kr> | 2020-03-31 12:57:54 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2020-07-09 18:16:15 +0900 |
commit | 2d87c56b0a0285b4a50a1b26fd87db58561a4eed (patch) | |
tree | bea5afaa4a9a4a091c51b9040a10a0ae02ee13d4 | |
parent | b4ab75e76a8cb82ba960c9e918e56e523f5b8bfd (diff) | |
download | linux-artik7-2d87c56b0a0285b4a50a1b26fd87db58561a4eed.tar.gz linux-artik7-2d87c56b0a0285b4a50a1b26fd87db58561a4eed.tar.bz2 linux-artik7-2d87c56b0a0285b4a50a1b26fd87db58561a4eed.zip |
media:nx-vpu: bug fix height align
1.This patch fixes height aligin 31 to 32.
2.This patch adds width and height information to the error message.
Signed-off-by: HeynChul Jun <hcjun@nexell.co.kr>
Change-Id: I30caddcb1720a8bde6d3520553c3d0083c230f76
Reviewed-on: https://review.gerrithub.io/c/NexellCorp/linux_kernel-4.4.x/+/488394
Reviewed-by: SeongO Park <ray@nexell.co.kr>
Tested-by: SeongO Park <ray@nexell.co.kr>
-rw-r--r-- | drivers/media/platform/nx-vpu/nx_vpu_dec_v4l2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/nx-vpu/nx_vpu_dec_v4l2.c b/drivers/media/platform/nx-vpu/nx_vpu_dec_v4l2.c index 4ef5c1800013..c0c70ae1cbf7 100644 --- a/drivers/media/platform/nx-vpu/nx_vpu_dec_v4l2.c +++ b/drivers/media/platform/nx-vpu/nx_vpu_dec_v4l2.c @@ -1320,11 +1320,10 @@ int alloc_decoder_memory(struct nx_vpu_ctx *ctx) width = ALIGN(ctx->width, 16); height = ALIGN(ctx->height, 16); - mvSize = ALIGN(ctx->width, 32) * ALIGN(ctx->height, 31); + mvSize = ALIGN(ctx->width, 32) * ALIGN(ctx->height, 32); mvSize = (mvSize * 3) / 2; mvSize = (mvSize + 4) / 5; mvSize = ((mvSize + 7) / 8) * 8; - mvSize = ALIGN(mvSize, 4096); if (width == 0 || height == 0 || mvSize == 0) { NX_ErrMsg("Invalid memory parameters!!!\n"); @@ -1336,8 +1335,8 @@ int alloc_decoder_memory(struct nx_vpu_ctx *ctx) dec_ctx->col_mv_buf = nx_alloc_memory(drv, mvSize * dec_ctx->frame_buffer_cnt, 4096); if (0 == dec_ctx->col_mv_buf) { - NX_ErrMsg("col_mv_buf allocation failed.(size=%d,align=%d)\n", - mvSize * dec_ctx->frame_buffer_cnt, 4096); + NX_ErrMsg("col_mv_buf allocation failed.(size=%d,align=%d,buffer_cnt=%d,(%dx%d))\n", + mvSize * dec_ctx->frame_buffer_cnt, 4096,dec_ctx->frame_buffer_cnt,ctx->width,ctx->height); goto Error_Exit; } |