From 2a200d47c91252dd6aa696f820ff73027d8e0d03 Mon Sep 17 00:00:00 2001 From: Sunyoung Kang Date: Mon, 16 Jul 2018 16:39:02 +0900 Subject: [PATCH] [COMMON] media: mfc: fix the vb2 flag setting This removes legacy vb2 flag definition and fixes the wrong check. Change-Id: I1aa9433b7bbe910118ef060ae3fced7e860df36e Signed-off-by: Sunyoung Kang --- drivers/media/platform/exynos/mfc/mfc_common.h | 4 ---- drivers/media/platform/exynos/mfc/mfc_run.c | 2 +- drivers/media/platform/exynos/mfc/mfc_utils.h | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/mfc_common.h b/drivers/media/platform/exynos/mfc/mfc_common.h index cc0287ad64d1..20bec22dfb65 100644 --- a/drivers/media/platform/exynos/mfc/mfc_common.h +++ b/drivers/media/platform/exynos/mfc/mfc_common.h @@ -69,10 +69,6 @@ #define MFC_BASE_MASK ((1 << 17) - 1) -#define FLAG_LAST_FRAME 0x80000000 -#define FLAG_EMPTY_DATA 0x40000000 -#define FLAG_CSD 0x20000000 - /* MFC conceal color is black */ #define MFC_CONCEAL_COLOR 0x8020000 diff --git a/drivers/media/platform/exynos/mfc/mfc_run.c b/drivers/media/platform/exynos/mfc/mfc_run.c index df6d262c2c05..46f59ae4ece3 100644 --- a/drivers/media/platform/exynos/mfc/mfc_run.c +++ b/drivers/media/platform/exynos/mfc/mfc_run.c @@ -351,7 +351,7 @@ int mfc_run_dec_init(struct mfc_ctx *ctx) static int __mfc_check_last_frame(struct mfc_ctx *ctx, struct mfc_buf *mfc_buf) { - if (mfc_check_vb_flag(mfc_buf, FLAG_LAST_FRAME)) { + if (mfc_check_vb_flag(mfc_buf, MFC_FLAG_LAST_FRAME)) { mfc_debug(2, "Setting ctx->state to FINISHING\n"); mfc_change_state(ctx, MFCINST_FINISHING); return 1; diff --git a/drivers/media/platform/exynos/mfc/mfc_utils.h b/drivers/media/platform/exynos/mfc/mfc_utils.h index 9033b1dc0fac..c11863674de6 100644 --- a/drivers/media/platform/exynos/mfc/mfc_utils.h +++ b/drivers/media/platform/exynos/mfc/mfc_utils.h @@ -122,7 +122,7 @@ static inline void mfc_set_vb_flag(struct mfc_buf *mfc_buf, enum mfc_vb_flag f) static inline int mfc_check_vb_flag(struct mfc_buf *mfc_buf, enum mfc_vb_flag f) { - if (mfc_buf->vb.reserved2 & f) + if (mfc_buf->vb.reserved2 & (1 << f)) return 1; return 0; -- 2.20.1