nouveau/nvc0: increase overallocation on shader bo to 2K

I've been seeing a bunch of read page faults at the end of the
shader allocation, nvk uses a full page at the end to overallocate
so align with that and see if it goes away.

ahulliet and skeggsb both said 2k was used.

Cc: mesa-stable
Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29722>
(cherry picked from commit f7434d7576)
This commit is contained in:
Dave Airlie 2024-06-14 12:22:58 +10:00 committed by Eric Engestrom
parent 036560d3c4
commit 7792a2a80b
2 changed files with 5 additions and 4 deletions

View file

@ -1714,7 +1714,7 @@
"description": "nouveau/nvc0: increase overallocation on shader bo to 2K",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -888,10 +888,11 @@ nvc0_screen_resize_text_area(struct nvc0_screen *screen, struct nouveau_pushbuf
nouveau_heap_free(&screen->lib_code);
nouveau_heap_destroy(&screen->text_heap);
/* XXX: getting a page fault at the end of the code buffer every few
* launches, don't use the last 256 bytes to work around them - prefetch ?
/*
* Shader storage needs a 2K (from NVIDIA) overallocations at the end
* to avoid prefetch bugs.
*/
nouveau_heap_init(&screen->text_heap, 0, size - 0x100);
nouveau_heap_init(&screen->text_heap, 0, size - 0x800);
/* update the code segment setup */
if (screen->eng3d->oclass < GV100_3D_CLASS) {