diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2000-01-30 20:18:36 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2000-01-30 20:18:36 +0000 |
commit | 484f610fb1abe449968e796a652b5834b6b95bee (patch) | |
tree | 6ec313ce2fbdae4c5c63f52cb2dce527d17434af | |
parent | 49c3957aeb0eddd6029d08c47d6bbbbf4258890e (diff) |
Implementation of protocol, client support (i810) and limited server-sidei810-20000201-beta1
support for private depth and back buffers.
Commit of Jeff's changes for host-specific memory types from agp.
Added mga and i810 drivers to the config files.
-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 */ |