[COMMON] media: smfc: fix incorrect image format check for HWFC
authorCho KyongHo <pullip.cho@samsung.com>
Wed, 15 Jul 2015 05:04:55 +0000 (14:04 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:31:07 +0000 (14:31 +0900)
HWFC requires the source image is YUV422 1 plane or YUV420 2 plane.

Change-Id: I5dfeb95cd66a2e9ce5d7cb353a2b249fc469a825
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/media/platform/exynos/smfc/smfc.c

index 48faf1cb5ab2c5a9a4c1df0d9b0330728af3401e..84ac579019089de09fcf25c587e14ac98e76f9b0 100644 (file)
@@ -1136,10 +1136,10 @@ static bool smfc_check_hwfc_configuration(struct smfc_ctx *ctx, bool hwfc_en)
 
        if (fmt->chroma_hfactor == 2) {
                /* YUV422 1-plane */
-               if ((fmt->chroma_vfactor == 1) && (fmt->num_planes != 1))
+               if ((fmt->chroma_vfactor == 1) && (fmt->num_planes == 1))
                        return true;
                /* YUV420 2-plane */
-               if ((fmt->chroma_vfactor == 2) && (fmt->num_planes != 2))
+               if ((fmt->chroma_vfactor == 2) && (fmt->num_planes == 2))
                        return true;
        }