]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: rkvdec: Disable H.264 error detection
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 10 Jun 2022 12:52:11 +0000 (13:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:40:48 +0000 (10:40 +0200)
commit 3a99c4474112f49a5459933d8758614002ca0ddc upstream.

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: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/rkvdec/rkvdec-h264.c

index 2992fb87cf723e73f33322fc81988549d8e6db56..55596ce6bb6e42b25e95abf15a709a710da075d6 100644 (file)
@@ -1175,8 +1175,8 @@ static int rkvdec_h264_run(struct rkvdec_ctx *ctx)
 
        schedule_delayed_work(&rkvdec->watchdog_work, msecs_to_jiffies(2000));
 
-       writel(0xffffffff, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
-       writel(0xffffffff, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
+       writel(0, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
+       writel(0, rkvdec->regs + RKVDEC_REG_H264_ERR_E);
        writel(1, rkvdec->regs + RKVDEC_REG_PREF_LUMA_CACHE_COMMAND);
        writel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);