nouveau/winsys: Getch the BAR size from the kernel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
This commit is contained in:
@@ -43,6 +43,7 @@ struct nv_device_info {
|
||||
uint16_t cls_compute;
|
||||
|
||||
uint64_t vram_size_B;
|
||||
uint64_t bar_size_B;
|
||||
};
|
||||
|
||||
#endif /* NV_DEVINFO_H */
|
||||
|
||||
@@ -317,6 +317,10 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
|
||||
else
|
||||
device->local_mem_domain = NOUVEAU_GEM_DOMAIN_VRAM;
|
||||
|
||||
if (drm_device->bustype == DRM_BUS_PCI &&
|
||||
!nouveau_ws_param(fd, NOUVEAU_GETPARAM_VRAM_BAR_SIZE, &value))
|
||||
device->info.bar_size_B = value;
|
||||
|
||||
if (nouveau_ws_param(fd, NOUVEAU_GETPARAM_GRAPH_UNITS, &value))
|
||||
goto out_err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user