radeon/vcn: fix jpeg decode for navi10
authorThong Thai <thong.thai@amd.com>
Sun, 9 Aug 2020 15:13:57 +0000 (11:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Aug 2020 16:39:48 +0000 (16:39 +0000)
Fixes an issue where the JPEG decode would timeout when decoding certain JPEG files.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6249>

src/gallium/drivers/radeon/radeon_vcn_dec_jpeg.c

index e153436f1d7a45cf0eb80b7445ab2631de1a96b1..edf03d776822ef6be053fdf87bddf9a372c982b8 100644 (file)
@@ -260,7 +260,7 @@ static void send_cmd_target_direct(struct radeon_decoder *dec, struct pb_buffer
    set_reg_jpeg(dec, vcnipUVD_JPEG_INT_EN, COND0, TYPE0, 0xFFFFFFFE);
 
    // start engine command
-   set_reg_jpeg(dec, vcnipUVD_JPEG_CNTL, COND0, TYPE0, 0xE);
+   set_reg_jpeg(dec, vcnipUVD_JPEG_CNTL, COND0, TYPE0, 0x6);
 
    // wait for job completion, wait for job JBSI fetch done
    set_reg_jpeg(dec, vcnipUVD_JRBC_IB_REF_DATA, COND0, TYPE0, (dec->jpg.bsd_size >> 2));