diff options
Diffstat (limited to 'linux/drm_scatter.h')
-rw-r--r-- | linux/drm_scatter.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/linux/drm_scatter.h b/linux/drm_scatter.h index 07e8e4e5..1aedb403 100644 --- a/linux/drm_scatter.h +++ b/linux/drm_scatter.h @@ -66,9 +66,6 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp, drm_scatter_gather_t request; drm_sg_mem_t *entry; unsigned long pages, i, j; - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; DRM_DEBUG( "%s\n", __FUNCTION__ ); @@ -137,21 +134,10 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp, DRM_DEBUG( "sg alloc virtual = %p\n", entry->virtual ); for ( i = entry->handle, j = 0 ; j < pages ; i += PAGE_SIZE, j++ ) { - pgd = pgd_offset_k( i ); - if ( !pgd_present( *pgd ) ) + entry->pagelist[j] = vmalloc_to_page((void *)i); + if (!entry->pagelist[j]) goto failed; - - pmd = pmd_offset( pgd, i ); - if ( !pmd_present( *pmd ) ) - goto failed; - - pte = pte_offset( pmd, i ); - if ( !pte_present( *pte ) ) - goto failed; - - entry->pagelist[j] = pte_page( *pte ); - - SetPageReserved( entry->pagelist[j] ); + SetPageReserved(entry->pagelist[j]); } request.handle = entry->handle; |