media: rkvdec: h264: Fix bit depth wrap in pps packet
authorJonas Karlman <jonas@kwiboo.se>
Fri, 13 May 2022 20:29:12 +0000 (22:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:59 +0000 (10:22 +0200)
commit692c8de5bdbc599bd911471412a8666c2aabc409
tree3bfe0c597766c6212dd3ebc8d7cdce2329832ac9
parent9031ef3866210ca4a6e0f47cb8c522159766d321
media: rkvdec: h264: Fix bit depth wrap in pps packet

[ Upstream commit a074aa4760d1dad0bd565c0f66e7250f5f219ab0 ]

The luma and chroma bit depth fields in the pps packet are 3 bits wide.
8 is wrongly added to the bit depth values written to these 3 bit fields.
Because only the 3 LSB are written, the hardware was configured
correctly.

Correct this by not adding 8 to the luma and chroma bit depth value.

Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c