[Mesa-dev] [PATCH 1/2] radeon/uvd: use more sane defaults for bitstream buffer size
Alex Deucher
alexdeucher at gmail.com
Wed Sep 11 13:01:41 PDT 2013
On Wed, Sep 11, 2013 at 5:41 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/gallium/drivers/radeon/radeon_uvd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
> index 5e7eedb..981d5c5 100644
> --- a/src/gallium/drivers/radeon/radeon_uvd.c
> +++ b/src/gallium/drivers/radeon/radeon_uvd.c
> @@ -823,6 +823,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
> {
> unsigned dpb_size = calc_dpb_size(templ);
> unsigned width = templ->width, height = templ->height;
> + unsigned bs_buf_size;
> struct radeon_info info;
> struct ruvd_decoder *dec;
> struct ruvd_msg msg;
> @@ -873,6 +874,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
> goto error;
> }
>
> + bs_buf_size = width * height * 512 / (16 * 16);
> for (i = 0; i < NUM_BUFFERS; ++i) {
> unsigned msg_fb_size = align(sizeof(struct ruvd_msg), 0x1000) + 0x1000;
> if (!create_buffer(dec, &dec->msg_fb_buffers[i], msg_fb_size)) {
> @@ -880,7 +882,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
> goto error;
> }
>
> - if (!create_buffer(dec, &dec->bs_buffers[i], 4096)) {
> + if (!create_buffer(dec, &dec->bs_buffers[i], bs_buf_size)) {
> RUVD_ERR("Can't allocated bitstream buffers.\n");
> goto error;
> }
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list