nouveau/winsys: Store the nouveau kernel version

This is so we can enable features needing kernel support based on whether the
detected kernel driver supports them or not by checking for the version in
nvkmd.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
This commit is contained in:
Mohamed Ahmed 2025-10-11 21:48:23 +03:00 committed by Marge Bot
parent 7a492e102f
commit 3af0ee04a5
2 changed files with 4 additions and 0 deletions

View file

@ -441,6 +441,8 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
if (version < 0x01000301)
goto out_err;
device->nouveau_version = version;
const uint64_t KERN = NOUVEAU_WS_DEVICE_KERNEL_RESERVATION_START;
const uint64_t TOP = 1ull << 40;
struct drm_nouveau_vm_init vminit = { KERN, TOP-KERN };

View file

@ -27,6 +27,8 @@ struct nouveau_ws_device {
struct hash_table *bos;
bool has_vm_bind;
uint32_t nouveau_version;
};
struct nouveau_ws_device *nouveau_ws_device_new(struct _drmDevice *drm_device);