summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r--libdrm/xf86drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index ca17130e..023a438c 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -769,7 +769,8 @@ int drmAgpEnable(int fd, unsigned long mode)
return 0;
}
-unsigned long drmAgpAlloc(int fd, unsigned long size, unsigned long type)
+unsigned long drmAgpAlloc(int fd, unsigned long size, unsigned long type,
+ unsigned long *address)
{
drm_agp_buffer_t b;
@@ -777,6 +778,7 @@ unsigned long drmAgpAlloc(int fd, unsigned long size, unsigned long type)
b.handle = 0;
b.type = type;
if (ioctl(fd, DRM_IOCTL_AGP_ALLOC, &b)) return 0;
+ if (address != 0UL) *address = b.physical;
return b.handle;
}