summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-01-04 11:26:27 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-08 12:05:27 +0200
commit978480d69f0b40ae45766bbc65c4a6c5bb805b98 (patch)
treec21fe490e0767471a4b426d9839fa4df5ee3de26
parentc2be35d30907fc110df8de93b8fb344a7968c7b3 (diff)
downloadmesa-978480d69f0b40ae45766bbc65c4a6c5bb805b98.tar.gz
nvc0: scale up inter_bo size so that it's 16M for a 4K video
Experimentally, 4M causes corruption and slowness, try to ramp it up with size instead. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit b16c9be4a5561bd825176a228c300331f989e837)
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_video.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
index 48ffac1b715..5a946ca6314 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
@@ -169,9 +169,12 @@ nvc0_create_decoder(struct pipe_context *context,
for (i = 0; i < NOUVEAU_VP3_VIDEO_QDEPTH && !ret; ++i)
ret = nouveau_bo_new(screen->device, NOUVEAU_BO_VRAM,
0, 1 << 20, &cfg, &dec->bsp_bo[i]);
- if (!ret)
+ if (!ret) {
+ /* total fudge factor... just has to be bigger for higher bitrates? */
+ unsigned inter_size = align(templ->width * templ->height * 2, 4 << 20);
ret = nouveau_bo_new(screen->device, NOUVEAU_BO_VRAM,
- 0x100, 4 << 20, &cfg, &dec->inter_bo[0]);
+ 0x100, inter_size, &cfg, &dec->inter_bo[0]);
+ }
if (!ret) {
ret = nouveau_bo_new(screen->device, NOUVEAU_BO_VRAM,
0x100, dec->inter_bo[0]->size, &cfg,