Changes to make AGP optional for in-kernel builds
parent
6d1ce8fe77
commit
81da79d1ed
|
@ -50,10 +50,7 @@
|
||||||
#ifdef CONFIG_MTRR
|
#ifdef CONFIG_MTRR
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
|
#ifdef CONFIG_DRM_AGP
|
||||||
#define DRM_AGP
|
|
||||||
#endif
|
|
||||||
#ifdef DRM_AGP
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/agp_backend.h>
|
#include <linux/agp_backend.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -410,7 +407,7 @@ typedef struct drm_device_dma {
|
||||||
wait_queue_head_t waiting; /* Processes waiting on free bufs */
|
wait_queue_head_t waiting; /* Processes waiting on free bufs */
|
||||||
} drm_device_dma_t;
|
} drm_device_dma_t;
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
typedef struct drm_agp_mem {
|
typedef struct drm_agp_mem {
|
||||||
unsigned long handle;
|
unsigned long handle;
|
||||||
agp_memory *memory;
|
agp_memory *memory;
|
||||||
|
@ -524,7 +521,7 @@ typedef struct drm_device {
|
||||||
wait_queue_head_t buf_readers; /* Processes waiting to read */
|
wait_queue_head_t buf_readers; /* Processes waiting to read */
|
||||||
wait_queue_head_t buf_writers; /* Processes waiting to ctx switch */
|
wait_queue_head_t buf_writers; /* Processes waiting to ctx switch */
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
drm_agp_head_t *agp;
|
drm_agp_head_t *agp;
|
||||||
#endif
|
#endif
|
||||||
unsigned long *ctx_bitmap;
|
unsigned long *ctx_bitmap;
|
||||||
|
@ -601,7 +598,7 @@ extern void drm_free_pages(unsigned long address, int order,
|
||||||
extern void *drm_ioremap(unsigned long offset, unsigned long size);
|
extern void *drm_ioremap(unsigned long offset, unsigned long size);
|
||||||
extern void drm_ioremapfree(void *pt, unsigned long size);
|
extern void drm_ioremapfree(void *pt, unsigned long size);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
extern agp_memory *drm_alloc_agp(int pages, u32 type);
|
extern agp_memory *drm_alloc_agp(int pages, u32 type);
|
||||||
extern int drm_free_agp(agp_memory *handle, int pages);
|
extern int drm_free_agp(agp_memory *handle, int pages);
|
||||||
extern int drm_bind_agp(agp_memory *handle, unsigned int start);
|
extern int drm_bind_agp(agp_memory *handle, unsigned int start);
|
||||||
|
@ -725,7 +722,7 @@ extern void drm_ctxbitmap_cleanup(drm_device_t *dev);
|
||||||
extern int drm_ctxbitmap_next(drm_device_t *dev);
|
extern int drm_ctxbitmap_next(drm_device_t *dev);
|
||||||
extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
|
extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* AGP/GART support (agpsupport.c) */
|
/* AGP/GART support (agpsupport.c) */
|
||||||
extern drm_agp_head_t *drm_agp_init(void);
|
extern drm_agp_head_t *drm_agp_init(void);
|
||||||
extern void drm_agp_uninit(void);
|
extern void drm_agp_uninit(void);
|
||||||
|
|
|
@ -99,7 +99,7 @@ static drm_ioctl_desc_t r128_ioctls[] = {
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { r128_unlock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { r128_unlock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { drm_agp_acquire, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { drm_agp_acquire, 1, 1 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = { drm_agp_release, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = { drm_agp_release, 1, 1 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = { drm_agp_enable, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = { drm_agp_enable, 1, 1 },
|
||||||
|
@ -244,7 +244,7 @@ static int r128_takedown(drm_device_t *dev)
|
||||||
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* Clear AGP information */
|
/* Clear AGP information */
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_mem_t *entry;
|
drm_agp_mem_t *entry;
|
||||||
|
@ -356,7 +356,7 @@ int r128_init(void)
|
||||||
drm_mem_init();
|
drm_mem_init();
|
||||||
drm_proc_init(dev);
|
drm_proc_init(dev);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
if (dev->agp == NULL) {
|
if (dev->agp == NULL) {
|
||||||
DRM_ERROR("Cannot initialize agpgart module.\n");
|
DRM_ERROR("Cannot initialize agpgart module.\n");
|
||||||
|
@ -409,7 +409,7 @@ void r128_cleanup(void)
|
||||||
}
|
}
|
||||||
drm_ctxbitmap_cleanup(dev);
|
drm_ctxbitmap_cleanup(dev);
|
||||||
r128_takedown(dev);
|
r128_takedown(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_uninit();
|
drm_agp_uninit();
|
||||||
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
||||||
|
|
|
@ -94,7 +94,7 @@ static drm_ioctl_desc_t tdfx_ioctls[] = {
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_LOCK)] = { tdfx_lock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_LOCK)] = { tdfx_lock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { tdfx_unlock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { tdfx_unlock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = {drm_agp_acquire, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = {drm_agp_acquire, 1, 1},
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = {drm_agp_release, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = {drm_agp_release, 1, 1},
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = {drm_agp_enable, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = {drm_agp_enable, 1, 1},
|
||||||
|
@ -230,7 +230,7 @@ static int tdfx_takedown(drm_device_t *dev)
|
||||||
}
|
}
|
||||||
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
||||||
}
|
}
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* Clear AGP information */
|
/* Clear AGP information */
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_mem_t *temp;
|
drm_agp_mem_t *temp;
|
||||||
|
@ -330,7 +330,7 @@ int tdfx_init(void)
|
||||||
|
|
||||||
drm_mem_init();
|
drm_mem_init();
|
||||||
drm_proc_init(dev);
|
drm_proc_init(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
#endif
|
#endif
|
||||||
if((retcode = drm_ctxbitmap_init(dev))) {
|
if((retcode = drm_ctxbitmap_init(dev))) {
|
||||||
|
@ -368,7 +368,7 @@ void tdfx_cleanup(void)
|
||||||
}
|
}
|
||||||
drm_ctxbitmap_cleanup(dev);
|
drm_ctxbitmap_cleanup(dev);
|
||||||
tdfx_takedown(dev);
|
tdfx_takedown(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_uninit();
|
drm_agp_uninit();
|
||||||
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
||||||
|
|
|
@ -128,7 +128,7 @@ AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(AGP),1)
|
ifeq ($(AGP),1)
|
||||||
MODCFLAGS += -DDRM_AGP
|
MODCFLAGS += -DCONFIG_DRM_AGP
|
||||||
DRMOBJS += agpsupport.o
|
DRMOBJS += agpsupport.o
|
||||||
MODS += mga.o i810.o
|
MODS += mga.o i810.o
|
||||||
|
|
||||||
|
|
13
linux/drmP.h
13
linux/drmP.h
|
@ -50,10 +50,7 @@
|
||||||
#ifdef CONFIG_MTRR
|
#ifdef CONFIG_MTRR
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
|
#ifdef CONFIG_DRM_AGP
|
||||||
#define DRM_AGP
|
|
||||||
#endif
|
|
||||||
#ifdef DRM_AGP
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/agp_backend.h>
|
#include <linux/agp_backend.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -410,7 +407,7 @@ typedef struct drm_device_dma {
|
||||||
wait_queue_head_t waiting; /* Processes waiting on free bufs */
|
wait_queue_head_t waiting; /* Processes waiting on free bufs */
|
||||||
} drm_device_dma_t;
|
} drm_device_dma_t;
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
typedef struct drm_agp_mem {
|
typedef struct drm_agp_mem {
|
||||||
unsigned long handle;
|
unsigned long handle;
|
||||||
agp_memory *memory;
|
agp_memory *memory;
|
||||||
|
@ -524,7 +521,7 @@ typedef struct drm_device {
|
||||||
wait_queue_head_t buf_readers; /* Processes waiting to read */
|
wait_queue_head_t buf_readers; /* Processes waiting to read */
|
||||||
wait_queue_head_t buf_writers; /* Processes waiting to ctx switch */
|
wait_queue_head_t buf_writers; /* Processes waiting to ctx switch */
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
drm_agp_head_t *agp;
|
drm_agp_head_t *agp;
|
||||||
#endif
|
#endif
|
||||||
unsigned long *ctx_bitmap;
|
unsigned long *ctx_bitmap;
|
||||||
|
@ -601,7 +598,7 @@ extern void drm_free_pages(unsigned long address, int order,
|
||||||
extern void *drm_ioremap(unsigned long offset, unsigned long size);
|
extern void *drm_ioremap(unsigned long offset, unsigned long size);
|
||||||
extern void drm_ioremapfree(void *pt, unsigned long size);
|
extern void drm_ioremapfree(void *pt, unsigned long size);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
extern agp_memory *drm_alloc_agp(int pages, u32 type);
|
extern agp_memory *drm_alloc_agp(int pages, u32 type);
|
||||||
extern int drm_free_agp(agp_memory *handle, int pages);
|
extern int drm_free_agp(agp_memory *handle, int pages);
|
||||||
extern int drm_bind_agp(agp_memory *handle, unsigned int start);
|
extern int drm_bind_agp(agp_memory *handle, unsigned int start);
|
||||||
|
@ -725,7 +722,7 @@ extern void drm_ctxbitmap_cleanup(drm_device_t *dev);
|
||||||
extern int drm_ctxbitmap_next(drm_device_t *dev);
|
extern int drm_ctxbitmap_next(drm_device_t *dev);
|
||||||
extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
|
extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* AGP/GART support (agpsupport.c) */
|
/* AGP/GART support (agpsupport.c) */
|
||||||
extern drm_agp_head_t *drm_agp_init(void);
|
extern drm_agp_head_t *drm_agp_init(void);
|
||||||
extern void drm_agp_uninit(void);
|
extern void drm_agp_uninit(void);
|
||||||
|
|
|
@ -277,10 +277,8 @@ static int gamma_takedown(drm_device_t *dev)
|
||||||
DRM_MEM_SAREA);
|
DRM_MEM_SAREA);
|
||||||
break;
|
break;
|
||||||
case _DRM_AGP:
|
case _DRM_AGP:
|
||||||
#ifdef DRM_AGP
|
|
||||||
/* Do nothing here, because this is all
|
/* Do nothing here, because this is all
|
||||||
handled in the AGP/GART driver. */
|
handled in the AGP/GART driver. */
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
||||||
|
|
|
@ -197,7 +197,7 @@ void drm_free(void *pt, size_t size, int area)
|
||||||
int free_count;
|
int free_count;
|
||||||
|
|
||||||
if (!pt) DRM_MEM_ERROR(area, "Attempt to free NULL pointer\n");
|
if (!pt) DRM_MEM_ERROR(area, "Attempt to free NULL pointer\n");
|
||||||
else kfree(pt, size);
|
else kfree(pt);
|
||||||
spin_lock(&drm_mem_lock);
|
spin_lock(&drm_mem_lock);
|
||||||
drm_mem_stats[area].bytes_freed += size;
|
drm_mem_stats[area].bytes_freed += size;
|
||||||
free_count = ++drm_mem_stats[area].free_count;
|
free_count = ++drm_mem_stats[area].free_count;
|
||||||
|
@ -330,7 +330,7 @@ void drm_ioremapfree(void *pt, unsigned long size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
agp_memory *drm_alloc_agp(int pages, u32 type)
|
agp_memory *drm_alloc_agp(int pages, u32 type)
|
||||||
{
|
{
|
||||||
agp_memory *handle;
|
agp_memory *handle;
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "linux/un.h"
|
#include "linux/un.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd,
|
int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
@ -199,7 +199,7 @@ int r128_addbufs(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
sizeof(request),
|
sizeof(request),
|
||||||
-EFAULT);
|
-EFAULT);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
if (request.flags & _DRM_AGP_BUFFER)
|
if (request.flags & _DRM_AGP_BUFFER)
|
||||||
return r128_addbufs_agp(inode, filp, cmd, arg);
|
return r128_addbufs_agp(inode, filp, cmd, arg);
|
||||||
else
|
else
|
||||||
|
|
|
@ -99,7 +99,7 @@ static drm_ioctl_desc_t r128_ioctls[] = {
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { r128_unlock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { r128_unlock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { drm_agp_acquire, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { drm_agp_acquire, 1, 1 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = { drm_agp_release, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = { drm_agp_release, 1, 1 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = { drm_agp_enable, 1, 1 },
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = { drm_agp_enable, 1, 1 },
|
||||||
|
@ -244,7 +244,7 @@ static int r128_takedown(drm_device_t *dev)
|
||||||
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* Clear AGP information */
|
/* Clear AGP information */
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_mem_t *entry;
|
drm_agp_mem_t *entry;
|
||||||
|
@ -356,7 +356,7 @@ int r128_init(void)
|
||||||
drm_mem_init();
|
drm_mem_init();
|
||||||
drm_proc_init(dev);
|
drm_proc_init(dev);
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
if (dev->agp == NULL) {
|
if (dev->agp == NULL) {
|
||||||
DRM_ERROR("Cannot initialize agpgart module.\n");
|
DRM_ERROR("Cannot initialize agpgart module.\n");
|
||||||
|
@ -409,7 +409,7 @@ void r128_cleanup(void)
|
||||||
}
|
}
|
||||||
drm_ctxbitmap_cleanup(dev);
|
drm_ctxbitmap_cleanup(dev);
|
||||||
r128_takedown(dev);
|
r128_takedown(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_uninit();
|
drm_agp_uninit();
|
||||||
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
||||||
|
|
|
@ -94,7 +94,7 @@ static drm_ioctl_desc_t tdfx_ioctls[] = {
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_LOCK)] = { tdfx_lock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_LOCK)] = { tdfx_lock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { tdfx_unlock, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { tdfx_unlock, 1, 0 },
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
[DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { drm_finish, 1, 0 },
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = {drm_agp_acquire, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = {drm_agp_acquire, 1, 1},
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = {drm_agp_release, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = {drm_agp_release, 1, 1},
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = {drm_agp_enable, 1, 1},
|
[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = {drm_agp_enable, 1, 1},
|
||||||
|
@ -230,7 +230,7 @@ static int tdfx_takedown(drm_device_t *dev)
|
||||||
}
|
}
|
||||||
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
|
||||||
}
|
}
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
/* Clear AGP information */
|
/* Clear AGP information */
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_mem_t *temp;
|
drm_agp_mem_t *temp;
|
||||||
|
@ -330,7 +330,7 @@ int tdfx_init(void)
|
||||||
|
|
||||||
drm_mem_init();
|
drm_mem_init();
|
||||||
drm_proc_init(dev);
|
drm_proc_init(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
#endif
|
#endif
|
||||||
if((retcode = drm_ctxbitmap_init(dev))) {
|
if((retcode = drm_ctxbitmap_init(dev))) {
|
||||||
|
@ -368,7 +368,7 @@ void tdfx_cleanup(void)
|
||||||
}
|
}
|
||||||
drm_ctxbitmap_cleanup(dev);
|
drm_ctxbitmap_cleanup(dev);
|
||||||
tdfx_takedown(dev);
|
tdfx_takedown(dev);
|
||||||
#ifdef DRM_AGP
|
#ifdef CONFIG_DRM_AGP
|
||||||
if (dev->agp) {
|
if (dev->agp) {
|
||||||
drm_agp_uninit();
|
drm_agp_uninit();
|
||||||
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
|
||||||
|
|
Loading…
Reference in New Issue