radeon/uvd: use PIPE_USAGE_STAGING for msg&fb buffers
authorChristian König <christian.koenig@amd.com>
Thu, 11 Sep 2014 07:50:00 +0000 (09:50 +0200)
committerChristian König <christian.koenig@amd.com>
Thu, 11 Sep 2014 13:06:09 +0000 (15:06 +0200)
That better matches the actual userspace use case, the
kernel will force it to VRAM if the hardware requires it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeon/radeon_uvd.c

index 69f5cdc6a574344751e2a699ef6b4dffb893f846..9668d7d833749035f49ca700c23da259651db7f3 100644 (file)
@@ -819,7 +819,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
                unsigned msg_fb_size = FB_BUFFER_OFFSET + FB_BUFFER_SIZE;
                STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);
                if (!rvid_create_buffer(dec->screen, &dec->msg_fb_buffers[i],
-                                       msg_fb_size, PIPE_USAGE_DEFAULT)) {
+                                       msg_fb_size, PIPE_USAGE_STAGING)) {
                        RVID_ERR("Can't allocated message buffers.\n");
                        goto error;
                }