CHROMIUM: s5p-mfc: fix DISPLAY_DELAY
authorJohn Sheu <sheu@chromium.org>
Wed, 13 Feb 2013 22:03:59 +0000 (14:03 -0800)
committerChromeBot <chrome-bot@google.com>
Wed, 20 Mar 2013 09:05:08 +0000 (02:05 -0700)
V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE is being
ignored, and the display delay is always being applied.  Fix this.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chromium:175638
BUG=chromium-os:38121
BUG=chromium-os:38376
BUG=chromium-os:38693
TEST=local build, run on snow

Change-Id: I0b098d021d656197d058e573cf66a3b1f624a275
Reviewed-on: https://gerrit.chromium.org/gerrit/43677
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45655
Reviewed-by: John Sheu <sheu@chromium.org>
drivers/media/video/s5p-mfc/s5p_mfc_opr_v6.c

index beb6dba..e4c3188 100644 (file)
@@ -1164,14 +1164,12 @@ int s5p_mfc_init_decode_v6(struct s5p_mfc_ctx *ctx)
        /* FMO_ASO_CTRL - 0: Enable, 1: Disable */
        reg |= (fmo_aso_ctrl << S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6);
 
-       /* When user sets desplay_delay to 0,
-        * It works as "display_delay enable" and delay set to 0.
-        * If user wants display_delay disable, It should be
-        * set to negative value. */
-       if (ctx->display_delay >= 0) {
+       /* Setup display delay, only if enabled. */
+       if (ctx->display_delay_enable) {
                reg |= (0x1 << S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6);
                WRITEL(ctx->display_delay, S5P_FIMV_D_DISPLAY_DELAY_V6);
        }
+
        /* Setup loop filter, for decoding this is only valid for MPEG4 */
        if (ctx->codec_mode == S5P_MFC_CODEC_MPEG4_DEC) {
                mfc_debug(2, "Set loop filter to: %d\n",