Skip to content

Commit 3a99c44

Browse files
ndufresnemchehab
authored andcommitted
media: rkvdec: Disable H.264 error detection
Quite often, the HW get stuck in error condition if a stream error was detected. As documented, the HW should stop immediately and self reset. There is likely a problem or a miss-understanding of the self reset mechanism, as unless we make a long pause, the next command will then report an error even if there is no error in it. Disabling error detection fixes the issue, and let the decoder continue after an error. This patch is safe for backport into older kernels. Fixes: cd33c83 ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Nicolas Dufresne <[email protected]> Reviewed-by: Brian Norris <[email protected]> Tested-by: Brian Norris <[email protected]> Reviewed-by: Ezequiel Garcia <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent a2d2e59 commit 3a99c44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/media/rkvdec/rkvdec-h264.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,8 +1162,8 @@ static int rkvdec_h264_run(struct rkvdec_ctx *ctx)
11621162

11631163
schedule_delayed_work(&rkvdec->watchdog_work, msecs_to_jiffies(2000));
11641164

1165-
writel(0xffffffff, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
1166-
writel(0xffffffff, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
1165+
writel(0, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
1166+
writel(0, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
11671167
writel(1, rkvdec->regs + RKVDEC_REG_PREF_LUMA_CACHE_COMMAND);
11681168
writel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);
11691169

0 commit comments

Comments
 (0)