diff options
author | Ilia Mirkin <[email protected]> | 2014-01-13 13:36:28 -0500 |
---|---|---|
committer | Maarten Lankhorst <[email protected]> | 2014-01-27 16:40:43 +0100 |
commit | d98b85b50713c12e1970da08220f124b26feaab0 (patch) | |
tree | 1218d4968350de74576f53c3dcc7692d0b02b463 /src/gallium/drivers | |
parent | 58589f6c6d02f6a8b2fe4a049779129064faf2c0 (diff) |
nv50: allocate an extra code bo to avoid dmesg spam
Each code BO is a heap that allocates at the end first, and so GPs are
allocated at the very end of the allocated space. When executing, we see
PAGE_NOT_PRESENT errors for the next page. Just over-allocate to make
sure that there's something there.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index b678cee473f..2e7b84d5911 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -738,8 +738,12 @@ nv50_screen_create(struct nouveau_device *dev) goto fail; } + /* This over-allocates by a whole code BO. The GP, which would execute at + * the end of the last page, would trigger faults. The going theory is that + * it prefetches up to a certain amount. This avoids dmesg spam. + */ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16, - 3 << NV50_CODE_BO_SIZE_LOG2, NULL, &screen->code); + 4 << NV50_CODE_BO_SIZE_LOG2, NULL, &screen->code); if (ret) { NOUVEAU_ERR("Failed to allocate code bo: %d\n", ret); goto fail; |