libdrm/nouveau: ask the kernel for vram/gart aperture sizes
parent
bad16a6b22
commit
98b0df3953
|
@ -76,6 +76,22 @@ nouveau_device_open_existing(struct nouveau_device **dev, int close,
|
|||
}
|
||||
nvdev->base.vm_vram_base = value;
|
||||
|
||||
ret = nouveau_device_get_param(&nvdev->base,
|
||||
NOUVEAU_GETPARAM_FB_SIZE, &value);
|
||||
if (ret) {
|
||||
nouveau_device_close((void *)&nvdev);
|
||||
return ret;
|
||||
}
|
||||
nvdev->vram_aper_size = value;
|
||||
|
||||
ret = nouveau_device_get_param(&nvdev->base,
|
||||
NOUVEAU_GETPARAM_AGP_SIZE, &value);
|
||||
if (ret) {
|
||||
nouveau_device_close((void *)&nvdev);
|
||||
return ret;
|
||||
}
|
||||
nvdev->gart_aper_size = value;
|
||||
|
||||
ret = nouveau_bo_init(&nvdev->base);
|
||||
if (ret) {
|
||||
nouveau_device_close((void *)&nvdev);
|
||||
|
|
|
@ -37,6 +37,9 @@ struct nouveau_device_priv {
|
|||
int needs_close;
|
||||
|
||||
int mm_enabled;
|
||||
/*XXX: move to nouveau_device when interface gets bumped */
|
||||
uint64_t vram_aper_size;
|
||||
uint64_t gart_aper_size;
|
||||
};
|
||||
#define nouveau_device(n) ((struct nouveau_device_priv *)(n))
|
||||
|
||||
|
|
Loading…
Reference in New Issue