summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/nouveau/nouveau_device.c16
-rw-r--r--libdrm/nouveau/nouveau_drmif.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/libdrm/nouveau/nouveau_device.c b/libdrm/nouveau/nouveau_device.c
index b5ac8546..c6b24462 100644
--- a/libdrm/nouveau/nouveau_device.c
+++ b/libdrm/nouveau/nouveau_device.c
@@ -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);
diff --git a/libdrm/nouveau/nouveau_drmif.h b/libdrm/nouveau/nouveau_drmif.h
index c21fba2d..37913257 100644
--- a/libdrm/nouveau/nouveau_drmif.h
+++ b/libdrm/nouveau/nouveau_drmif.h
@@ -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))