radeon/vcn: move message buffer to vram for now
authorLeo Liu <leo.liu@amd.com>
Tue, 18 Jul 2017 13:48:02 +0000 (09:48 -0400)
committerLeo Liu <leo.liu@amd.com>
Tue, 25 Jul 2017 16:27:09 +0000 (12:27 -0400)
To workaround an unknown bug.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vcn_dec.c

index bd93b849db0f33af7d626b450c790c84dad3bdc9..a60b969a273cf198adfb4c12964ebf8798e36af9 100644 (file)
@@ -1237,8 +1237,9 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
                unsigned msg_fb_it_size = FB_BUFFER_OFFSET + FB_BUFFER_SIZE;
                if (have_it(dec))
                        msg_fb_it_size += IT_SCALING_TABLE_SIZE;
+               /* use vram to improve performance, workaround an unknown bug */
                if (!rvid_create_buffer(dec->screen, &dec->msg_fb_it_buffers[i],
-                                       msg_fb_it_size, PIPE_USAGE_STAGING)) {
+                                       msg_fb_it_size, PIPE_USAGE_DEFAULT)) {
                        RVID_ERR("Can't allocated message buffers.\n");
                        goto error;
                }