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:
@@ -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 };
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user