initializing the DRM device - this was causing a kernel oops when the
AGPGART module wasn't loaded.
extern int DRM(agp_acquire)(void);
extern void DRM(agp_release)(void);
-extern void DRM(agp_enable)(unsigned mode);
+extern void DRM(agp_enable)(unsigned long mode);
extern agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type);
extern int DRM(agp_free_memory)(agp_memory *handle);
extern int DRM(agp_bind_memory)(agp_memory *handle, off_t start);
/**
* Enable the AGP bus.
*/
-void DRM(agp_enable)(unsigned mode)
+void DRM(agp_enable)(unsigned long mode)
{
if (drm_agp->enable)
drm_agp->enable(mode);
{
drm_agp_head_t *head = NULL;
+ if (!drm_agp)
+ return;
+
if (!(head = DRM(alloc)(sizeof(*head), DRM_MEM_AGPLISTS)))
return;
drm_agp->copy_info(&head->agp_info);
if (head->agp_info.chipset == NOT_SUPPORTED) {
DRM(free)(head, sizeof(*head), DRM_MEM_AGPLISTS);
+ return;
}
head->memory = NULL;
#if LINUX_VERSION_CODE <= 0x020408