media: verisilicon: HEVC: Initialize start_bit field
Subsystems (3)
Benjamin Gaignard
maintainerPATCH v3 1/1 media: verisilicon: HEVC: Initialize start_bit field
Always set start_bit field to 0, if not it could lead to corrupted frames specially when decoding VP9 bitstreams at the same time since VP9 driver set it for its own purpose.
Fixes cb5dd5a0fa51 ("media: hantro: Introduce G2/HEVC decoder")
Signed-off-by Benjamin Gaignard <[email protected]>
Tested-by Nicolas Dufresne <[email protected]>
--- drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c +1 -0
@@ -518,6 +518,7 @@ static void set_buffers(struct hantro_ctx *ctx)hantro_reg_write (vpu, &g2_stream_len, src_len);hantro_reg_write (vpu, &g2_strm_buffer_len, src_buf_len);hantro_reg_write (vpu, &g2_strm_start_offset,0 ); +hantro_reg_write (vpu, &g2_start_bit,0 );hantro_reg_write (vpu, &g2_write_mvs_e,1 );hantro_write_addr (vpu,G2_TILE_SIZES_ADDR , ctx->hevc_dec.tile_sizes.dma);
Signature · 1 line
2.43.0
Quoted 23 lines · Benjamin Gaignard
Always set
start_bitfield to 0, if not it could lead to corrupted frames specially when decoding VP9 bitstreams at the same time since VP9 driver set it for its own purpose.Fixes cb5dd5a0fa51 ("media: hantro: Introduce G2/HEVC decoder")Signed-off-by Benjamin Gaignard <[email protected]>Tested-by Nicolas Dufresne <[email protected]>--- drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c +1
-0@@ -518,6 +518,7 @@ static void set_buffers(struct hantro_ctx *ctx)hantro_reg_write (vpu, &g2_stream_len, src_len);hantro_reg_write (vpu, &g2_strm_buffer_len, src_buf_len);hantro_reg_write (vpu, &g2_strm_start_offset,0 ); +hantro_reg_write (vpu, &g2_start_bit,0 );hantro_reg_write (vpu, &g2_write_mvs_e,1 );hantro_write_addr (vpu,G2_TILE_SIZES_ADDR , ctx->hevc_dec.tile_sizes.dma);
Quoted 7 lines · Benjamin Gaignard
Always set
start_bitfield to 0, if not it could lead to corrupted frames specially when decoding VP9 bitstreams at the same time since VP9 driver set it for its own purpose.Fixes cb5dd5a0fa51 ("media: hantro: Introduce G2/HEVC decoder")Signed-off-by Benjamin Gaignard <[email protected]>Tested-by Nicolas Dufresne <[email protected]>
In the mail that contained the Tested-by tag there was also a Reviewed-by tag (from Nicolas) further down below.
(sorry about the other mail; sth went wrong)
Quoted 16 lines
--- drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c +1
-0@@ -518,6 +518,7 @@ static void set_buffers(struct hantro_ctx *ctx)hantro_reg_write (vpu, &g2_stream_len, src_len);hantro_reg_write (vpu, &g2_strm_buffer_len, src_buf_len);hantro_reg_write (vpu, &g2_strm_start_offset,0 ); +hantro_reg_write (vpu, &g2_start_bit,0 );hantro_reg_write (vpu, &g2_write_mvs_e,1 );hantro_write_addr (vpu,G2_TILE_SIZES_ADDR , ctx->hevc_dec.tile_sizes.dma);