diff options
-rw-r--r-- | libdrm/xf86drm.c | 4 | ||||
-rw-r--r-- | linux/agpsupport.c | 2 | ||||
-rw-r--r-- | linux/drm.h | 1 | ||||
-rw-r--r-- | shared-core/drm.h | 1 | ||||
-rw-r--r-- | shared/drm.h | 1 |
5 files changed, 8 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; } diff --git a/linux/agpsupport.c b/linux/agpsupport.c index e49911ab..b1266cfa 100644 --- a/linux/agpsupport.c +++ b/linux/agpsupport.c @@ -178,6 +178,8 @@ int drm_agp_alloc(struct inode *inode, struct file *filp, unsigned int cmd, dev->agp->memory = entry; request.handle = entry->handle; + request.physical = memory->physical; + if (copy_to_user((drm_agp_buffer_t *)arg, &request, sizeof(request))) { dev->agp->memory = entry->next; dev->agp->memory->prev = NULL; diff --git a/linux/drm.h b/linux/drm.h index 77d4efb8..01b2024c 100644 --- a/linux/drm.h +++ b/linux/drm.h @@ -257,6 +257,7 @@ typedef struct drm_agp_buffer { unsigned long size; /* In bytes -- will round to page boundary */ unsigned long handle; /* Used for BIND/UNBIND ioctls */ unsigned long type; /* Type of memory to allocate */ + unsigned long physical; /* Physical used by i810 */ } drm_agp_buffer_t; /* For drm_agp_bind */ diff --git a/shared-core/drm.h b/shared-core/drm.h index 77d4efb8..01b2024c 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -257,6 +257,7 @@ typedef struct drm_agp_buffer { unsigned long size; /* In bytes -- will round to page boundary */ unsigned long handle; /* Used for BIND/UNBIND ioctls */ unsigned long type; /* Type of memory to allocate */ + unsigned long physical; /* Physical used by i810 */ } drm_agp_buffer_t; /* For drm_agp_bind */ diff --git a/shared/drm.h b/shared/drm.h index 77d4efb8..01b2024c 100644 --- a/shared/drm.h +++ b/shared/drm.h @@ -257,6 +257,7 @@ typedef struct drm_agp_buffer { unsigned long size; /* In bytes -- will round to page boundary */ unsigned long handle; /* Used for BIND/UNBIND ioctls */ unsigned long type; /* Type of memory to allocate */ + unsigned long physical; /* Physical used by i810 */ } drm_agp_buffer_t; /* For drm_agp_bind */ |