media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly
authorJonas Karlman <jonas@kwiboo.se>
Wed, 6 Nov 2019 22:35:11 +0000 (23:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:58 +0000 (19:48 +0100)
commitce1b79a598df3b34625f4c4b6118970fae19cbb0
treeede1878cdc05d6d906a6e53c0a5254874a8480ea
parent00b31281af6b3012048d254218e39dfae965af63
media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly

commit a2cbf80a842add9663522bf898cf13cb2ac4e423 upstream.

The FIELDPIC_FLAG_E bit should be set when field_pic_flag exists in stream,
it is currently set based on field_pic_flag of current frame.
The PIC_FIELDMODE_E bit is correctly set based on the field_pic_flag.

Fix this by setting the FIELDPIC_FLAG_E bit when frame_mbs_only is not set.

Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
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/hantro/hantro_g1_h264_dec.c