[media] mtk-vcodec: check the vp9 decoder buffer index from VPU
authorWu-Cheng Li <wuchengli@google.com>
Wed, 8 Mar 2017 03:40:58 +0000 (00:40 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 22 Mar 2017 14:26:47 +0000 (11:26 -0300)
commite8a2a41ee290c35e118f7a372454401e5a0f8b51
treec49f9f634af70097e141a77bbf0ca4b53d09848d
parent586fd401065a789405a7baca699aadcee4c71336
[media] mtk-vcodec: check the vp9 decoder buffer index from VPU

VPU firmware has a bug and may return invalid buffer index for
some vp9 videos. Check the buffer indexes before accessing the
buffer.

Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
Acked-by: Tiffany Lin <Tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
drivers/media/platform/mtk-vcodec/vdec_drv_if.h