diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 65e24fb..87b6c0e 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1904,7 +1904,11 @@ int drm_bo_driver_init(drm_device_t * de if (ret) goto out_unlock; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,19) INIT_WORK(&bm->wq, &drm_bo_delayed_workqueue, dev); +#else + INIT_WORK(&bm->wq, &drm_bo_delayed_workqueue); +#endif bm->initialized = 1; bm->nice_mode = 1; atomic_set(&bm->count, 0); diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index dcda193..688368f 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -158,7 +158,7 @@ #endif #include #include -#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) && \ +#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) && \ (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))) #define DRM_ODD_MM_COMPAT #endif @@ -215,7 +215,7 @@ #define NOPAGE_REFAULT get_nopage_retry( #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) /* * Hopefully, real NOPAGE_RETRY functionality will be in 2.6.19. diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index e9d0ac6..79642ca 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -48,7 +48,7 @@ MODULE_PARM_DESC(cards_limit, "Maximum n MODULE_PARM_DESC(debug, "Enable debug output"); module_param_named(cards_limit, drm_cards_limit, int, S_IRUGO); -module_param_named(debug, drm_debug, int, S_IRUGO|S_IWUGO); +module_param_named(debug, drm_debug, int, S_IRUGO|S_IWUSR); drm_head_t **drm_heads; struct drm_sysfs_class *drm_class; diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index f36218e..101c316 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -34,6 +34,7 @@ */ #include "drmP.h" +#include "drm_compat.h" #if defined(__ia64__) #include @@ -159,9 +160,9 @@ static __inline__ struct page *drm_do_vm } #endif /* __OS_HAS_AGP */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) || \ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) || \ LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)) static #endif struct page *drm_vm_ttm_fault(struct vm_area_struct *vma, @@ -509,7 +510,7 @@ static struct vm_operations_struct drm_v .close = drm_vm_close, }; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) static struct vm_operations_struct drm_vm_ttm_ops = { .nopage = drm_vm_ttm_nopage, .open = drm_vm_ttm_open_wrapper, diff --git a/linux-core/via_dmablit.c b/linux-core/via_dmablit.c index 1fb902c..fceaa98 100644 --- a/linux-core/via_dmablit.c +++ b/linux-core/via_dmablit.c @@ -569,7 +569,13 @@ via_init_dmablit(drm_device_t *dev) DRM_INIT_WAITQUEUE(blitq->blit_queue + j); } DRM_INIT_WAITQUEUE(&blitq->busy_queue); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,19) INIT_WORK(&blitq->wq, via_dmablit_workqueue, blitq); +#else + INIT_WORK(&blitq->wq, via_dmablit_workqueue); +#endif + + init_timer(&blitq->poll_timer); blitq->poll_timer.function = &via_dmablit_timer; blitq->poll_timer.data = (unsigned long) blitq;