mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
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:
parent
85849ed9cb
commit
d4623da9a3
2 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue