nvk/nvkmd: Advertise the usable VA range

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
This commit is contained in:
Faith Ekstrand 2024-08-09 11:59:03 -05:00 committed by Marge Bot
parent 6db3609eaf
commit 0f65011157
2 changed files with 7 additions and 0 deletions

View file

@ -23,6 +23,8 @@ nvkmd_nouveau_create_dev(struct nvkmd_pdev *_pdev,
dev->base.ops = &nvkmd_nouveau_dev_ops;
dev->base.pdev = &pdev->base;
dev->base.va_start = 0;
dev->base.va_end = NOUVEAU_WS_DEVICE_KERNEL_RESERVATION_START;
drmDevicePtr drm_device = NULL;
int ret = drmGetDeviceFromDevId(pdev->base.drm.render_dev, 0, &drm_device);

View file

@ -177,6 +177,11 @@ struct nvkmd_dev_ops {
struct nvkmd_dev {
const struct nvkmd_dev_ops *ops;
struct nvkmd_pdev *pdev;
/* Start and end of the usable VA space. All nvkmd_va objects will be
* allocated within this range.
*/
uint64_t va_start, va_end;
};
struct nvkmd_mem_ops {