patch-2.4.23 linux-2.4.23/drivers/char/drm/drm_vm.h

Next file: linux-2.4.23/drivers/char/drm/gamma.h
Previous file: linux-2.4.23/drivers/char/drm/drm_stub.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/char/drm/drm_vm.h linux-2.4.23/drivers/char/drm/drm_vm.h
@@ -57,7 +57,7 @@
 
 struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
 			    unsigned long address,
-			    int unused)
+			    int write_access)
 {
 #if __REALLY_HAVE_AGP
 	drm_file_t *priv  = vma->vm_file->private_data;
@@ -70,7 +70,7 @@
          * Find the right map
          */
 
-	if(!dev->agp->cant_use_aperture) goto vm_nopage_error;
+	if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error;
 
 	list_for_each(list, &dev->maplist->head) {
 		r_list = (drm_map_list_t *)list;
@@ -141,9 +141,7 @@
 		return NOPAGE_OOM;
 	get_page(page);
 
-#if 0	/* XXX page_to_bus is not a portable interface available on all platforms. */
-	DRM_DEBUG("0x%08lx => 0x%08llx\n", address, (u64)page_to_bus(page));
-#endif
+	DRM_DEBUG("shm_nopage 0x%lx\n", address);
 	return page;
 }
 
@@ -245,10 +243,7 @@
 
 	get_page(page);
 
-#if 0	/* XXX page_to_bus is not a portable interface available on all platforms. */
-	DRM_DEBUG("0x%08lx (page %lu) => 0x%08llx\n", address, page_nr, 
-		  (u64)page_to_bus(page));
-#endif
+	DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr);
 	return page;
 }
 
@@ -449,12 +444,12 @@
 		}
 		offset = DRIVER_GET_REG_OFS();
 #ifdef __sparc__
-		if (io_remap_page_range(vma->vm_start,
+		if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
 					VM_OFFSET(vma) + offset,
 					vma->vm_end - vma->vm_start,
 					vma->vm_page_prot, 0))
 #else
-		if (remap_page_range(vma->vm_start,
+		if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
 				     VM_OFFSET(vma) + offset,
 				     vma->vm_end - vma->vm_start,
 				     vma->vm_page_prot))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)