]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: Hantro: Correct G2 init qp field
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Tue, 24 May 2022 11:59:45 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:40:50 +0000 (14:40 +0200)
[ Upstream commit 300065f966d30baa59a13849753305aac8c320c3 ]

Documentation said that g2 init_qp field use bits 24 to 30 of
the 8th register.
Change the field mask to be able to set 7 bits and not only 6 of them.

Conformance test INITQP_B_Main10_Sony_1 decoding is OK with this
patch.

Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@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/hantro/hantro_g2_regs.h

index b7c6f9877b9d5412e1f483af080a72d0a83d6533..0f43516d080515418326f97e92ceefae3b2b7564 100644 (file)
 
 #define g2_start_code_e                G2_DEC_REG(10, 31, 0x1)
 #define g2_init_qp_old         G2_DEC_REG(10, 25, 0x3f)
-#define g2_init_qp             G2_DEC_REG(10, 24, 0x3f)
+#define g2_init_qp             G2_DEC_REG(10, 24, 0x7f)
 #define g2_num_tile_cols_old   G2_DEC_REG(10, 20, 0x1f)
 #define g2_num_tile_cols       G2_DEC_REG(10, 19, 0x1f)
 #define g2_num_tile_rows_old   G2_DEC_REG(10, 15, 0x1f)