|
@@ -74,7 +74,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
ctx->luma_size, ctx->chroma_size, ctx->mv_size);
|
|
|
mfc_debug(2, "Totals bufs: %d\n", ctx->total_dpb_count);
|
|
|
} else if (ctx->type == MFCINST_ENCODER) {
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->tmv_buffer_size = S5P_FIMV_NUM_TMV_BUFFERS_V6 *
|
|
|
ALIGN(S5P_FIMV_TMV_BUFFER_SIZE_V8(mb_width, mb_height),
|
|
|
S5P_FIMV_TMV_BUFFER_ALIGN_V6);
|
|
@@ -89,7 +89,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
ctx->chroma_dpb_size = ALIGN((mb_width * mb_height) *
|
|
|
S5P_FIMV_CHROMA_MB_TO_PIXEL_V6,
|
|
|
S5P_FIMV_CHROMA_DPB_BUFFER_ALIGN_V6);
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->me_buffer_size = ALIGN(S5P_FIMV_ME_BUFFER_SIZE_V8(
|
|
|
ctx->img_width, ctx->img_height,
|
|
|
mb_width, mb_height),
|
|
@@ -110,7 +110,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
switch (ctx->codec_mode) {
|
|
|
case S5P_MFC_CODEC_H264_DEC:
|
|
|
case S5P_MFC_CODEC_H264_MVC_DEC:
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->scratch_buf_size =
|
|
|
S5P_FIMV_SCRATCH_BUF_SIZE_H264_DEC_V8(
|
|
|
mb_width,
|
|
@@ -167,7 +167,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
ctx->bank1.size = ctx->scratch_buf_size;
|
|
|
break;
|
|
|
case S5P_MFC_CODEC_VP8_DEC:
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->scratch_buf_size =
|
|
|
S5P_FIMV_SCRATCH_BUF_SIZE_VP8_DEC_V8(
|
|
|
mb_width,
|
|
@@ -182,7 +182,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
ctx->bank1.size = ctx->scratch_buf_size;
|
|
|
break;
|
|
|
case S5P_MFC_CODEC_H264_ENC:
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->scratch_buf_size =
|
|
|
S5P_FIMV_SCRATCH_BUF_SIZE_H264_ENC_V8(
|
|
|
mb_width,
|
|
@@ -215,7 +215,7 @@ static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
|
|
|
ctx->bank2.size = 0;
|
|
|
break;
|
|
|
case S5P_MFC_CODEC_VP8_ENC:
|
|
|
- if (IS_MFCV8(dev))
|
|
|
+ if (IS_MFCV8_PLUS(dev))
|
|
|
ctx->scratch_buf_size =
|
|
|
S5P_FIMV_SCRATCH_BUF_SIZE_VP8_ENC_V8(
|
|
|
mb_width,
|
|
@@ -364,7 +364,7 @@ static void s5p_mfc_dec_calc_dpb_size_v6(struct s5p_mfc_ctx *ctx)
|
|
|
|
|
|
ctx->luma_size = calc_plane(ctx->img_width, ctx->img_height);
|
|
|
ctx->chroma_size = calc_plane(ctx->img_width, (ctx->img_height >> 1));
|
|
|
- if (IS_MFCV8(ctx->dev)) {
|
|
|
+ if (IS_MFCV8_PLUS(ctx->dev)) {
|
|
|
/* MFCv8 needs additional 64 bytes for luma,chroma dpb*/
|
|
|
ctx->luma_size += S5P_FIMV_D_ALIGN_PLANE_SIZE_V8;
|
|
|
ctx->chroma_size += S5P_FIMV_D_ALIGN_PLANE_SIZE_V8;
|
|
@@ -445,7 +445,7 @@ static int s5p_mfc_set_dec_frame_buffer_v6(struct s5p_mfc_ctx *ctx)
|
|
|
writel(buf_addr1, mfc_regs->d_scratch_buffer_addr);
|
|
|
writel(ctx->scratch_buf_size, mfc_regs->d_scratch_buffer_size);
|
|
|
|
|
|
- if (IS_MFCV8(dev)) {
|
|
|
+ if (IS_MFCV8_PLUS(dev)) {
|
|
|
writel(ctx->img_width,
|
|
|
mfc_regs->d_first_plane_dpb_stride_size);
|
|
|
writel(ctx->img_width,
|
|
@@ -2109,7 +2109,7 @@ const struct s5p_mfc_regs *s5p_mfc_init_regs_v6_plus(struct s5p_mfc_dev *dev)
|
|
|
S5P_FIMV_E_ENCODED_SOURCE_SECOND_ADDR_V7);
|
|
|
R(e_vp8_options, S5P_FIMV_E_VP8_OPTIONS_V7);
|
|
|
|
|
|
- if (!IS_MFCV8(dev))
|
|
|
+ if (!IS_MFCV8_PLUS(dev))
|
|
|
goto done;
|
|
|
|
|
|
/* Initialize registers used in MFC v8 only.
|