[Mesa-dev] [PATCH] radeon/video: use more common buffer infrastructure

Michel Dänzer michel at daenzer.net
Wed Sep 10 17:55:18 PDT 2014


On 11.09.2014 03:23, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
>
> This allows us to clear the video buffers using the gfx engine(s).

Please split up this patch:

1. Use more common buffer infrastructure, otherwise no (intended)
    change in functionality
2. Clear video buffers with the GPU instead of the CPU
x. Other functionality change(s)


> @@ -816,28 +818,28 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
>   	for (i = 0; i < NUM_BUFFERS; ++i) {
>   		unsigned msg_fb_size = FB_BUFFER_OFFSET + FB_BUFFER_SIZE;
>   		STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);
> -		if (!rvid_create_buffer(dec->ws, &dec->msg_fb_buffers[i], msg_fb_size,
> -                                        RADEON_DOMAIN_VRAM, 0)) {
> +		if (!rvid_create_buffer(dec->screen, &dec->msg_fb_buffers[i],
> +					msg_fb_size, PIPE_USAGE_STAGING)) {

These buffers used VRAM before but use cached GTT afterwards. If that's 
intended, please split it up into a separate change per above.


Looks good other than that.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer


More information about the mesa-dev mailing list