Allwinner: linux: fix hevc patch

This commit is contained in:
Jernej Skrabec 2022-06-12 08:29:51 +02:00
parent 363112bf67
commit 0bc38307e3

View File

@ -144,7 +144,7 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
/* Decoded picture size. */ /* Decoded picture size. */
reg = VE_DEC_H265_DEC_PIC_SIZE_WIDTH(ctx->src_fmt.width) | reg = VE_DEC_H265_DEC_PIC_SIZE_WIDTH(ctx->src_fmt.width) |
@@ -674,6 +741,17 @@ static int cedrus_h265_start(struct cedr @@ -674,6 +741,18 @@ static int cedrus_h265_start(struct cedr
if (!ctx->codec.h265.neighbor_info_buf) if (!ctx->codec.h265.neighbor_info_buf)
return -ENOMEM; return -ENOMEM;
@ -153,16 +153,17 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
+ &ctx->codec.h265.entry_points_buf_addr, + &ctx->codec.h265.entry_points_buf_addr,
+ GFP_KERNEL); + GFP_KERNEL);
+ if (!ctx->codec.h265.entry_points_buf) { + if (!ctx->codec.h265.entry_points_buf) {
+ dma_free_coherent(dev->dev, CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE, + dma_free_attrs(dev->dev, CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE,
+ ctx->codec.h265.neighbor_info_buf, + ctx->codec.h265.neighbor_info_buf,
+ ctx->codec.h265.neighbor_info_buf_addr); + ctx->codec.h265.neighbor_info_buf_addr,
+ DMA_ATTR_NO_KERNEL_MAPPING);
+ return -ENOMEM; + return -ENOMEM;
+ } + }
+ +
return 0; return 0;
} }
@@ -693,6 +771,9 @@ static void cedrus_h265_stop(struct cedr @@ -693,6 +772,9 @@ static void cedrus_h265_stop(struct cedr
ctx->codec.h265.neighbor_info_buf, ctx->codec.h265.neighbor_info_buf,
ctx->codec.h265.neighbor_info_buf_addr, ctx->codec.h265.neighbor_info_buf_addr,
DMA_ATTR_NO_KERNEL_MAPPING); DMA_ATTR_NO_KERNEL_MAPPING);