mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
nvk: retrieve gpc/mp counts from kernel.
These are needed to size the tls area. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
bd8077bef5
commit
a3e5eb1134
2 changed files with 9 additions and 0 deletions
|
|
@ -156,6 +156,12 @@ nouveau_ws_device_new(int fd)
|
|||
else
|
||||
device->local_mem_domain = NOUVEAU_GEM_DOMAIN_VRAM;
|
||||
|
||||
uint64_t value;
|
||||
if (nouveau_getparam(dev, NOUVEAU_GETPARAM_GRAPH_UNITS, &value))
|
||||
goto out_dev;
|
||||
device->base.gpc_count = value & 0x000000ff;
|
||||
device->base.mp_count = value >> 8;
|
||||
|
||||
return &device->base;
|
||||
|
||||
out_dev:
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ struct nouveau_ws_device {
|
|||
uint64_t vram_size;
|
||||
uint64_t gart_size;
|
||||
bool is_integrated;
|
||||
|
||||
uint8_t gpc_count;
|
||||
uint16_t mp_count;
|
||||
};
|
||||
|
||||
/* don't use directly, gets removed once the new UAPI is here */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue